57 references to CreateDiagnostic
Microsoft.CodeAnalysis (57)
CommandLine\CommonCompiler.CompilerEmitStreamProvider.cs (1)
129
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_CantOpenFileWrite, Location.None, _filePath, message));
CommandLine\CommonCompiler.cs (4)
1295
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.FTL_InvalidInputFileName, Location.None, finalPdbFilePath));
1674
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_ErrorBuildingWin32Resource, Location.None, ex.Message));
1708
diagnostics.Add(messageProvider.
CreateDiagnostic
(errorCode, Location.None, fullPath, ex.Message));
1719
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.FTL_InvalidInputFileName, Location.None, path ?? ""));
Compilation\Compilation.cs (18)
2021
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message));
2026
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message));
2031
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message));
2052
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_BadWin32Resource, Location.None, ex.Message));
2102
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_BadWin32Resource, NoLocation.Singleton, CodeAnalysisResources.UnrecognizedResourceFileFormat));
2107
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_BadWin32Resource, NoLocation.Singleton, ex.Message));
2120
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_BadWin32Resource, NoLocation.Singleton, CodeAnalysisResources.UnrecognizedResourceFileFormat));
2145
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_ResourceNotUnique, Location.None, resource.ResourceName));
2152
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_ResourceFileNameNotUnique, Location.None, fileName));
2160
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_ResourceFileNameNotUnique, Location.None, fileName));
2171
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_ResourceNotUnique, Location.None, name));
3306
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_PdbWritingFailed, Location.None, ex.Message));
3311
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_PeWritingFailure, Location.None, e.InnerException?.ToString() ?? ""));
3316
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_CantReadResource, Location.None, e.Message, e.InnerException?.Message ?? ""));
3321
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_PermissionSetAttributeFileReadError, Location.None, e.FileName, e.PropertyName, e.Message));
3483
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_PdbWritingFailed, Location.None, e.Message));
3488
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_PeWritingFailure, Location.None, e.InnerException?.ToString() ?? ""));
3493
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_PermissionSetAttributeFileReadError, Location.None, e.FileName, e.PropertyName, e.Message));
Compilation\CompilationOptions.cs (5)
570
builder.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_MutuallyExclusiveOptions,
576
builder.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_MutuallyExclusiveOptions,
585
builder.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_OptionMustBeAbsolutePath,
591
builder.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_MutuallyExclusiveOptions,
597
builder.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_MutuallyExclusiveOptions,
Compilation\ParseOptions.cs (2)
84
builder.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_BadSourceCodeKind, Location.None, SpecifiedKind.ToString()));
89
builder.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_BadDocumentationMode, Location.None, DocumentationMode.ToString()));
Diagnostic\CommonMessageProvider.cs (2)
82
return
CreateDiagnostic
(code, location, Array.Empty<object>());
257
diagnostics.Add(
CreateDiagnostic
(ERR_OutputWriteFailed, Location.None, filePath, e.Message));
Emit\EditAndContinue\DeltaMetadataWriter.cs (1)
844
Context.Diagnostics.Add(messageProvider.
CreateDiagnostic
(
Emit\EmitOptions.cs (6)
336
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_InvalidDebugInformationFormat, Location.None, (int)DebugInformationFormat));
348
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_InvalidInstrumentationKind, Location.None, (int)instrumentationKind));
359
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_InvalidFileAlignment, Location.None, FileAlignment));
364
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_InvalidSubsystemVersion, Location.None, SubsystemVersion.ToString()));
375
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_InvalidHashAlgorithmName, Location.None, PdbChecksumAlgorithm.ToString()));
380
diagnostics.Add(messageProvider.
CreateDiagnostic
(messageProvider.ERR_InvalidHashAlgorithmName, Location.None, ""));
MetadataReader\MetadataHelpers.cs (2)
974
messageProvider.
CreateDiagnostic
(code, Location.None,
985
messageProvider.
CreateDiagnostic
(code, Location.None,
MetadataReference\PortableExecutableReference.cs (3)
191
return messageProvider.
CreateDiagnostic
(errorCode, location, display, e.Message);
197
return messageProvider.
CreateDiagnostic
(messageProvider.ERR_MetadataFileNotFound, location, fileNotFound.FileName ?? string.Empty);
202
return messageProvider.
CreateDiagnostic
(errorCode, location, display, e.Message);
PEWriter\MetadataWriter.cs (5)
1357
this.Context.Diagnostics.Add(this.messageProvider.
CreateDiagnostic
(this.messageProvider.ERR_MetadataNameTooLong, location, name));
1366
this.Context.Diagnostics.Add(this.messageProvider.
CreateDiagnostic
(this.messageProvider.ERR_MetadataNameTooLong, location, path));
1390
this.Context.Diagnostics.Add(this.messageProvider.
CreateDiagnostic
(this.messageProvider.ERR_MetadataNameTooLong, location, namespaceName + "." + mangledTypeName));
1400
this.Context.Diagnostics.Add(this.messageProvider.
CreateDiagnostic
(this.messageProvider.WRN_PdbUsingNameTooLong, location, usingString));
1412
this.Context.Diagnostics.Add(this.messageProvider.
CreateDiagnostic
(this.messageProvider.WRN_PdbLocalNameTooLong, localDefinition.Location, name));
ReferenceManager\CommonReferenceManager.Resolution.cs (5)
363
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_MetadataFileNotAssembly, location, peReference.Display ?? ""));
378
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_LinkedNetmoduleMetadataMustProvideFullPEImage, location, peReference.Display ?? ""));
385
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_MetadataFileNotModule, location, peReference.Display ?? ""));
559
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_MetadataFileNotAssembly, Location.None, peReference.Display ?? ""));
822
diagnostics.Add(MessageProvider.
CreateDiagnostic
(MessageProvider.ERR_MetadataFileNotFound, referenceDirective.Location, referenceDirective.File));
StrongName\StrongNameKeys.cs (3)
98
return new StrongNameKeys(messageProvider.
CreateDiagnostic
(messageProvider.ERR_BadCompilationOptionValue, Location.None,
219
return messageProvider.
CreateDiagnostic
(messageProvider.ERR_PublicKeyContainerFailure, Location.None, name, message);
224
return messageProvider.
CreateDiagnostic
(messageProvider.ERR_PublicKeyFileFailure, Location.None, path, message);