69 references to Write
Microsoft.CodeAnalysis (69)
CommandLine\SarifErrorLogger.cs (1)
108
_writer.
Write
(pair.Key, pair.Value);
CommandLine\SarifV1ErrorLogger.cs (18)
37
_writer.
Write
("$schema", "http://json.schemastore.org/sarif-1.0.0");
38
_writer.
Write
("version", "1.0.0");
43
_writer.
Write
("name", toolName);
44
_writer.
Write
("version", toolAssemblyVersion.ToString());
45
_writer.
Write
("fileVersion", toolFileVersion);
46
_writer.
Write
("semanticVersion", toolAssemblyVersion.ToString(fieldCount: 3));
50
_writer.
Write
("language", culture.Name);
62
_writer.
Write
("ruleId", diagnostic.Id);
67
_writer.
Write
("ruleKey", ruleKey);
70
_writer.
Write
("level", GetLevel(diagnostic.Severity));
75
_writer.
Write
("message", message);
143
_writer.
Write
("uri", GetUri(span.Path));
161
_writer.
Write
("id", descriptor.Id);
166
_writer.
Write
("shortDescription", shortDescription);
172
_writer.
Write
("fullDescription", fullDescription);
175
_writer.
Write
("defaultLevel", GetLevel(descriptor.DefaultSeverity));
179
_writer.
Write
("helpUri", descriptor.HelpLinkUri);
186
_writer.
Write
("category", descriptor.Category);
CommandLine\SarifV2ErrorLogger.cs (27)
46
_writer.
Write
("$schema", "http://json.schemastore.org/sarif-2.1.0");
47
_writer.
Write
("version", "2.1.0");
59
_writer.
Write
("ruleId", diagnostic.Id);
63
_writer.
Write
("level", GetLevel(diagnostic.Severity));
69
_writer.
Write
("text", message);
79
_writer.
Write
("kind", "inSource");
83
_writer.
Write
("justification", justification);
104
_writer.
Write
("suppressionType", suppressionType);
179
_writer.
Write
("uri", GetUri(span.Path));
195
_writer.
Write
("analyzerExecutionTime", _totalAnalyzerExecutionTime);
202
_writer.
Write
("columnKind", "utf16CodeUnits");
214
_writer.
Write
("name", _toolName);
215
_writer.
Write
("version", _toolFileVersion);
216
_writer.
Write
("dottedQuadFileVersion", _toolAssemblyVersion.ToString());
217
_writer.
Write
("semanticVersion", _toolAssemblyVersion.ToString(fieldCount: 3));
221
_writer.
Write
("language", _culture.Name);
242
_writer.
Write
("id", descriptor.Id);
248
_writer.
Write
("text", shortDescription);
256
_writer.
Write
("text", fullDescription);
264
_writer.
Write
("helpUri", descriptor.HelpLinkUri);
285
_writer.
Write
("category", descriptor.Category);
290
_writer.
Write
("isEverSuppressed", "true");
310
_writer.
Write
("executionTimeInSeconds", executionTime);
313
_writer.
Write
("executionTimeInPercentage", executionPercentage);
394
_writer.
Write
("id", id);
409
_writer.
Write
("level", level);
439
_writer.
Write
("level", defaultLevel);
Compilation\DeterministicKeyBuilder.cs (23)
58
writer.
Write
(propertyName, filePath);
77
writer.
Write
(name, EncodeByteArrayValue(value));
105
writer.
Write
("fullName", type.FullName);
108
writer.
Write
("assemblyName", type.Assembly.FullName);
109
writer.
Write
("mvid", GetGuidValue(type.Assembly.ManifestModule.ModuleVersionId));
240
writer.
Write
("compilerVersion", compilerVersion);
243
writer.
Write
("runtimeVersion", runtimeVersion);
245
writer.
Write
("frameworkDescription", RuntimeInformation.FrameworkDescription);
246
writer.
Write
("osDescription", RuntimeInformation.OSDescription);
280
writer.
Write
("encodingName", sourceText.Encoding?.EncodingName);
353
writer.
Write
("name", peReader.GetString(assemblyDef.Name));
360
writer.
Write
("name", peReader.GetString(moduleDef.Name));
363
writer.
Write
("mvid", GetGuidValue(moduleMetadata.GetModuleVersionId()));
414
writer.
Write
("outputNameOverride", options.OutputNameOverride);
416
writer.
Write
("pdbChecksumAlgorithm", options.PdbChecksumAlgorithm.Name);
417
writer.
Write
("runtimeMetadataVersion", options.RuntimeMetadataVersion);
443
writer.
Write
("moduleName", options.ModuleName);
444
writer.
Write
("scriptClassName", options.ScriptClassName);
445
writer.
Write
("mainTypeName", options.MainTypeName);
447
writer.
Write
("cryptoKeyFile", options.CryptoKeyFile);
485
writer.
Write
("nondeterministicMvid", GetGuidValue(Guid.NewGuid()));
521
writer.
Write
("language", parseOptions.Language);
528
writer.
Write
(key, features[key]);