50 references to Instance
Microsoft.CodeAnalysis.CSharp (50)
CommandLine\CSharpCommandLineParser.cs (9)
30: base(CSharp.MessageProvider.Instance, isScriptCommandLineParser) 1761outputDiagnostics.Add(Diagnostic.Create(CSharp.MessageProvider.Instance, (int)ErrorCode.WRN_DefineIdentifierRequired, valueMemory.ToString())); 1793outputDiagnostics.Add(Diagnostic.Create(CSharp.MessageProvider.Instance, (int)ErrorCode.WRN_DefineIdentifierRequired, id)); 2108ids.Add(CSharp.MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotation)); 2109ids.Add(CSharp.MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_MissingNonNullTypesContextForAnnotationInGeneratedCode)); 2118ids.Add(CSharp.MessageProvider.Instance.GetIdForErrorCode(number)); 2167diagnostics.Add(Diagnostic.Create(CSharp.MessageProvider.Instance, (int)errorCode)); 2172diagnostics.Add(Diagnostic.Create(CSharp.MessageProvider.Instance, (int)errorCode, arguments)); 2182warningOptions.TryGetValue(CSharp.MessageProvider.Instance.GetIdForErrorCode(code), out value);
Compilation\CSharpCompilation.cs (1)
437CSharp.MessageProvider.Instance,
Compilation\CSharpCompilerDiagnosticAnalyzer.cs (1)
19=> CodeAnalysis.CSharp.MessageProvider.Instance;
Compilation\CSharpDiagnosticFilter.cs (2)
77specificDiagnosticOptions.Keys.Contains(CSharp.MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_ALinkWarn))) 82CSharp.MessageProvider.Instance.GetIdForErrorCode((int)ErrorCode.WRN_ALinkWarn),
CSharpCompilationOptions.cs (12)
664ValidateOptions(builder, MessageProvider.Instance); 671builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_NoMainOnDLL)); 676builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(MainTypeName), MainTypeName)); 682builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadPlatformType, Platform.ToString())); 687MetadataHelpers.CheckAssemblyOrModuleName(ModuleName, MessageProvider.Instance, (int)ErrorCode.ERR_BadModuleName, builder); 692builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(OutputKind), OutputKind.ToString())); 697builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(OptimizationLevel), OptimizationLevel.ToString())); 702builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(ScriptClassName), ScriptClassName ?? "null")); 707builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(WarningLevel), WarningLevel)); 712builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(Usings), Usings.Where(u => !u.IsValidClrNamespaceName()).First() ?? "null")); 717builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadPrefer32OnLib)); 722builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(MetadataImportOptions), MetadataImportOptions.ToString()));
CSharpParseOptions.cs (4)
235ValidateOptions(builder, MessageProvider.Instance); 240builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadLanguageVersion, LanguageVersion.ToString())); 249builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_InvalidPreprocessingSymbol, "null")); 253builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_InvalidPreprocessingSymbol, symbol));
Emitter\EditAndContinue\CSharpDefinitionMap.cs (1)
46=> CSharp.MessageProvider.Instance;
Errors\DiagnosticInfoWithSymbols.cs (2)
17: base(CSharp.MessageProvider.Instance, (int)errorCode, arguments) 23: base(CSharp.MessageProvider.Instance, isWarningAsError, (int)errorCode, arguments)
Errors\ErrorFacts.cs (1)
93return MessageProvider.Instance.GetIdForErrorCode((int)errorCode);
Errors\LazyDiagnosticInfo.cs (1)
14: base(CSharp.MessageProvider.Instance, (int)ErrorCode.Unknown)
Errors\SyntaxDiagnosticInfo.cs (1)
17: base(CSharp.MessageProvider.Instance, (int)code, args)
FlowAnalysis\NullableWalker.cs (1)
2640Debug.Assert(ErrorFacts.NullableWarnings.Contains(MessageProvider.Instance.GetIdForErrorCode((int)errorCode)));
SourceGeneration\CSharpGeneratorDriver.cs (1)
75internal override CommonMessageProvider MessageProvider => CSharp.MessageProvider.Instance;
Symbols\ObsoleteAttributeHelpers.cs (3)
194return new CustomObsoleteDiagnosticInfo(MessageProvider.Instance, (int)ErrorCode.WRN_Experimental, data, 199return new CustomObsoleteDiagnosticInfo(MessageProvider.Instance, (int)ErrorCode.WRN_ExperimentalWithMessage, data, 222return new CustomObsoleteDiagnosticInfo(MessageProvider.Instance, (int)errorCode, data, arguments);
Symbols\ReferenceManager.cs (1)
65get { return CSharp.MessageProvider.Instance; }
Symbols\Source\FieldSymbolWithAttributesAndModifiers.cs (1)
203MarshalAsAttributeDecoder<FieldWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>.Decode(ref arguments, AttributeTargets.Field, MessageProvider.Instance);
Symbols\Source\SourceAssemblySymbol.cs (3)
148_lazyStrongNameKeys = StrongNameKeys.Create(compilation.Options.CryptoPublicKey, privateKey: null, hasCounterSignature: false, MessageProvider.Instance); 501return StrongNameKeys.Create(keyFile, MessageProvider.Instance); 527return StrongNameKeys.Create(DeclaringCompilation.Options.StrongNameProvider, keyFile, keyContainer, hasCounterSignature, MessageProvider.Instance);
Symbols\Source\SourceComplexParameterSymbol.cs (1)
788MarshalAsAttributeDecoder<ParameterWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>.Decode(ref arguments, AttributeTargets.Parameter, MessageProvider.Instance);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
539AttributeData.DecodeMethodImplAttribute<MethodWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>(ref arguments, MessageProvider.Instance); 789MarshalAsAttributeDecoder<ReturnTypeWellKnownAttributeData, AttributeSyntax, CSharpAttributeData, AttributeLocation>.Decode(ref arguments, AttributeTargets.ReturnValue, MessageProvider.Instance);
Symbols\Source\SourceNamedTypeSymbol.cs (1)
1134ref arguments, this.DefaultMarshallingCharSet, defaultAutoLayoutSize: 0, messageProvider: MessageProvider.Instance);
Syntax\CSharpPragmaWarningStateMap.cs (1)
128errorId = MessageProvider.Instance.GetIdForErrorCode((int)token.Value!);