63 references to ToDisplayString
Microsoft.CodeAnalysis.CSharp (21)
Binder\Binder_Expressions.cs (1)
1445diagnostics.Add(ErrorCode.WRN_FieldIsAmbiguous, node, Compilation.LanguageVersion.ToDisplayString());
Binder\Binder_InterpolatedString.cs (1)
85this.Compilation.LanguageVersion.ToDisplayString(),
Binder\Binder_Patterns.cs (1)
778Compilation.LanguageVersion.ToDisplayString(),
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1273binder.Compilation.LanguageVersion.ToDisplayString(),
CommandLine\CSharpCommandLineParser.cs (1)
1539"nullable", nullableContextOptions, parseOptions.LanguageVersion.ToDisplayString(),
CommandLine\CSharpCompiler.cs (3)
291consoleOutput.WriteLine($"{v.ToDisplayString()} (default)"); 295consoleOutput.WriteLine($"{v.ToDisplayString()} (latest)"); 299consoleOutput.WriteLine(v.ToDisplayString());
Compilation\CSharpCompilation.cs (2)
2975nameof(Options.NullableContextOptions), Options.NullableContextOptions, LanguageVersion.ToDisplayString(), 4749writeValue(CompilationOptionNames.LanguageVersion, LanguageVersion.ToDisplayString());
LanguageVersion.cs (1)
352public override string ToString() => Version.ToDisplayString();
Parser\DirectiveParser.cs (3)
329var displayLanguageVersion = specified == effective ? specified.ToDisplayString() : $"{specified.ToDisplayString()} ({effective.ToDisplayString()})";
Symbols\Source\ModifierUtils.cs (1)
198var availableVersionArgument = availableVersion.ToDisplayString();
Symbols\Source\SourceMemberContainerSymbol.cs (1)
4465languageVersion.ToDisplayString(),
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
175var availableVersionArgument = availableVersion.ToDisplayString();
Symbols\Synthesized\SynthesizedBackingFieldSymbol.cs (1)
180languageVersion.ToDisplayString(),
Symbols\TypeSymbol.cs (3)
1021availableVersion.GetValueOrDefault().ToDisplayString(), new CSharpRequiredLanguageVersion(requiredVersion)); 1647availableVersion.GetValueOrDefault().ToDisplayString(), 1748availableVersion.GetValueOrDefault().ToDisplayString(),
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (1)
113parseOptions.SpecifiedLanguageVersion.ToDisplayString() != newVersion &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.UnitTests (7)
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (7)
153#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|] 201#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|] 266#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|] 337#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|] 351#error version:[|{{LanguageVersion.CSharp8.ToDisplayString()}}|] 610var defaultVersion = LanguageVersion.Default.MapSpecifiedToEffectiveVersion().ToDisplayString(); 664var defaultEffectiveVersion = LanguageVersion.Default.MapSpecifiedToEffectiveVersion().ToDisplayString();
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
1734Enum.GetValues(typeof(LanguageVersion)).Cast<LanguageVersion>().Select(v => v.ToDisplayString())); 1881.Select(v => v.ToDisplayString());
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
34<Project Language=""C#"" AssemblyName=""Assembly1"" CommonReferences=""true"" LanguageVersion=""{languageVersion.ToDisplayString()}"">
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (2)
2839<Project Language=""C#"" AssemblyName=""Assembly1"" CommonReferences=""true"" LanguageVersion=""{TestOptions.Regular11.LanguageVersion.ToDisplayString()}""> 2878<Project Language=""C#"" AssemblyName=""Assembly1"" CommonReferences=""true"" LanguageVersion=""{TestOptions.Regular11.LanguageVersion.ToDisplayString()}"">
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
PDB\CSharpDeterministicBuildCompilationTests.cs (3)
148parseOptions.LanguageVersion.MapSpecifiedToEffectiveVersion().ToDisplayString(), 211parseOptions.LanguageVersion.MapSpecifiedToEffectiveVersion().ToDisplayString(), 272parseOptions.LanguageVersion.MapSpecifiedToEffectiveVersion().ToDisplayString(),
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\UpgradeProject\CSharpUpgradeProjectCodeFixProvider.cs (1)
113parseOptions.SpecifiedLanguageVersion.ToDisplayString() != newVersion &&
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
src\Analyzers\CSharp\Tests\UpgradeProject\UpgradeProjectTests.cs (7)
153#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|] 201#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|] 266#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|] 337#error version:[|{{LanguageVersion.Latest.MapSpecifiedToEffectiveVersion().ToDisplayString()}}|] 351#error version:[|{{LanguageVersion.CSharp8.ToDisplayString()}}|] 610var defaultVersion = LanguageVersion.Default.MapSpecifiedToEffectiveVersion().ToDisplayString(); 664var defaultEffectiveVersion = LanguageVersion.Default.MapSpecifiedToEffectiveVersion().ToDisplayString();
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
CommandLineRunnerTests.cs (1)
770.Select(v => v.ToDisplayString());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities2 (1)
Intellisense\TestStateFactory.vb (1)
19<Project Language="C#" CommonReferences="true" LanguageVersion=<%= languageVersion.ToDisplayString() %>>
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (6)
IntelliSense\CSharpCompletionCommandHandlerTests.vb (3)
96<Project Language="C#" CommonReferences="true" LanguageVersion=<%= LanguageVersion.CSharp12.ToDisplayString() %>> 130<Project Language="C#" CommonReferences="true" LanguageVersion=<%= LanguageVersion.CSharp12.ToDisplayString() %>> 11600<Project Language="C#" AssemblyName="TestAssembly" CommonReferencesPortable="true" LanguageVersion=<%= LanguageVersion.CSharp12.ToDisplayString() %>>
Simplification\CastSimplificationTests.vb (3)
1348<Project Language="C#" CommonReferences="true" LanguageVersion=<%= languageVersion.ToDisplayString() %>> 1390<Project Language="C#" CommonReferences="true" LanguageVersion=<%= languageVersion.ToDisplayString() %>> 1432<Project Language="C#" CommonReferences="true" LanguageVersion=<%= languageVersion.ToDisplayString() %>>
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestWorkspace_XmlCreation.cs (1)
108return new XAttribute(LanguageVersionAttributeName, CodeAnalysis.CSharp.LanguageVersionFacts.ToDisplayString(csharpOptions.LanguageVersion));
Microsoft.Extensions.Logging.Generators (2)
LoggerMessageGenerator.Parser.cs (2)
597Diag(DiagnosticDescriptors.LoggingUnsupportedLanguageVersion, null, version.ToDisplayString(), LanguageVersion.CSharp8.ToDisplayString());
Microsoft.Extensions.Options.SourceGeneration (2)
Parser.cs (2)
154Diag(DiagDescriptors.OptionsUnsupportedLanguageVersion, null, version.ToDisplayString(), LanguageVersion.CSharp8.ToDisplayString());
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Utilities\CSharpParseOptionsChangingService.cs (1)
61LanguageVersionFacts.ToDisplayString(csharpOptions.SpecifiedLanguageVersion));
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\CPS\AdditionalPropertiesTests.cs (1)
60cpsProject.SetProperty(BuildPropertyNames.MaxSupportedLangVersion, maxSupportedLangVersion?.ToDisplayString());
ProjectSystemShim\LegacyProject\CSharpCompilerOptionsTests.cs (1)
185"MaxSupportedLangVersion", null, (uint)_PersistStorageType.PST_PROJECT_FILE, maxSupportedLangVersion?.ToDisplayString())));
System.Text.Json.SourceGeneration (2)
JsonSourceGenerator.Parser.cs (2)
122ReportDiagnostic(DiagnosticDescriptors.JsonUnsupportedLanguageVersion, _contextClassLocation, langVersion?.ToDisplayString(), MinimumSupportedLanguageVersion.ToDisplayString());