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