53 references to CompilerOptions
Microsoft.VisualStudio.LanguageServices.CSharp (53)
ProjectSystemShim\CSharpProjectShim.ICSCompilerConfig.cs (13)
19return (int)CompilerOptions.LARGEST_OPTION_ID - 1; 22public void GetOptionInfoAt(int index, out CompilerOptions optionID, out string switchName, out string switchDescription, out uint flags) 25public void GetOptionInfoAtEx(int index, out CompilerOptions optionID, out string shortSwitchName, out string longSwitchName, out string descriptiveSwitchName, out string switchDescription, out uint flags) 30ProjectSystemProjectOptionsProcessor[CompilerOptions.OPTID_CCSYMBOLS] = string.Empty; 31ProjectSystemProjectOptionsProcessor[CompilerOptions.OPTID_KEYFILE] = string.Empty; 32ProjectSystemProjectOptionsProcessor[CompilerOptions.OPTID_NOWARNLIST] = string.Empty; 33ProjectSystemProjectOptionsProcessor[CompilerOptions.OPTID_WARNASERRORLIST] = string.Empty; 34ProjectSystemProjectOptionsProcessor[CompilerOptions.OPTID_WARNNOTASERRORLIST] = string.Empty; 35ProjectSystemProjectOptionsProcessor[CompilerOptions.OPTID_UNSAFE] = false; 36ProjectSystemProjectOptionsProcessor[CompilerOptions.OPTID_XML_DOCFILE] = string.Empty; 39public int SetOption(CompilerOptions optionID, HACK_VariantStructure value) 43if (optionID == CompilerOptions.OPTID_COMPATIBILITY) 56public void GetOption(CompilerOptions optionID, IntPtr variant)
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (5)
64return OnImportAddedEx(filename, project, CompilerOptions.OPTID_IMPORTS); 67public int OnImportAddedEx(string filename, string project, CompilerOptions optionID) 69if (optionID is not CompilerOptions.OPTID_IMPORTS and not CompilerOptions.OPTID_IMPORTSUSINGNOPIA) 74var embedInteropTypes = optionID == CompilerOptions.OPTID_IMPORTSUSINGNOPIA;
ProjectSystemShim\CSharpProjectShim.ICSharpVenusProjectSite.cs (3)
18=> AddReferenceToCodeDirectoryEx(assemblyFileName, project, CompilerOptions.OPTID_IMPORTS); 53public void AddReferenceToCodeDirectoryEx(string assemblyFileName, ICSharpProjectRoot projectRoot, CompilerOptions optionID) 57ProjectSystemProject.AddProjectReference(new ProjectReference(projectSite.ProjectSystemProject.Id, embedInteropTypes: optionID == CompilerOptions.OPTID_IMPORTSUSINGNOPIA));
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (26)
24private readonly object[] _options = new object[(int)CompilerOptions.LARGEST_OPTION_ID]; 34public object this[CompilerOptions compilerOption] 74var warningsAreErrors = GetNullableBooleanOption(CompilerOptions.OPTID_WARNINGSAREERRORS); 104foreach (var diagnosticID in ParseWarningCodes(CompilerOptions.OPTID_WARNASERRORLIST)) 109foreach (var diagnosticID in ParseWarningCodes(CompilerOptions.OPTID_WARNNOTASERRORLIST)) 121foreach (var diagnosticID in ParseWarningCodes(CompilerOptions.OPTID_NOWARNLIST)) 126if (!Enum.TryParse(GetStringOption(CompilerOptions.OPTID_PLATFORM, ""), ignoreCase: true, result: out Platform platform)) 131if (!int.TryParse(GetStringOption(CompilerOptions.OPTID_WARNINGLEVEL, defaultValue: ""), out var warningLevel)) 138return ((CSharpCompilationOptions)compilationOptions).WithAllowUnsafe(GetBooleanOption(CompilerOptions.OPTID_UNSAFE)) 139.WithOverflowChecks(GetBooleanOption(CompilerOptions.OPTID_CHECKED)) 140.WithCryptoKeyContainer(GetStringOption(CompilerOptions.OPTID_KEYNAME, defaultValue: null)) 141.WithCryptoKeyFile(GetFilePathRelativeOption(CompilerOptions.OPTID_KEYFILE)) 142.WithDelaySign(GetNullableBooleanOption(CompilerOptions.OPTID_DELAYSIGN)) 145.WithModuleName(GetStringOption(CompilerOptions.OPTID_MODULEASSEMBLY, defaultValue: null)) 146.WithOptimizationLevel(GetBooleanOption(CompilerOptions.OPTID_OPTIMIZATIONS) ? OptimizationLevel.Release : OptimizationLevel.Debug) 156private IEnumerable<string> ParseWarningCodes(CompilerOptions compilerOptions) 159compilerOptions is CompilerOptions.OPTID_NOWARNLIST or 160CompilerOptions.OPTID_WARNASERRORLIST or 161CompilerOptions.OPTID_WARNNOTASERRORLIST); 175private bool? GetNullableBooleanOption(CompilerOptions optionID) 178private bool GetBooleanOption(CompilerOptions optionID) 181private string? GetFilePathRelativeOption(CompilerOptions optionID) 201private string? GetStringOption(CompilerOptions optionID, string? defaultValue) 217var symbols = GetStringOption(CompilerOptions.OPTID_CCSYMBOLS, defaultValue: "").Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); 222if (GetStringOption(CompilerOptions.OPTID_XML_DOCFILE, defaultValue: null) != null) 227LanguageVersionFacts.TryParse(GetStringOption(CompilerOptions.OPTID_COMPATIBILITY, defaultValue: ""), out var languageVersion);
ProjectSystemShim\Interop\ICSCompilerConfig.cs (4)
26out CompilerOptions optionID, 32out CompilerOptions optionID, 43int SetOption(CompilerOptions optionID, HACK_VariantStructure value); 44void GetOption(CompilerOptions optionID, IntPtr variant);
ProjectSystemShim\Interop\ICSharpProjectSite.cs (1)
122int OnImportAddedEx([MarshalAs(UnmanagedType.LPWStr)] string filename, [MarshalAs(UnmanagedType.LPWStr)] string project, CompilerOptions optionID);
ProjectSystemShim\Interop\ICSharpVenusProjectSite.cs (1)
66void AddReferenceToCodeDirectoryEx([MarshalAs(UnmanagedType.LPWStr)] string assemblyFileName, ICSharpProjectRoot project, CompilerOptions optionID);