29 references to Create
Microsoft.CodeAnalysis (14)
CommandLine\CommandLineParser.cs (10)
445
errors.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, invalidPath));
463
errors.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, invalidPath));
488
errors.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, invalidPath));
570
diagnostics.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, path));
580
diagnostics.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, path));
651
diagnostics.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.ERR_OpenResponseFile, fullPath));
1124
errors.Add(Diagnostic.
Create
(_messageProvider, _messageProvider.FTL_InvalidInputFileName, path));
1174
errors.Add(Diagnostic.
Create
(MessageProvider, (int)MessageProvider.FTL_InvalidInputFileName, path));
1279
errors.Add(Diagnostic.
Create
(MessageProvider, (int)MessageProvider.FTL_InvalidInputFileName, path));
1299
errors.Add(Diagnostic.
Create
(MessageProvider, (int)MessageProvider.ERR_FileNotFound, path));
CommandLine\CommonCompiler.cs (1)
321
diagnostics.Add(Diagnostic.
Create
(
RuleSet\RuleSet.cs (3)
317
diagnosticsOpt.Add(Diagnostic.
Create
(messageProviderOpt, messageProviderOpt.ERR_CantReadRulesetFile, resolvedPath, e.Message));
326
diagnosticsOpt.Add(Diagnostic.
Create
(messageProviderOpt, messageProviderOpt.ERR_CantReadRulesetFile, resolvedPath, new CodeAnalysisResourcesLocalizableErrorArgument(nameof(CodeAnalysisResources.FileNotFound))));
333
diagnosticsOpt.Add(Diagnostic.
Create
(messageProviderOpt, messageProviderOpt.ERR_CantReadRulesetFile, resolvedPath, e.Message));
Microsoft.CodeAnalysis.CSharp (15)
CommandLine\CSharpCommandLineParser.cs (3)
1794
outputDiagnostics.Add(Diagnostic.
Create
(CSharp.MessageProvider.Instance, (int)ErrorCode.WRN_DefineIdentifierRequired, valueMemory.ToString()));
1826
outputDiagnostics.Add(Diagnostic.
Create
(CSharp.MessageProvider.Instance, (int)ErrorCode.WRN_DefineIdentifierRequired, id));
2178
diagnostics.Add(Diagnostic.
Create
(CSharp.MessageProvider.Instance, (int)errorCode, arguments));
CSharpCompilationOptions.cs (9)
764
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(MainTypeName), MainTypeName));
770
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadPlatformType, Platform.ToString()));
780
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(OutputKind), OutputKind.ToString()));
785
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(OptimizationLevel), OptimizationLevel.ToString()));
790
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(ScriptClassName), ScriptClassName ?? "null"));
795
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(WarningLevel), WarningLevel));
800
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(Usings), Usings.Where(u => !u.IsValidClrNamespaceName()).First() ?? "null"));
810
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(MetadataImportOptions), MetadataImportOptions.ToString()));
815
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValueAccepted, nameof(MemorySafetyRulesVersion), MemorySafetyRulesVersion, string.Join(", ", [(int)MemorySafetyRulesVersion.Version1, (int)MemorySafetyRulesVersion.Version2])));
CSharpParseOptions.cs (3)
254
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_BadLanguageVersion, LanguageVersion.ToString()));
263
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_InvalidPreprocessingSymbol, "null"));
267
builder.Add(Diagnostic.
Create
(MessageProvider.Instance, (int)ErrorCode.ERR_InvalidPreprocessingSymbol, symbol));