43 references to Create
Microsoft.CodeAnalysis (14)
CommandLine\CommandLineParser.cs (10)
434
errors.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, invalidPath));
452
errors.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, invalidPath));
477
errors.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, invalidPath));
559
diagnostics.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, path));
569
diagnostics.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, path));
641
diagnostics.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.ERR_OpenResponseFile, fullPath));
1094
errors.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, path));
1144
errors.Add(Diagnostic.
Create
(MessageProvider, (int)MessageProvider.FTL_InvalidInputFileName, path));
1280
errors.Add(Diagnostic.
Create
(MessageProvider, (int)MessageProvider.FTL_InvalidInputFileName, path));
1300
errors.Add(Diagnostic.
Create
(MessageProvider, (int)MessageProvider.ERR_FileNotFound, path));
CommandLine\CommonCompiler.cs (1)
322
diagnostics.Add(Diagnostic.
Create
(
RuleSet\RuleSet.cs (3)
318
diagnosticsOpt.Add(Diagnostic.
Create
(messageProviderOpt, messageProviderOpt.ERR_CantReadRulesetFile, resolvedPath, e.Message));
327
diagnosticsOpt.Add(Diagnostic.
Create
(messageProviderOpt, messageProviderOpt.ERR_CantReadRulesetFile, resolvedPath, new CodeAnalysisResourcesLocalizableErrorArgument(nameof(CodeAnalysisResources.FileNotFound))));
334
diagnosticsOpt.Add(Diagnostic.
Create
(messageProviderOpt, messageProviderOpt.ERR_CantReadRulesetFile, resolvedPath, e.Message));
Microsoft.CodeAnalysis.CSharp (14)
CommandLine\CSharpCommandLineParser.cs (3)
1745
outputDiagnostics.Add(Diagnostic.
Create
(CSharp.MessageProvider.Instance, (int)ErrorCode.WRN_DefineIdentifierRequired, valueMemory.ToString()));
1777
outputDiagnostics.Add(Diagnostic.
Create
(CSharp.MessageProvider.Instance, (int)ErrorCode.WRN_DefineIdentifierRequired, id));
2154
diagnostics.Add(Diagnostic.
Create
(CSharp.MessageProvider.Instance, (int)errorCode, arguments));
CSharpCompilationOptions.cs (8)
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()));
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"));
722
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(MetadataImportOptions), MetadataImportOptions.ToString()));
CSharpParseOptions.cs (3)
185
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadLanguageVersion, LanguageVersion.ToString()));
194
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_InvalidPreprocessingSymbol, "null"));
198
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_InvalidPreprocessingSymbol, symbol));
Microsoft.CodeAnalysis.UnitTests (2)
Diagnostics\CompilationWithAnalyzersTests.cs (2)
43
var d1 = SimpleDiagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.WRN_AlignmentMagnitude, "1", "2");
44
var d2 = SimpleDiagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.WRN_AlwaysNull, "1");
Microsoft.CodeAnalysis.VisualBasic (13)
CommandLine\VisualBasicCommandLineParser.vb (2)
1782
diagnosticBuilder.Add(Diagnostic.
Create
(VisualBasic.MessageProvider.Instance, ERRID.ERR_InvalidPreprocessorConstantType, symbol.Key, symbol.Value.GetType()))
2263
diagnostics.Add(Diagnostic.
Create
(VisualBasic.MessageProvider.Instance, CInt(errorCode), arguments))
VisualBasicCompilationOptions.vb (9)
1035
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(Platform), Platform.ToString()))
1043
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(OutputKind), OutputKind.ToString()))
1047
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(OptimizationLevel), OptimizationLevel.ToString()))
1051
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(ScriptClassName), If(ScriptClassName, "Nothing")))
1055
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(MainTypeName), MainTypeName))
1059
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(RootNamespace), RootNamespace))
1063
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(OptionStrict), OptionStrict.ToString()))
1068
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_LibAnycpu32bitPreferredConflict, NameOf(Platform), Platform.ToString()))
1072
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(MetadataImportOptions), MetadataImportOptions.ToString()))
VisualBasicParseOptions.vb (2)
250
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_BadLanguageVersion, LanguageVersion.ToString))
264
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, ERRID.ERR_InvalidPreprocessorConstantType, symbol.Key, symbol.Value.GetType))