19 references to TryParse
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
CSharpCompiler.cs (1)
223else if (LanguageVersionFacts.TryParse(dependencyContextOptions.LanguageVersion, out var languageVersion))
Microsoft.CodeAnalysis.CSharp (2)
CommandLine\CSharpCommandLineParser.cs (1)
220else if (!LanguageVersionFacts.TryParse(value, out languageVersion))
Parser\DirectiveParser.cs (1)
339LanguageVersionFacts.TryParse(errorText.Substring(versionMarker.Length), out var languageVersion))
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (3)
74LanguageVersionFacts.TryParse(requiredVersion, out var required)) 92Contract.ThrowIfFalse(LanguageVersionFacts.TryParse(newVersion, out var parsedNewVersion)); 106Contract.ThrowIfFalse(LanguageVersionFacts.TryParse(newVersion, out var parsedNewVersion));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
1854Assert.Equal(success, LanguageVersionFacts.TryParse(input, out var version)); 1866Assert.True(LanguageVersionFacts.TryParse("ISO-1", out var version));
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (3)
74LanguageVersionFacts.TryParse(requiredVersion, out var required)) 92Contract.ThrowIfFalse(LanguageVersionFacts.TryParse(newVersion, out var parsedNewVersion)); 106Contract.ThrowIfFalse(LanguageVersionFacts.TryParse(newVersion, out var parsedNewVersion));
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.cs (1)
38!LanguageVersionFacts.TryParse(langVersionString, out var langVersion))
Microsoft.CodeAnalysis.Rebuild (1)
CSharpCompilationFactory.cs (1)
71CS.LanguageVersionFacts.TryParse(langVersionString, out var langVersion);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
311if (CodeAnalysis.CSharp.LanguageVersionFacts.TryParse(languageVersionAttribute.Value, out var languageVersion))
Microsoft.DotNet.GenFacades (2)
NotSupportedAssemblyGenerator.cs (1)
74if (!String.IsNullOrEmpty(LangVersion) && !LanguageVersionFacts.TryParse(LangVersion, out languageVersion))
TypeParser.cs (1)
21if (!string.IsNullOrEmpty(langVersion) && !LanguageVersionFacts.TryParse(langVersion, out languageVersion))
Microsoft.VisualStudio.LanguageServices.CSharp (3)
LanguageService\CSharpEditorFactory.cs (1)
36LanguageVersionFacts.TryParse(langVersionString, out var langVersion))
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
227LanguageVersionFacts.TryParse(GetStringOption(CompilerOptions.OPTID_COMPATIBILITY, defaultValue: ""), out var languageVersion);
Utilities\CSharpParseOptionsChangingService.cs (1)
51Contract.ThrowIfFalse(LanguageVersionFacts.TryParse(maxLangVersion, out var parsedMaxLanguageVersion));