public CSharpCompilationOptions( OutputKind outputKind, bool reportSuppressedDiagnostics, string moduleName, string mainTypeName, string scriptClassName, IEnumerable <string> usings, OptimizationLevel optimizationLevel, bool checkOverflow, bool allowUnsafe, string cryptoKeyContainer, string cryptoKeyFile, ImmutableArray <byte> cryptoPublicKey, bool?delaySign, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, bool concurrentBuild, bool deterministic, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider) : this(outputKind, false, moduleName, mainTypeName, scriptClassName, usings, optimizationLevel, checkOverflow, allowUnsafe, cryptoKeyContainer, cryptoKeyFile, cryptoPublicKey, delaySign, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions, concurrentBuild, deterministic : deterministic, currentLocalTime : default(DateTime), debugPlusMode : false, xmlReferenceResolver : xmlReferenceResolver, sourceReferenceResolver : sourceReferenceResolver, metadataReferenceResolver : metadataReferenceResolver, assemblyIdentityComparer : assemblyIdentityComparer, strongNameProvider : strongNameProvider, metadataImportOptions : MetadataImportOptions.Public, referencesSupersedeLowerVersions : false, publicSign : false, topLevelBinderFlags : BinderFlags.None, nullableContextOptions : NullableContextOptions.Disable) { }
// Expects correct arguments. internal CSharpCompilationOptions( OutputKind outputKind, bool reportSuppressedDiagnostics, string moduleName, string mainTypeName, string scriptClassName, IEnumerable <string> usings, OptimizationLevel optimizationLevel, bool checkOverflow, bool allowUnsafe, string cryptoKeyContainer, string cryptoKeyFile, ImmutableArray <byte> cryptoPublicKey, bool?delaySign, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, bool concurrentBuild, bool deterministic, DateTime currentLocalTime, bool debugPlusMode, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions, bool referencesSupersedeLowerVersions, bool publicSign, BinderFlags topLevelBinderFlags, NullableContextOptions nullableContextOptions) : base(outputKind, reportSuppressedDiagnostics, moduleName, mainTypeName, scriptClassName, cryptoKeyContainer, cryptoKeyFile, cryptoPublicKey, delaySign, publicSign, optimizationLevel, checkOverflow, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions.ToImmutableDictionaryOrEmpty(), concurrentBuild, deterministic, currentLocalTime, debugPlusMode, xmlReferenceResolver, sourceReferenceResolver, metadataReferenceResolver, assemblyIdentityComparer, strongNameProvider, metadataImportOptions, referencesSupersedeLowerVersions) { this.Usings = usings.AsImmutableOrEmpty(); this.AllowUnsafe = allowUnsafe; this.TopLevelBinderFlags = topLevelBinderFlags; this.NullableContextOptions = nullableContextOptions; }
// Defaults correspond to the compiler's defaults or indicate that the user did not specify when that is significant. // That's significant when one option depends on another's setting. SubsystemVersion depends on Platform and Target. public CSharpCompilationOptions( OutputKind outputKind, bool reportSuppressedDiagnostics = false, string moduleName = null, string mainTypeName = null, string scriptClassName = null, IEnumerable <string> usings = null, OptimizationLevel optimizationLevel = OptimizationLevel.Debug, bool checkOverflow = false, bool allowUnsafe = false, string cryptoKeyContainer = null, string cryptoKeyFile = null, ImmutableArray <byte> cryptoPublicKey = default(ImmutableArray <byte>), bool?delaySign = null, Platform platform = Platform.AnyCpu, ReportDiagnostic generalDiagnosticOption = ReportDiagnostic.Default, int warningLevel = 4, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions = null, bool concurrentBuild = true, bool deterministic = false, XmlReferenceResolver xmlReferenceResolver = null, SourceReferenceResolver sourceReferenceResolver = null, MetadataReferenceResolver metadataReferenceResolver = null, AssemblyIdentityComparer assemblyIdentityComparer = null, StrongNameProvider strongNameProvider = null, bool publicSign = false) : this(outputKind, reportSuppressedDiagnostics, moduleName, mainTypeName, scriptClassName, usings, optimizationLevel, checkOverflow, allowUnsafe, cryptoKeyContainer, cryptoKeyFile, cryptoPublicKey, delaySign, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions, concurrentBuild, deterministic, extendedCustomDebugInformation : true, debugPlusMode : false, xmlReferenceResolver : xmlReferenceResolver, sourceReferenceResolver : sourceReferenceResolver, metadataReferenceResolver : metadataReferenceResolver, assemblyIdentityComparer : assemblyIdentityComparer, strongNameProvider : strongNameProvider, metadataImportOptions : MetadataImportOptions.Public, referencesSupersedeLowerVersions : false, publicSign : publicSign, topLevelBinderFlags : BinderFlags.None) { }
// Defaults correspond to the compiler's defaults or indicate that the user did not specify when that is significant. // That's significant when one option depends on another's setting. SubsystemVersion depends on Platform and Target. public LanguageCompilationOptions( Language language, OutputKind outputKind, bool reportSuppressedDiagnostics = false, string moduleName = null, string mainTypeName = null, string scriptClassName = null, IEnumerable <string> usings = null, OptimizationLevel optimizationLevel = OptimizationLevel.Debug, bool checkOverflow = false, bool allowUnsafe = false, string cryptoKeyContainer = null, string cryptoKeyFile = null, ImmutableArray <byte> cryptoPublicKey = default(ImmutableArray <byte>), bool?delaySign = null, Platform platform = Platform.AnyCpu, ReportDiagnostic generalDiagnosticOption = ReportDiagnostic.Default, int warningLevel = 4, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions = null, bool concurrentBuild = true, bool deterministic = false, DateTime currentLocalTime = default(DateTime), bool debugPlusMode = false, XmlReferenceResolver xmlReferenceResolver = null, SourceReferenceResolver sourceReferenceResolver = null, MetadataReferenceResolver metadataReferenceResolver = null, AssemblyIdentityComparer assemblyIdentityComparer = null, StrongNameProvider strongNameProvider = null, bool publicSign = false, MetadataImportOptions metadataImportOptions = MetadataImportOptions.Public, bool referencesSupersedeLowerVersions = false, BinderFlags topLevelBinderFlags = null) : base(outputKind, reportSuppressedDiagnostics, moduleName, mainTypeName, scriptClassName, cryptoKeyContainer, cryptoKeyFile, cryptoPublicKey, delaySign, publicSign, optimizationLevel, checkOverflow, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions.ToImmutableDictionaryOrEmpty(), concurrentBuild, deterministic, currentLocalTime, debugPlusMode, xmlReferenceResolver, sourceReferenceResolver, metadataReferenceResolver, assemblyIdentityComparer, strongNameProvider, metadataImportOptions, referencesSupersedeLowerVersions) { _language = language; this.Usings = usings.AsImmutableOrEmpty(); this.AllowUnsafe = allowUnsafe; this.TopLevelBinderFlags = topLevelBinderFlags ?? BinderFlags.None; }
// Expects correct arguments. internal PhpCompilationOptions( OutputKind outputKind, string baseDirectory, string sdkDirectory, bool reportSuppressedDiagnostics, string moduleName, string mainTypeName, string scriptClassName, OptimizationLevel optimizationLevel, bool checkOverflow, string cryptoKeyContainer, string cryptoKeyFile, ImmutableArray <byte> cryptoPublicKey, bool?delaySign, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, bool concurrentBuild, bool deterministic, bool extendedCustomDebugInformation, bool debugPlusMode, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions, bool publicSign, PhpDocTypes phpdocTypes, PhpParseOptions parseOptions) : base(outputKind, reportSuppressedDiagnostics, moduleName, mainTypeName, scriptClassName, cryptoKeyContainer, cryptoKeyFile, cryptoPublicKey, delaySign, publicSign, optimizationLevel, checkOverflow, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions.ToImmutableDictionaryOrEmpty(), concurrentBuild, deterministic, extendedCustomDebugInformation, debugPlusMode, xmlReferenceResolver, sourceReferenceResolver, metadataReferenceResolver, assemblyIdentityComparer, strongNameProvider, metadataImportOptions) { this.BaseDirectory = baseDirectory; this.SdkDirectory = sdkDirectory; this.PhpDocTypes = phpdocTypes; this.ParseOptions = parseOptions; }
// 15.9 BACKCOMPAT OVERLOAD -- DO NOT TOUCH public CSharpCompilationOptions( OutputKind outputKind, bool reportSuppressedDiagnostics, string moduleName, string mainTypeName, string scriptClassName, IEnumerable <string> usings, OptimizationLevel optimizationLevel, bool checkOverflow, bool allowUnsafe, string cryptoKeyContainer, string cryptoKeyFile, ImmutableArray <byte> cryptoPublicKey, bool?delaySign, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, bool concurrentBuild, bool deterministic, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, bool publicSign, MetadataImportOptions metadataImportOptions) : this(outputKind, reportSuppressedDiagnostics, moduleName, mainTypeName, scriptClassName, usings, optimizationLevel, checkOverflow, allowUnsafe, cryptoKeyContainer, cryptoKeyFile, cryptoPublicKey, delaySign, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions, concurrentBuild, deterministic, xmlReferenceResolver, sourceReferenceResolver, metadataReferenceResolver, assemblyIdentityComparer, strongNameProvider, publicSign, metadataImportOptions, nullableContextOptions : NullableContextOptions.Disable) { }
// Expects correct arguments. internal CSharpCompilationOptions( OutputKind outputKind, string moduleName, string mainTypeName, string scriptClassName, IEnumerable <string> usings, bool optimize, bool checkOverflow, bool allowUnsafe, string cryptoKeyContainer, string cryptoKeyFile, bool?delaySign, int fileAlignment, ulong baseAddress, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, bool highEntropyVirtualAddressSpace, DebugInformationKind debugInformationKind, SubsystemVersion subsystemVersion, string runtimeMetadataVersion, bool concurrentBuild, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, MetadataReferenceProvider metadataReferenceProvider, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions, ImmutableArray <string> features) : base(outputKind, moduleName, mainTypeName, scriptClassName, cryptoKeyContainer, cryptoKeyFile, delaySign, optimize, checkOverflow, fileAlignment, baseAddress, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions, highEntropyVirtualAddressSpace, debugInformationKind, subsystemVersion, concurrentBuild, xmlReferenceResolver, sourceReferenceResolver, metadataReferenceResolver, metadataReferenceProvider, assemblyIdentityComparer, strongNameProvider, metadataImportOptions, features) { this.Usings = usings.AsImmutableOrEmpty(); this.AllowUnsafe = allowUnsafe; this.RuntimeMetadataVersion = runtimeMetadataVersion; }
// Defaults correspond to the compiler's defaults or indicate that the user did not specify when that is significant. // That's significant when one option depends on another's setting. SubsystemVersion depends on Platform and Target. public CSharpCompilationOptions( OutputKind outputKind, string moduleName, string mainTypeName, string scriptClassName, IEnumerable <string> usings, OptimizationLevel optimizationLevel, bool checkOverflow, bool allowUnsafe, string cryptoKeyContainer, string cryptoKeyFile, ImmutableArray <byte> cryptoPublicKey, bool?delaySign, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, bool concurrentBuild, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider) : this(outputKind, false, moduleName, mainTypeName, scriptClassName, usings, optimizationLevel, checkOverflow, allowUnsafe, cryptoKeyContainer, cryptoKeyFile, cryptoPublicKey, delaySign, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions, concurrentBuild, deterministic : false, extendedCustomDebugInformation : true, debugPlusMode : false, xmlReferenceResolver : xmlReferenceResolver, sourceReferenceResolver : sourceReferenceResolver, metadataReferenceResolver : metadataReferenceResolver, assemblyIdentityComparer : assemblyIdentityComparer, strongNameProvider : strongNameProvider, metadataImportOptions : MetadataImportOptions.Public) { }
protected override CompilationOptions CommonWithStrongNameProvider(StrongNameProvider provider) => WithStrongNameProvider(provider);
public StrongNameProviderWithBadInputStream(StrongNameProvider underlyingProvider) { _underlyingProvider = underlyingProvider; }
protected void ReadCompilationOptionsFrom( ObjectReader reader, out OutputKind outputKind, out bool reportSuppressedDiagnostics, out string moduleName, out string mainTypeName, out string scriptClassName, out OptimizationLevel optimizationLevel, out bool checkOverflow, out string cryptoKeyContainer, out string cryptoKeyFile, out ImmutableArray <byte> cryptoPublicKey, out bool?delaySign, out Platform platform, out ReportDiagnostic generalDiagnosticOption, out int warningLevel, out IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, out bool concurrentBuild, out bool deterministic, out bool publicSign, out XmlReferenceResolver xmlReferenceResolver, out SourceReferenceResolver sourceReferenceResolver, out MetadataReferenceResolver metadataReferenceResolver, out AssemblyIdentityComparer assemblyIdentityComparer, out StrongNameProvider strongNameProvider, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); outputKind = (OutputKind)reader.ReadInt32(); reportSuppressedDiagnostics = reader.ReadBoolean(); moduleName = reader.ReadString(); mainTypeName = reader.ReadString(); scriptClassName = reader.ReadString(); optimizationLevel = (OptimizationLevel)reader.ReadInt32(); checkOverflow = reader.ReadBoolean(); // REVIEW: is it okay this being not part of snapshot? cryptoKeyContainer = reader.ReadString(); cryptoKeyFile = reader.ReadString(); cryptoPublicKey = reader.ReadArray <byte>().ToImmutableArrayOrEmpty(); delaySign = reader.ReadBoolean() ? (bool?)reader.ReadBoolean() : null; platform = (Platform)reader.ReadInt32(); generalDiagnosticOption = (ReportDiagnostic)reader.ReadInt32(); warningLevel = reader.ReadInt32(); // REVIEW: I don't think there is a guarantee on ordering of elements in the immutable dictionary. // unfortunately, we need to sort them to make it deterministic // not sure why CompilationOptions uses SequencialEqual to check options equality // when ordering can change result of it even if contents are same. var count = reader.ReadInt32(); List <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptionsList = null; if (count > 0) { specificDiagnosticOptionsList = new List <KeyValuePair <string, ReportDiagnostic> >(count); for (var i = 0; i < count; i++) { var key = reader.ReadString(); var value = (ReportDiagnostic)reader.ReadInt32(); specificDiagnosticOptionsList.Add(KeyValuePair.Create(key, value)); } } specificDiagnosticOptions = specificDiagnosticOptionsList ?? SpecializedCollections.EmptyEnumerable <KeyValuePair <string, ReportDiagnostic> >(); concurrentBuild = reader.ReadBoolean(); deterministic = reader.ReadBoolean(); publicSign = reader.ReadBoolean(); // REVIEW: What should I do with these. are these service required when compilation is built ourselves, not through // compiler. xmlReferenceResolver = XmlFileResolver.Default; sourceReferenceResolver = SourceFileResolver.Default; metadataReferenceResolver = null; assemblyIdentityComparer = DesktopAssemblyIdentityComparer.Default; strongNameProvider = new DesktopStrongNameProvider(); }
protected override CompilationOptions CommonWithStrongNameProvider(StrongNameProvider provider) { return(WithStrongNameProvider(provider)); }
internal CompilationOptionsAdapter(OutputKind outputKind, bool reportSuppressedDiagnostics, string moduleName, string mainTypeName, string scriptClassName, string cryptoKeyContainer, string cryptoKeyFile, ImmutableArray <byte> cryptoPublicKey, bool?delaySign, bool publicSign, OptimizationLevel optimizationLevel, bool checkOverflow, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, ImmutableDictionary <string, ReportDiagnostic> specificDiagnosticOptions, bool concurrentBuild, bool deterministic, DateTime currentLocalTime, bool debugPlusMode, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions, bool referencesSupersedeLowerVersions) : base(outputKind, reportSuppressedDiagnostics, moduleName, mainTypeName, scriptClassName, cryptoKeyContainer, cryptoKeyFile, cryptoPublicKey, delaySign, publicSign, optimizationLevel, checkOverflow, platform, generalDiagnosticOption, warningLevel, specificDiagnosticOptions, concurrentBuild, deterministic, currentLocalTime, debugPlusMode, xmlReferenceResolver, sourceReferenceResolver, metadataReferenceResolver, assemblyIdentityComparer, strongNameProvider, metadataImportOptions, referencesSupersedeLowerVersions) { }
public new MetaCompilationOptions WithStrongNameProvider(StrongNameProvider provider) => (MetaCompilationOptions)base.WithStrongNameProvider(provider);
protected void ReadCompilationOptionsFrom( ObjectReader reader, out OutputKind outputKind, out bool reportSuppressedDiagnostics, out string moduleName, out string mainTypeName, out string scriptClassName, out OptimizationLevel optimizationLevel, out bool checkOverflow, out string cryptoKeyContainer, out string cryptoKeyFile, out ImmutableArray<byte> cryptoPublicKey, out bool? delaySign, out Platform platform, out ReportDiagnostic generalDiagnosticOption, out int warningLevel, out IEnumerable<KeyValuePair<string, ReportDiagnostic>> specificDiagnosticOptions, out bool concurrentBuild, out bool deterministic, out bool publicSign, out XmlReferenceResolver xmlReferenceResolver, out SourceReferenceResolver sourceReferenceResolver, out MetadataReferenceResolver metadataReferenceResolver, out AssemblyIdentityComparer assemblyIdentityComparer, out StrongNameProvider strongNameProvider, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); outputKind = (OutputKind)reader.ReadInt32(); reportSuppressedDiagnostics = reader.ReadBoolean(); moduleName = reader.ReadString(); mainTypeName = reader.ReadString(); scriptClassName = reader.ReadString(); optimizationLevel = (OptimizationLevel)reader.ReadInt32(); checkOverflow = reader.ReadBoolean(); // REVIEW: is it okay this being not part of snapshot? cryptoKeyContainer = reader.ReadString(); cryptoKeyFile = reader.ReadString(); cryptoPublicKey = reader.ReadArray<byte>().ToImmutableArrayOrEmpty(); delaySign = reader.ReadBoolean() ? (bool?)reader.ReadBoolean() : null; platform = (Platform)reader.ReadInt32(); generalDiagnosticOption = (ReportDiagnostic)reader.ReadInt32(); warningLevel = reader.ReadInt32(); // REVIEW: I don't think there is a guarantee on ordering of elements in the immutable dictionary. // unfortunately, we need to sort them to make it deterministic // not sure why CompilationOptions uses SequencialEqual to check options equality // when ordering can change result of it even if contents are same. var count = reader.ReadInt32(); List<KeyValuePair<string, ReportDiagnostic>> specificDiagnosticOptionsList = null; if (count > 0) { specificDiagnosticOptionsList = new List<KeyValuePair<string, ReportDiagnostic>>(count); for (var i = 0; i < count; i++) { var key = reader.ReadString(); var value = (ReportDiagnostic)reader.ReadInt32(); specificDiagnosticOptionsList.Add(KeyValuePair.Create(key, value)); } } specificDiagnosticOptions = specificDiagnosticOptionsList ?? SpecializedCollections.EmptyEnumerable<KeyValuePair<string, ReportDiagnostic>>(); concurrentBuild = reader.ReadBoolean(); deterministic = reader.ReadBoolean(); publicSign = reader.ReadBoolean(); // REVIEW: What should I do with these. are these service required when compilation is built ourselves, not through // compiler. xmlReferenceResolver = XmlFileResolver.Default; sourceReferenceResolver = SourceFileResolver.Default; metadataReferenceResolver = null; assemblyIdentityComparer = DesktopAssemblyIdentityComparer.Default; strongNameProvider = new DesktopStrongNameProvider(); }