From 4596e8292f97b712c157e4459c4ad35f8281fe83 Mon Sep 17 00:00:00 2001 From: Layomi Akinrinade Date: Fri, 18 Aug 2023 17:36:03 -0700 Subject: [PATCH] Revert changes to options gen --- .../Microsoft.Extensions.Options/gen/Emitter.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs b/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs index 8431a112d4883..adbaa874ad7f3 100644 --- a/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs +++ b/src/libraries/Microsoft.Extensions.Options/gen/Emitter.cs @@ -20,17 +20,17 @@ internal sealed class Emitter : EmitterBase private const string StaticValidationResultType = "global::System.ComponentModel.DataAnnotations.ValidationResult"; private const string StaticValidationAttributeType = "global::System.ComponentModel.DataAnnotations.ValidationAttribute"; - private readonly string _staticValidationAttributeHolderClassName = "__Attributes"; - private readonly string _staticValidatorHolderClassName = "__Validators"; - private readonly string _staticValidationAttributeHolderClassFQN; - private readonly string _staticValidatorHolderClassFQN; - private readonly string _modifier; + private string _staticValidationAttributeHolderClassName = "__Attributes"; + private string _staticValidatorHolderClassName = "__Validators"; + private string _staticValidationAttributeHolderClassFQN; + private string _staticValidatorHolderClassFQN; + private string _modifier; private sealed record StaticFieldInfo(string FieldTypeFQN, int FieldOrder, string FieldName, IList InstantiationLines); public Emitter(Compilation compilation, bool emitPreamble = true) : base(emitPreamble) { - if (((CSharpCompilation)compilation).LanguageVersion >= LanguageVersion.CSharp11) + if (((CSharpCompilation)compilation).LanguageVersion >= Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp11) { _modifier = "file"; }