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