// Expects correct arguments. internal CompilationOptions( OutputKind outputKind, string moduleName, string mainTypeName, string scriptClassName, string cryptoKeyContainer, string cryptoKeyFile, bool?delaySign, bool optimize, bool checkOverflow, int fileAlignment, ulong baseAddress, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, bool highEntropyVirtualAddressSpace, DebugInformationKind debugInformationKind, SubsystemVersion subsystemVersion, bool concurrentBuild, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, MetadataReferenceProvider metadataReferenceProvider, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions) { Initialize( 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); }
// Expects correct arguments. internal CompilationOptions( OutputKind outputKind, bool reportSuppressedDiagnostics, string moduleName, string mainTypeName, string scriptClassName, string cryptoKeyContainer, string cryptoKeyFile, ImmutableArray <byte> cryptoPublicKey, bool?delaySign, OptimizationLevel optimizationLevel, bool checkOverflow, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, ImmutableDictionary <string, ReportDiagnostic> specificDiagnosticOptions, bool concurrentBuild, bool deterministic, bool extendedCustomDebugInformation, bool debugPlusMode, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions) { this.OutputKind = outputKind; this.ModuleName = moduleName; this.MainTypeName = mainTypeName; this.ScriptClassName = scriptClassName ?? WellKnownMemberNames.DefaultScriptClassName; this.CryptoKeyContainer = cryptoKeyContainer; this.CryptoKeyFile = cryptoKeyFile; this.CryptoPublicKey = cryptoPublicKey.NullToEmpty(); this.DelaySign = delaySign; this.CheckOverflow = checkOverflow; this.Platform = platform; this.GeneralDiagnosticOption = generalDiagnosticOption; this.WarningLevel = warningLevel; this.SpecificDiagnosticOptions = specificDiagnosticOptions; this.ReportSuppressedDiagnostics = reportSuppressedDiagnostics; this.OptimizationLevel = optimizationLevel; this.ConcurrentBuild = concurrentBuild; this.Deterministic = deterministic; this.ExtendedCustomDebugInformation = extendedCustomDebugInformation; this.DebugPlusMode = debugPlusMode; this.XmlReferenceResolver = xmlReferenceResolver; this.SourceReferenceResolver = sourceReferenceResolver; this.MetadataReferenceResolver = metadataReferenceResolver; this.StrongNameProvider = strongNameProvider; this.AssemblyIdentityComparer = assemblyIdentityComparer ?? AssemblyIdentityComparer.Default; this.MetadataImportOptions = metadataImportOptions; _lazyErrors = new Lazy <ImmutableArray <Diagnostic> >(() => { var builder = ArrayBuilder <Diagnostic> .GetInstance(); ValidateOptions(builder); return(builder.ToImmutableAndFree()); }); }
public DocumentationCommentIncludeCache(XmlReferenceResolver resolver) : base(Size, key => MakeValue(resolver, key), KeyHashCode, KeyValueEquality) { CacheMissCount = 0; }
private static KeyValuePair <string, XDocument> MakeValue(XmlReferenceResolver resolver, string resolvedPath) { CacheMissCount++; using (Stream stream = resolver.OpenReadChecked(resolvedPath)) { using (XmlReader reader = XmlReader.Create(stream, s_xmlSettings)) { var document = XDocument.Load(reader, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); return(KeyValuePairUtil.Create(resolvedPath, document)); } } }
protected abstract CompilationOptions CommonWithXmlReferenceResolver(XmlReferenceResolver resolver);
public CompilationOptions WithXmlReferenceResolver(XmlReferenceResolver resolver) { return CommonWithXmlReferenceResolver(resolver); }
// Expects correct arguments. internal CompilationOptions( OutputKind outputKind, bool reportSuppressedDiagnostics, string moduleName, string mainTypeName, string scriptClassName, string cryptoKeyContainer, string cryptoKeyFile, ImmutableArray<byte> cryptoPublicKey, bool? delaySign, OptimizationLevel optimizationLevel, bool checkOverflow, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, ImmutableDictionary<string, ReportDiagnostic> specificDiagnosticOptions, bool concurrentBuild, bool extendedCustomDebugInformation, bool debugPlusMode, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions) { this.OutputKind = outputKind; this.ModuleName = moduleName; this.MainTypeName = mainTypeName; this.ScriptClassName = scriptClassName ?? WellKnownMemberNames.DefaultScriptClassName; this.CryptoKeyContainer = cryptoKeyContainer; this.CryptoKeyFile = cryptoKeyFile; this.CryptoPublicKey = cryptoPublicKey.NullToEmpty(); this.DelaySign = delaySign; this.CheckOverflow = checkOverflow; this.Platform = platform; this.GeneralDiagnosticOption = generalDiagnosticOption; this.WarningLevel = warningLevel; this.SpecificDiagnosticOptions = specificDiagnosticOptions; this.ReportSuppressedDiagnostics = reportSuppressedDiagnostics; this.OptimizationLevel = optimizationLevel; this.ConcurrentBuild = concurrentBuild; this.ExtendedCustomDebugInformation = extendedCustomDebugInformation; this.DebugPlusMode = debugPlusMode; this.XmlReferenceResolver = xmlReferenceResolver; this.SourceReferenceResolver = sourceReferenceResolver; this.MetadataReferenceResolver = metadataReferenceResolver; this.StrongNameProvider = strongNameProvider; this.AssemblyIdentityComparer = assemblyIdentityComparer ?? AssemblyIdentityComparer.Default; this.MetadataImportOptions = metadataImportOptions; _lazyErrors = new Lazy<ImmutableArray<Diagnostic>>(() => { var builder = ArrayBuilder<Diagnostic>.GetInstance(); ValidateOptions(builder); return builder.ToImmutableAndFree(); }); }
protected abstract CompilationOptions CommonWithXmlReferenceResolver(XmlReferenceResolver resolver);
public CompilationOptions WithXmlReferenceResolver(XmlReferenceResolver resolver) { return(CommonWithXmlReferenceResolver(resolver)); }
internal void Initialize( OutputKind outputKind, string moduleName, string mainTypeName, string scriptClassName, string cryptoKeyContainer, string cryptoKeyFile, bool?delaySign, bool optimize, bool checkOverflow, int fileAlignment, ulong baseAddress, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable <KeyValuePair <string, ReportDiagnostic> > specificDiagnosticOptions, bool highEntropyVirtualAddressSpace, DebugInformationKind debugInformationKind, SubsystemVersion subsystemVersion, bool concurrentBuild, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, MetadataReferenceProvider metadataReferenceProvider, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions) { this.OutputKind = outputKind; this.ModuleName = moduleName; this.MainTypeName = mainTypeName; this.ScriptClassName = scriptClassName; this.CryptoKeyContainer = cryptoKeyContainer; this.CryptoKeyFile = cryptoKeyFile; this.DelaySign = delaySign; this.CheckOverflow = checkOverflow; this.FileAlignment = fileAlignment; this.BaseAddress = baseAddress; this.Platform = platform; this.GeneralDiagnosticOption = generalDiagnosticOption; this.WarningLevel = warningLevel; this.SpecificDiagnosticOptions = specificDiagnosticOptions.ToImmutableDictionaryOrEmpty(); this.HighEntropyVirtualAddressSpace = highEntropyVirtualAddressSpace; this.DebugInformationKind = debugInformationKind; this.Optimize = optimize; this.ConcurrentBuild = concurrentBuild; this.SubsystemVersion = subsystemVersion; this.XmlReferenceResolver = xmlReferenceResolver; this.SourceReferenceResolver = sourceReferenceResolver; this.MetadataReferenceResolver = metadataReferenceResolver; this.MetadataReferenceProvider = metadataReferenceProvider; this.StrongNameProvider = strongNameProvider; this.AssemblyIdentityComparer = assemblyIdentityComparer ?? AssemblyIdentityComparer.Default; this.MetadataImportOptions = metadataImportOptions; this.lazyErrors = new Lazy <ImmutableArray <Diagnostic> >(() => { var builder = ArrayBuilder <Diagnostic> .GetInstance(); ValidateOptions(builder); return(builder.ToImmutableAndFree()); }); }
// Expects correct arguments. internal CompilationOptions( OutputKind outputKind, string moduleName, string mainTypeName, string scriptClassName, string cryptoKeyContainer, string cryptoKeyFile, bool? delaySign, OptimizationLevel optimizationLevel, bool checkOverflow, int fileAlignment, ulong baseAddress, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, ImmutableDictionary<string, ReportDiagnostic> specificDiagnosticOptions, bool highEntropyVirtualAddressSpace, SubsystemVersion subsystemVersion, bool concurrentBuild, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, MetadataReferenceProvider metadataReferenceProvider, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions, ImmutableArray<string> features) { this.OutputKind = outputKind; this.ModuleName = moduleName; this.MainTypeName = mainTypeName; this.ScriptClassName = scriptClassName; this.CryptoKeyContainer = cryptoKeyContainer; this.CryptoKeyFile = cryptoKeyFile; this.DelaySign = delaySign; this.CheckOverflow = checkOverflow; this.FileAlignment = fileAlignment; this.BaseAddress = baseAddress; this.Platform = platform; this.GeneralDiagnosticOption = generalDiagnosticOption; this.WarningLevel = warningLevel; this.SpecificDiagnosticOptions = specificDiagnosticOptions; this.HighEntropyVirtualAddressSpace = highEntropyVirtualAddressSpace; this.OptimizationLevel = optimizationLevel; this.ConcurrentBuild = concurrentBuild; this.SubsystemVersion = subsystemVersion; this.XmlReferenceResolver = xmlReferenceResolver; this.SourceReferenceResolver = sourceReferenceResolver; this.MetadataReferenceResolver = metadataReferenceResolver; this.MetadataReferenceProvider = metadataReferenceProvider; this.StrongNameProvider = strongNameProvider; this.AssemblyIdentityComparer = assemblyIdentityComparer ?? AssemblyIdentityComparer.Default; this.MetadataImportOptions = metadataImportOptions; this.Features = features; this.lazyErrors = new Lazy<ImmutableArray<Diagnostic>>(() => { var builder = ArrayBuilder<Diagnostic>.GetInstance(); ValidateOptions(builder); return builder.ToImmutableAndFree(); }); }
// Expects correct arguments. internal CompilationOptions( OutputKind outputKind, string moduleName, string mainTypeName, string scriptClassName, string cryptoKeyContainer, string cryptoKeyFile, bool? delaySign, bool optimize, bool checkOverflow, int fileAlignment, ulong baseAddress, Platform platform, ReportDiagnostic generalDiagnosticOption, int warningLevel, IEnumerable<KeyValuePair<string, ReportDiagnostic>> specificDiagnosticOptions, bool highEntropyVirtualAddressSpace, DebugInformationKind debugInformationKind, SubsystemVersion subsystemVersion, bool concurrentBuild, XmlReferenceResolver xmlReferenceResolver, SourceReferenceResolver sourceReferenceResolver, MetadataReferenceResolver metadataReferenceResolver, MetadataReferenceProvider metadataReferenceProvider, AssemblyIdentityComparer assemblyIdentityComparer, StrongNameProvider strongNameProvider, MetadataImportOptions metadataImportOptions) { Initialize( 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); }