From d643ee992e85b9d5a2b6ce6c7ad9044f8bb74454 Mon Sep 17 00:00:00 2001 From: Shaopeng Li Date: Thu, 25 Aug 2022 15:15:52 -0700 Subject: [PATCH] update auto gen --- src/Sarif/Autogenerated/Address.cs | 26 +++---- src/Sarif/Autogenerated/AddressComparer.cs | 2 +- src/Sarif/Autogenerated/Invocation.cs | 70 +++++++++--------- src/Sarif/Autogenerated/Location.cs | 2 +- .../Autogenerated/ReportingConfiguration.cs | 18 +++-- .../Autogenerated/ReportingDescriptor.cs | 8 +- src/Sarif/Autogenerated/Result.cs | 74 +++++++++---------- src/Sarif/Autogenerated/Run.cs | 62 ++++++++-------- src/Sarif/Autogenerated/SarifLog.cs | 22 +++--- src/Sarif/NotYetAutoGenerated/Address.cs | 1 + src/Sarif/NotYetAutoGenerated/Invocation.cs | 1 + src/Sarif/NotYetAutoGenerated/Location.cs | 1 + .../ReportingConfiguration.cs | 2 + .../ReportingDescriptor.cs | 1 + src/Sarif/NotYetAutoGenerated/Result.cs | 1 + src/Sarif/NotYetAutoGenerated/Run.cs | 1 + src/Sarif/NotYetAutoGenerated/SarifLog.cs | 1 + 17 files changed, 150 insertions(+), 143 deletions(-) diff --git a/src/Sarif/Autogenerated/Address.cs b/src/Sarif/Autogenerated/Address.cs index 56429c285..39ec63b61 100644 --- a/src/Sarif/Autogenerated/Address.cs +++ b/src/Sarif/Autogenerated/Address.cs @@ -15,7 +15,7 @@ namespace Microsoft.CodeAnalysis.Sarif /// A physical or virtual address, or a range of addresses, in an 'addressable region' (memory or a binary file). /// [DataContract] - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.62.0.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] public partial class Address : PropertyBagHolder, ISarifNode { public static IEqualityComparer
ValueComparer => AddressEqualityComparer.Instance; @@ -28,7 +28,7 @@ public partial class Address : PropertyBagHolder, ISarifNode /// /// Gets a value indicating the type of object implementing . /// - public SarifNodeKind SarifNodeKind + public virtual SarifNodeKind SarifNodeKind { get { @@ -42,44 +42,44 @@ public SarifNodeKind SarifNodeKind [DataMember(Name = "absoluteAddress", IsRequired = false, EmitDefaultValue = false)] [DefaultValue(-1)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public int AbsoluteAddress { get; set; } + public virtual int AbsoluteAddress { get; set; } /// /// The address expressed as a byte offset from the absolute address of the top-most parent object. /// [DataMember(Name = "relativeAddress", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public int? RelativeAddress { get; set; } // NOTYETAUTOGENERATED: Property should be nullable int. https://github.com/Microsoft/jschema/issues/112 + public virtual int? RelativeAddress { get; set; } // NOTYETAUTOGENERATED: Property should be nullable int. https://github.com/Microsoft/jschema/issues/112 /// /// The number of bytes in this range of addresses. /// [DataMember(Name = "length", IsRequired = false, EmitDefaultValue = false)] - public int? Length { get; set; } // NOTYETAUTOGENERATED: Property should be nullable int. https://github.com/Microsoft/jschema/issues/112 + public virtual int? Length { get; set; } // NOTYETAUTOGENERATED: Property should be nullable int. https://github.com/Microsoft/jschema/issues/112 /// /// An open-ended string that identifies the address kind. 'data', 'function', 'header','instruction', 'module', 'page', 'section', 'segment', 'stack', 'stackFrame', 'table' are well-known values. /// [DataMember(Name = "kind", IsRequired = false, EmitDefaultValue = false)] - public string Kind { get; set; } + public virtual string Kind { get; set; } /// /// A name that is associated with the address, e.g., '.text'. /// [DataMember(Name = "name", IsRequired = false, EmitDefaultValue = false)] - public string Name { get; set; } + public virtual string Name { get; set; } /// /// A human-readable fully qualified name that is associated with the address. /// [DataMember(Name = "fullyQualifiedName", IsRequired = false, EmitDefaultValue = false)] - public string FullyQualifiedName { get; set; } + public virtual string FullyQualifiedName { get; set; } /// /// The byte offset of this address from the absolute or relative address of the parent object. /// [DataMember(Name = "offsetFromParent", IsRequired = false, EmitDefaultValue = false)] - public int? OffsetFromParent { get; set; } // NOTYETAUTOGENERATED: Property should be nullable int. https://github.com/Microsoft/jschema/issues/112 + public virtual int? OffsetFromParent { get; set; } // NOTYETAUTOGENERATED: Property should be nullable int. https://github.com/Microsoft/jschema/issues/112 /// /// The index within run.addresses of the cached object for this address. @@ -87,7 +87,7 @@ public SarifNodeKind SarifNodeKind [DataMember(Name = "index", IsRequired = false, EmitDefaultValue = false)] [DefaultValue(-1)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public int Index { get; set; } + public virtual int Index { get; set; } /// /// The index within run.addresses of the parent object. @@ -95,7 +95,7 @@ public SarifNodeKind SarifNodeKind [DataMember(Name = "parentIndex", IsRequired = false, EmitDefaultValue = false)] [DefaultValue(-1)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public int ParentIndex { get; set; } + public virtual int ParentIndex { get; set; } /// /// Key/value pairs that provide additional information about the address. @@ -179,7 +179,7 @@ ISarifNode ISarifNode.DeepClone() /// /// Creates a deep copy of this instance. /// - public Address DeepClone() + public virtual Address DeepClone() { return (Address)DeepCloneCore(); } @@ -189,7 +189,7 @@ private ISarifNode DeepCloneCore() return new Address(this); } - private void Init(int absoluteAddress, int? relativeAddress, int? length, string kind, string name, string fullyQualifiedName, int? offsetFromParent, int index, int parentIndex, IDictionary properties) + protected virtual void Init(int absoluteAddress, int? relativeAddress, int? length, string kind, string name, string fullyQualifiedName, int? offsetFromParent, int index, int parentIndex, IDictionary properties) { AbsoluteAddress = absoluteAddress; RelativeAddress = relativeAddress; diff --git a/src/Sarif/Autogenerated/AddressComparer.cs b/src/Sarif/Autogenerated/AddressComparer.cs index dc192c71c..99f45085e 100644 --- a/src/Sarif/Autogenerated/AddressComparer.cs +++ b/src/Sarif/Autogenerated/AddressComparer.cs @@ -10,7 +10,7 @@ namespace Microsoft.CodeAnalysis.Sarif /// /// Defines methods to support the comparison of objects of type Address for sorting. /// - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.4.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] internal sealed class AddressComparer : IComparer
{ internal static readonly AddressComparer Instance = new AddressComparer(); diff --git a/src/Sarif/Autogenerated/Invocation.cs b/src/Sarif/Autogenerated/Invocation.cs index 013005859..6eb1d505f 100644 --- a/src/Sarif/Autogenerated/Invocation.cs +++ b/src/Sarif/Autogenerated/Invocation.cs @@ -14,7 +14,7 @@ namespace Microsoft.CodeAnalysis.Sarif /// The runtime environment of the analysis tool run. ///
[DataContract] - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.0.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] public partial class Invocation : PropertyBagHolder, ISarifNode { public static IEqualityComparer ValueComparer => InvocationEqualityComparer.Instance; @@ -27,7 +27,7 @@ public partial class Invocation : PropertyBagHolder, ISarifNode /// /// Gets a value indicating the type of object implementing . /// - public SarifNodeKind SarifNodeKind + public virtual SarifNodeKind SarifNodeKind { get { @@ -39,157 +39,157 @@ public SarifNodeKind SarifNodeKind /// The command line used to invoke the tool. ///
[DataMember(Name = "commandLine", IsRequired = false, EmitDefaultValue = false)] - public string CommandLine { get; set; } + public virtual string CommandLine { get; set; } /// /// An array of strings, containing in order the command line arguments passed to the tool from the operating system. /// [DataMember(Name = "arguments", IsRequired = false, EmitDefaultValue = false)] - public IList Arguments { get; set; } + public virtual IList Arguments { get; set; } /// /// The locations of any response files specified on the tool's command line. /// [DataMember(Name = "responseFiles", IsRequired = false, EmitDefaultValue = false)] - public IList ResponseFiles { get; set; } + public virtual IList ResponseFiles { get; set; } /// - /// The Coordinated Universal Time (UTC) date and time at which the run started. See "Date/time properties" in the SARIF spec for the required format. + /// The Coordinated Universal Time (UTC) date and time at which the invocation started. See "Date/time properties" in the SARIF spec for the required format. /// [DataMember(Name = "startTimeUtc", IsRequired = false, EmitDefaultValue = false)] [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.DateTimeConverter))] - public DateTime StartTimeUtc { get; set; } + public virtual DateTime StartTimeUtc { get; set; } /// - /// The Coordinated Universal Time (UTC) date and time at which the run ended. See "Date/time properties" in the SARIF spec for the required format. + /// The Coordinated Universal Time (UTC) date and time at which the invocation ended. See "Date/time properties" in the SARIF spec for the required format. /// [DataMember(Name = "endTimeUtc", IsRequired = false, EmitDefaultValue = false)] [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.DateTimeConverter))] - public DateTime EndTimeUtc { get; set; } + public virtual DateTime EndTimeUtc { get; set; } /// /// The process exit code. /// [DataMember(Name = "exitCode", IsRequired = false, EmitDefaultValue = false)] - public int ExitCode { get; set; } + public virtual int ExitCode { get; set; } /// /// An array of configurationOverride objects that describe rules related runtime overrides. /// [DataMember(Name = "ruleConfigurationOverrides", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList RuleConfigurationOverrides { get; set; } + public virtual IList RuleConfigurationOverrides { get; set; } /// /// An array of configurationOverride objects that describe notifications related runtime overrides. /// [DataMember(Name = "notificationConfigurationOverrides", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList NotificationConfigurationOverrides { get; set; } + public virtual IList NotificationConfigurationOverrides { get; set; } /// /// A list of runtime conditions detected by the tool during the analysis. /// [DataMember(Name = "toolExecutionNotifications", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList ToolExecutionNotifications { get; set; } + public virtual IList ToolExecutionNotifications { get; set; } /// /// A list of conditions detected by the tool that are relevant to the tool's configuration. /// [DataMember(Name = "toolConfigurationNotifications", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList ToolConfigurationNotifications { get; set; } + public virtual IList ToolConfigurationNotifications { get; set; } /// /// The reason for the process exit. /// [DataMember(Name = "exitCodeDescription", IsRequired = false, EmitDefaultValue = false)] - public string ExitCodeDescription { get; set; } + public virtual string ExitCodeDescription { get; set; } /// /// The name of the signal that caused the process to exit. /// [DataMember(Name = "exitSignalName", IsRequired = false, EmitDefaultValue = false)] - public string ExitSignalName { get; set; } + public virtual string ExitSignalName { get; set; } /// /// The numeric value of the signal that caused the process to exit. /// [DataMember(Name = "exitSignalNumber", IsRequired = false, EmitDefaultValue = false)] - public int ExitSignalNumber { get; set; } + public virtual int ExitSignalNumber { get; set; } /// /// The reason given by the operating system that the process failed to start. /// [DataMember(Name = "processStartFailureMessage", IsRequired = false, EmitDefaultValue = false)] - public string ProcessStartFailureMessage { get; set; } + public virtual string ProcessStartFailureMessage { get; set; } /// /// Specifies whether the tool's execution completed successfully. /// [DataMember(Name = "executionSuccessful", IsRequired = true)] - public bool ExecutionSuccessful { get; set; } + public virtual bool ExecutionSuccessful { get; set; } /// - /// The machine that hosted the analysis tool run. + /// The machine on which the invocation occurred. /// [DataMember(Name = "machine", IsRequired = false, EmitDefaultValue = false)] - public string Machine { get; set; } + public virtual string Machine { get; set; } /// - /// The account that ran the analysis tool. + /// The account under which the invocation occurred. /// [DataMember(Name = "account", IsRequired = false, EmitDefaultValue = false)] - public string Account { get; set; } + public virtual string Account { get; set; } /// - /// The process id for the analysis tool run. + /// The id of the process in which the invocation occurred. /// [DataMember(Name = "processId", IsRequired = false, EmitDefaultValue = false)] - public int ProcessId { get; set; } + public virtual int ProcessId { get; set; } /// - /// An absolute URI specifying the location of the analysis tool's executable. + /// An absolute URI specifying the location of the executable that was invoked. /// [DataMember(Name = "executableLocation", IsRequired = false, EmitDefaultValue = false)] - public ArtifactLocation ExecutableLocation { get; set; } + public virtual ArtifactLocation ExecutableLocation { get; set; } /// - /// The working directory for the analysis tool run. + /// The working directory for the invocation. /// [DataMember(Name = "workingDirectory", IsRequired = false, EmitDefaultValue = false)] - public ArtifactLocation WorkingDirectory { get; set; } + public virtual ArtifactLocation WorkingDirectory { get; set; } /// /// The environment variables associated with the analysis tool process, expressed as key/value pairs. /// [DataMember(Name = "environmentVariables", IsRequired = false, EmitDefaultValue = false)] - public IDictionary EnvironmentVariables { get; set; } + public virtual IDictionary EnvironmentVariables { get; set; } /// /// A file containing the standard input stream to the process that was invoked. /// [DataMember(Name = "stdin", IsRequired = false, EmitDefaultValue = false)] - public ArtifactLocation Stdin { get; set; } + public virtual ArtifactLocation Stdin { get; set; } /// /// A file containing the standard output stream from the process that was invoked. /// [DataMember(Name = "stdout", IsRequired = false, EmitDefaultValue = false)] - public ArtifactLocation Stdout { get; set; } + public virtual ArtifactLocation Stdout { get; set; } /// /// A file containing the standard error stream from the process that was invoked. /// [DataMember(Name = "stderr", IsRequired = false, EmitDefaultValue = false)] - public ArtifactLocation Stderr { get; set; } + public virtual ArtifactLocation Stderr { get; set; } /// /// A file containing the interleaved standard output and standard error stream from the process that was invoked. /// [DataMember(Name = "stdoutStderr", IsRequired = false, EmitDefaultValue = false)] - public ArtifactLocation StdoutStderr { get; set; } + public virtual ArtifactLocation StdoutStderr { get; set; } /// /// Key/value pairs that provide additional information about the invocation. @@ -323,7 +323,7 @@ ISarifNode ISarifNode.DeepClone() /// /// Creates a deep copy of this instance. /// - public Invocation DeepClone() + public virtual Invocation DeepClone() { return (Invocation)DeepCloneCore(); } diff --git a/src/Sarif/Autogenerated/Location.cs b/src/Sarif/Autogenerated/Location.cs index 61ec7c80b..21a679f6b 100644 --- a/src/Sarif/Autogenerated/Location.cs +++ b/src/Sarif/Autogenerated/Location.cs @@ -16,7 +16,7 @@ namespace Microsoft.CodeAnalysis.Sarif /// A location within a programming artifact. /// [DataContract] - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.3.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] public partial class Location : PropertyBagHolder, ISarifNode { public static IEqualityComparer ValueComparer => LocationEqualityComparer.Instance; diff --git a/src/Sarif/Autogenerated/ReportingConfiguration.cs b/src/Sarif/Autogenerated/ReportingConfiguration.cs index cd564cb41..df8317b58 100644 --- a/src/Sarif/Autogenerated/ReportingConfiguration.cs +++ b/src/Sarif/Autogenerated/ReportingConfiguration.cs @@ -7,6 +7,8 @@ using System.ComponentModel; using System.Runtime.Serialization; +using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -15,7 +17,7 @@ namespace Microsoft.CodeAnalysis.Sarif /// Information about a rule or notification that can be configured at runtime. ///
[DataContract] - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.62.0.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] public partial class ReportingConfiguration : PropertyBagHolder, ISarifNode { public static IEqualityComparer ValueComparer => ReportingConfigurationEqualityComparer.Instance; @@ -28,7 +30,7 @@ public partial class ReportingConfiguration : PropertyBagHolder, ISarifNode /// /// Gets a value indicating the type of object implementing . /// - public SarifNodeKind SarifNodeKind + public virtual SarifNodeKind SarifNodeKind { get { @@ -42,7 +44,7 @@ public SarifNodeKind SarifNodeKind [DataMember(Name = "enabled", IsRequired = false, EmitDefaultValue = false)] [DefaultValue(true)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public bool Enabled { get; set; } + public virtual bool Enabled { get; set; } /// /// Specifies the failure level for the report. @@ -51,7 +53,7 @@ public SarifNodeKind SarifNodeKind [DefaultValue(FailureLevel.Warning)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.EnumConverter))] - public FailureLevel Level { get; set; } + public virtual FailureLevel Level { get; set; } /// /// Specifies the relative priority of the report. Used for analysis output only. @@ -59,13 +61,13 @@ public SarifNodeKind SarifNodeKind [DataMember(Name = "rank", IsRequired = false, EmitDefaultValue = false)] [DefaultValue(-1.0)] // NOTYETAUTOGENERATED: required until https://github.com/Microsoft/jschema/issues/88 is fixed [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public double Rank { get; set; } + public virtual double Rank { get; set; } /// /// Contains configuration information specific to a report. /// [DataMember(Name = "parameters", IsRequired = false, EmitDefaultValue = false)] - public IDictionary Parameters { get; set; } + public virtual IDictionary Parameters { get; set; } /// /// Key/value pairs that provide additional information about the reporting configuration. @@ -133,7 +135,7 @@ ISarifNode ISarifNode.DeepClone() /// /// Creates a deep copy of this instance. /// - public ReportingConfiguration DeepClone() + public virtual ReportingConfiguration DeepClone() { return (ReportingConfiguration)DeepCloneCore(); } @@ -143,7 +145,7 @@ private ISarifNode DeepCloneCore() return new ReportingConfiguration(this); } - private void Init(bool enabled, FailureLevel level, double rank, IDictionary parameters, IDictionary properties) + protected virtual void Init(bool enabled, FailureLevel level, double rank, IDictionary parameters, IDictionary properties) { Enabled = enabled; Level = level; diff --git a/src/Sarif/Autogenerated/ReportingDescriptor.cs b/src/Sarif/Autogenerated/ReportingDescriptor.cs index b7e806cb8..7cfc2cfae 100644 --- a/src/Sarif/Autogenerated/ReportingDescriptor.cs +++ b/src/Sarif/Autogenerated/ReportingDescriptor.cs @@ -14,7 +14,7 @@ namespace Microsoft.CodeAnalysis.Sarif /// Metadata that describes a specific report produced by the tool, as part of the analysis it provides or its runtime reporting. /// [DataContract] - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.62.0.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] public partial class ReportingDescriptor : PropertyBagHolder, ISarifNode { public static IEqualityComparer ValueComparer => ReportingDescriptorEqualityComparer.Instance; @@ -27,7 +27,7 @@ public partial class ReportingDescriptor : PropertyBagHolder, ISarifNode /// /// Gets a value indicating the type of object implementing . /// - public SarifNodeKind SarifNodeKind + public virtual SarifNodeKind SarifNodeKind { get { @@ -211,7 +211,7 @@ ISarifNode ISarifNode.DeepClone() /// /// Creates a deep copy of this instance. /// - public ReportingDescriptor DeepClone() + public virtual ReportingDescriptor DeepClone() { return (ReportingDescriptor)DeepCloneCore(); } @@ -221,7 +221,7 @@ private ISarifNode DeepCloneCore() return new ReportingDescriptor(this); } - private void Init(string id, IEnumerable deprecatedIds, string guid, IEnumerable deprecatedGuids, string name, IEnumerable deprecatedNames, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, IDictionary messageStrings, ReportingConfiguration defaultConfiguration, Uri helpUri, MultiformatMessageString help, IEnumerable relationships, IDictionary properties) + protected virtual void Init(string id, IEnumerable deprecatedIds, string guid, IEnumerable deprecatedGuids, string name, IEnumerable deprecatedNames, MultiformatMessageString shortDescription, MultiformatMessageString fullDescription, IDictionary messageStrings, ReportingConfiguration defaultConfiguration, Uri helpUri, MultiformatMessageString help, IEnumerable relationships, IDictionary properties) { Id = id; if (deprecatedIds != null) diff --git a/src/Sarif/Autogenerated/Result.cs b/src/Sarif/Autogenerated/Result.cs index abffb8faf..93740a77f 100644 --- a/src/Sarif/Autogenerated/Result.cs +++ b/src/Sarif/Autogenerated/Result.cs @@ -7,8 +7,6 @@ using System.ComponentModel; using System.Runtime.Serialization; -using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif @@ -17,7 +15,7 @@ namespace Microsoft.CodeAnalysis.Sarif /// A result produced by an analysis tool. /// [DataContract] - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.62.0.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] public partial class Result : PropertyBagHolder, ISarifNode { public static IEqualityComparer ValueComparer => ResultEqualityComparer.Instance; @@ -30,7 +28,7 @@ public partial class Result : PropertyBagHolder, ISarifNode /// /// Gets a value indicating the type of object implementing . /// - public SarifNodeKind SarifNodeKind + public virtual SarifNodeKind SarifNodeKind { get { @@ -39,10 +37,10 @@ public SarifNodeKind SarifNodeKind } /// - /// The stable, unique identifier of the rule, if any, to which this notification is relevant. This member can be used to retrieve rule metadata from the rules dictionary, if it exists. + /// The stable, unique identifier of the rule, if any, to which this result is relevant. /// [DataMember(Name = "ruleId", IsRequired = false, EmitDefaultValue = false)] - public string RuleId { get; set; } + public virtual string RuleId { get; set; } /// /// The index within the tool component rules array of the rule object associated with this result. @@ -50,13 +48,13 @@ public SarifNodeKind SarifNodeKind [DataMember(Name = "ruleIndex", IsRequired = false, EmitDefaultValue = false)] [DefaultValue(-1)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public int RuleIndex { get; set; } + public virtual int RuleIndex { get; set; } /// /// A reference used to locate the rule descriptor relevant to this result. /// [DataMember(Name = "rule", IsRequired = false, EmitDefaultValue = false)] - public ReportingDescriptorReference Rule { get; set; } + public virtual ReportingDescriptorReference Rule { get; set; } // NOTYETAUTOGENERATED: we have a special need to replace property accessors for Kind and Level // to help keep these interrelated properties in sync. On updating Kind to any value other @@ -72,7 +70,7 @@ public SarifNodeKind SarifNodeKind [DefaultValue(ResultKind.Fail)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.EnumConverter))] - public ResultKind Kind + public virtual ResultKind Kind { get { return _kind; } set @@ -94,7 +92,7 @@ public ResultKind Kind [DefaultValue(FailureLevel.Warning)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.EnumConverter))] - public FailureLevel Level + public virtual FailureLevel Level { get { return _level; } set @@ -111,98 +109,98 @@ public FailureLevel Level /// A message that describes the result. The first sentence of the message only will be displayed when visible space is limited. /// [DataMember(Name = "message", IsRequired = true)] - public Message Message { get; set; } + public virtual Message Message { get; set; } /// /// Identifies the artifact that the analysis tool was instructed to scan. This need not be the same as the artifact where the result actually occurred. /// [DataMember(Name = "analysisTarget", IsRequired = false, EmitDefaultValue = false)] - public ArtifactLocation AnalysisTarget { get; set; } + public virtual ArtifactLocation AnalysisTarget { get; set; } /// /// The set of locations where the result was detected. Specify only one location unless the problem indicated by the result can only be corrected by making a change at every specified location. /// [DataMember(Name = "locations", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Locations { get; set; } + public virtual IList Locations { get; set; } /// /// A stable, unique identifier for the result in the form of a GUID. /// [DataMember(Name = "guid", IsRequired = false, EmitDefaultValue = false)] - public string Guid { get; set; } + public virtual string Guid { get; set; } /// /// A stable, unique identifier for the equivalence class of logically identical results to which this result belongs, in the form of a GUID. /// [DataMember(Name = "correlationGuid", IsRequired = false, EmitDefaultValue = false)] - public string CorrelationGuid { get; set; } + public virtual string CorrelationGuid { get; set; } /// /// A positive integer specifying the number of times this logically unique result was observed in this run. /// [DataMember(Name = "occurrenceCount", IsRequired = false, EmitDefaultValue = false)] - public int OccurrenceCount { get; set; } + public virtual int OccurrenceCount { get; set; } /// /// A set of strings that contribute to the stable, unique identity of the result. /// [DataMember(Name = "partialFingerprints", IsRequired = false, EmitDefaultValue = false)] - public IDictionary PartialFingerprints { get; set; } + public virtual IDictionary PartialFingerprints { get; set; } /// /// A set of strings each of which individually defines a stable, unique identity for the result. /// [DataMember(Name = "fingerprints", IsRequired = false, EmitDefaultValue = false)] - public IDictionary Fingerprints { get; set; } + public virtual IDictionary Fingerprints { get; set; } /// /// An array of 'stack' objects relevant to the result. /// [DataMember(Name = "stacks", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Stacks { get; set; } + public virtual IList Stacks { get; set; } /// /// An array of 'codeFlow' objects relevant to the result. /// [DataMember(Name = "codeFlows", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList CodeFlows { get; set; } + public virtual IList CodeFlows { get; set; } /// /// An array of zero or more unique graph objects associated with the result. /// [DataMember(Name = "graphs", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Graphs { get; set; } + public virtual IList Graphs { get; set; } /// /// An array of one or more unique 'graphTraversal' objects. /// [DataMember(Name = "graphTraversals", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList GraphTraversals { get; set; } + public virtual IList GraphTraversals { get; set; } /// /// A set of locations relevant to this result. /// [DataMember(Name = "relatedLocations", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList RelatedLocations { get; set; } + public virtual IList RelatedLocations { get; set; } /// /// A set of suppressions relevant to this result. /// [DataMember(Name = "suppressions", IsRequired = false, EmitDefaultValue = false)] - public IList Suppressions { get; set; } + public virtual IList Suppressions { get; set; } /// /// The state of a result relative to a baseline of a previous run. /// [DataMember(Name = "baselineState", IsRequired = false, EmitDefaultValue = false)] [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.EnumConverter))] - public BaselineState BaselineState { get; set; } + public virtual BaselineState BaselineState { get; set; } /// /// A number representing the priority or importance of the result. @@ -210,60 +208,60 @@ public FailureLevel Level [DataMember(Name = "rank", IsRequired = false, EmitDefaultValue = false)] [DefaultValue(-1.0)] // NOTYETAUTOGENERATED: required until https://github.com/Microsoft/jschema/issues/88 is fixed [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public double Rank { get; set; } + public virtual double Rank { get; set; } /// /// A set of artifacts relevant to the result. /// [DataMember(Name = "attachments", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Attachments { get; set; } + public virtual IList Attachments { get; set; } /// /// An absolute URI at which the result can be viewed. /// [DataMember(Name = "hostedViewerUri", IsRequired = false, EmitDefaultValue = false)] - [JsonConverter(typeof(UriConverter))] - public Uri HostedViewerUri { get; set; } + [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.UriConverter))] + public virtual Uri HostedViewerUri { get; set; } /// /// The URIs of the work items associated with this result. /// [DataMember(Name = "workItemUris", IsRequired = false, EmitDefaultValue = false)] - [JsonProperty(ItemConverterType = typeof(UriConverter))] - public IList WorkItemUris { get; set; } + [JsonProperty(ItemConverterType = typeof(Microsoft.CodeAnalysis.Sarif.Readers.UriConverter))] + public virtual IList WorkItemUris { get; set; } /// /// Information about how and when the result was detected. /// [DataMember(Name = "provenance", IsRequired = false, EmitDefaultValue = false)] - public ResultProvenance Provenance { get; set; } + public virtual ResultProvenance Provenance { get; set; } /// /// An array of 'fix' objects, each of which represents a proposed fix to the problem indicated by the result. /// [DataMember(Name = "fixes", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Fixes { get; set; } + public virtual IList Fixes { get; set; } /// /// An array of references to taxonomy reporting descriptors that are applicable to the result. /// [DataMember(Name = "taxa", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Taxa { get; set; } + public virtual IList Taxa { get; set; } /// /// A web request associated with this result. /// [DataMember(Name = "webRequest", IsRequired = false, EmitDefaultValue = false)] - public WebRequest WebRequest { get; set; } + public virtual WebRequest WebRequest { get; set; } /// /// A web response associated with this result. /// [DataMember(Name = "webResponse", IsRequired = false, EmitDefaultValue = false)] - public WebResponse WebResponse { get; set; } + public virtual WebResponse WebResponse { get; set; } /// /// Key/value pairs that provide additional information about the result. @@ -407,7 +405,7 @@ ISarifNode ISarifNode.DeepClone() /// /// Creates a deep copy of this instance. /// - public Result DeepClone() + public virtual Result DeepClone() { return (Result)DeepCloneCore(); } @@ -417,7 +415,7 @@ private ISarifNode DeepCloneCore() return new Result(this); } - private void Init(string ruleId, int ruleIndex, ReportingDescriptorReference rule, ResultKind kind, FailureLevel level, Message message, ArtifactLocation analysisTarget, IEnumerable locations, string guid, string correlationGuid, int occurrenceCount, IDictionary partialFingerprints, IDictionary fingerprints, IEnumerable stacks, IEnumerable codeFlows, IEnumerable graphs, IEnumerable graphTraversals, IEnumerable relatedLocations, IEnumerable suppressions, BaselineState baselineState, double rank, IEnumerable attachments, Uri hostedViewerUri, IEnumerable workItemUris, ResultProvenance provenance, IEnumerable fixes, IEnumerable taxa, WebRequest webRequest, WebResponse webResponse, IDictionary properties) + protected virtual void Init(string ruleId, int ruleIndex, ReportingDescriptorReference rule, ResultKind kind, FailureLevel level, Message message, ArtifactLocation analysisTarget, IEnumerable locations, string guid, string correlationGuid, int occurrenceCount, IDictionary partialFingerprints, IDictionary fingerprints, IEnumerable stacks, IEnumerable codeFlows, IEnumerable graphs, IEnumerable graphTraversals, IEnumerable relatedLocations, IEnumerable suppressions, BaselineState baselineState, double rank, IEnumerable attachments, Uri hostedViewerUri, IEnumerable workItemUris, ResultProvenance provenance, IEnumerable fixes, IEnumerable taxa, WebRequest webRequest, WebResponse webResponse, IDictionary properties) { RuleId = ruleId; RuleIndex = ruleIndex; diff --git a/src/Sarif/Autogenerated/Run.cs b/src/Sarif/Autogenerated/Run.cs index c985de1cb..1345292e3 100644 --- a/src/Sarif/Autogenerated/Run.cs +++ b/src/Sarif/Autogenerated/Run.cs @@ -15,7 +15,7 @@ namespace Microsoft.CodeAnalysis.Sarif /// Describes a single run of an analysis tool, and contains the reported output of that run. /// [DataContract] - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.62.0.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] public partial class Run : PropertyBagHolder, ISarifNode { public static IEqualityComparer ValueComparer => RunEqualityComparer.Instance; @@ -28,7 +28,7 @@ public partial class Run : PropertyBagHolder, ISarifNode /// /// Gets a value indicating the type of object implementing . /// - public SarifNodeKind SarifNodeKind + public virtual SarifNodeKind SarifNodeKind { get { @@ -40,20 +40,20 @@ public SarifNodeKind SarifNodeKind /// Information about the tool or tool pipeline that generated the results in this run. A run can only contain results produced by a single tool or tool pipeline. A run can aggregate results from multiple log files, as long as context around the tool run (tool command-line arguments and the like) is identical for all aggregated files. /// [DataMember(Name = "tool", IsRequired = true)] - public Tool Tool { get; set; } + public virtual Tool Tool { get; set; } /// /// Describes the invocation of the analysis tool. /// [DataMember(Name = "invocations", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Invocations { get; set; } + public virtual IList Invocations { get; set; } /// /// A conversion object that describes how a converter transformed an analysis tool's native reporting format into the SARIF format. /// [DataMember(Name = "conversion", IsRequired = false, EmitDefaultValue = false)] - public Conversion Conversion { get; set; } + public virtual Conversion Conversion { get; set; } /// /// The language of the messages emitted into the log file during this run (expressed as an ISO 639-1 two-letter lowercase culture code) and an optional region (expressed as an ISO 3166-1 two-letter uppercase subculture code associated with a country or region). The casing is recommended but not required (in order for this data to conform to RFC5646). @@ -61,159 +61,159 @@ public SarifNodeKind SarifNodeKind [DataMember(Name = "language", IsRequired = false, EmitDefaultValue = false)] [DefaultValue("en-US")] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public string Language { get; set; } + public virtual string Language { get; set; } /// /// Specifies the revision in version control of the artifacts that were scanned. /// [DataMember(Name = "versionControlProvenance", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList VersionControlProvenance { get; set; } + public virtual IList VersionControlProvenance { get; set; } /// /// The artifact location specified by each uriBaseId symbol on the machine where the tool originally ran. /// [DataMember(Name = "originalUriBaseIds", IsRequired = false, EmitDefaultValue = false)] - public IDictionary OriginalUriBaseIds { get; set; } + public virtual IDictionary OriginalUriBaseIds { get; set; } /// /// An array of artifact objects relevant to the run. /// [DataMember(Name = "artifacts", IsRequired = false, EmitDefaultValue = false)] - public IList Artifacts { get; set; } + public virtual IList Artifacts { get; set; } /// /// An array of logical locations such as namespaces, types or functions. /// [DataMember(Name = "logicalLocations", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList LogicalLocations { get; set; } + public virtual IList LogicalLocations { get; set; } /// /// An array of zero or more unique graph objects associated with the run. /// [DataMember(Name = "graphs", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Graphs { get; set; } + public virtual IList Graphs { get; set; } /// /// The set of results contained in an SARIF log. The results array can be omitted when a run is solely exporting rules metadata. It must be present (but may be empty) if a log file represents an actual scan. /// [DataMember(Name = "results", IsRequired = false, EmitDefaultValue = false)] - public IList Results { get; set; } + public virtual IList Results { get; set; } /// /// Automation details that describe this run. /// [DataMember(Name = "automationDetails", IsRequired = false, EmitDefaultValue = false)] - public RunAutomationDetails AutomationDetails { get; set; } + public virtual RunAutomationDetails AutomationDetails { get; set; } /// /// Automation details that describe the aggregate of runs to which this run belongs. /// [DataMember(Name = "runAggregates", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList RunAggregates { get; set; } + public virtual IList RunAggregates { get; set; } /// /// The 'guid' property of a previous SARIF 'run' that comprises the baseline that was used to compute result 'baselineState' properties for the run. /// [DataMember(Name = "baselineGuid", IsRequired = false, EmitDefaultValue = false)] - public string BaselineGuid { get; set; } + public virtual string BaselineGuid { get; set; } /// /// An array of strings used to replace sensitive information in a redaction-aware property. /// [DataMember(Name = "redactionTokens", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList RedactionTokens { get; set; } + public virtual IList RedactionTokens { get; set; } /// /// Specifies the default encoding for any artifact object that refers to a text file. /// [DataMember(Name = "defaultEncoding", IsRequired = false, EmitDefaultValue = false)] - public string DefaultEncoding { get; set; } + public virtual string DefaultEncoding { get; set; } /// /// Specifies the default source language for any artifact object that refers to a text file that contains source code. /// [DataMember(Name = "defaultSourceLanguage", IsRequired = false, EmitDefaultValue = false)] - public string DefaultSourceLanguage { get; set; } + public virtual string DefaultSourceLanguage { get; set; } /// /// An ordered list of character sequences that were treated as line breaks when computing region information for the run. /// [DataMember(Name = "newlineSequences", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList NewlineSequences { get; set; } + public virtual IList NewlineSequences { get; set; } /// /// Specifies the unit in which the tool measures columns. /// [DataMember(Name = "columnKind", IsRequired = false, EmitDefaultValue = false)] [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.EnumConverter))] - public ColumnKind ColumnKind { get; set; } + public virtual ColumnKind ColumnKind { get; set; } /// /// References to external property files that should be inlined with the content of a root log file. /// [DataMember(Name = "externalPropertyFileReferences", IsRequired = false, EmitDefaultValue = false)] - public ExternalPropertyFileReferences ExternalPropertyFileReferences { get; set; } + public virtual ExternalPropertyFileReferences ExternalPropertyFileReferences { get; set; } /// /// An array of threadFlowLocation objects cached at run level. /// [DataMember(Name = "threadFlowLocations", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList ThreadFlowLocations { get; set; } + public virtual IList ThreadFlowLocations { get; set; } /// /// An array of toolComponent objects relevant to a taxonomy in which results are categorized. /// [DataMember(Name = "taxonomies", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Taxonomies { get; set; } + public virtual IList Taxonomies { get; set; } /// /// Addresses associated with this run instance, if any. /// [DataMember(Name = "addresses", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList
Addresses { get; set; } + public virtual IList
Addresses { get; set; } /// /// The set of available translations of the localized data provided by the tool. /// [DataMember(Name = "translations", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Translations { get; set; } + public virtual IList Translations { get; set; } /// /// Contains configurations that may potentially override both reportingDescriptor.defaultConfiguration (the tool's default severities) and invocation.configurationOverrides (severities established at run-time from the command line). /// [DataMember(Name = "policies", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList Policies { get; set; } + public virtual IList Policies { get; set; } /// /// An array of request objects cached at run level. /// [DataMember(Name = "webRequests", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList WebRequests { get; set; } + public virtual IList WebRequests { get; set; } /// /// An array of response objects cached at run level. /// [DataMember(Name = "webResponses", IsRequired = false, EmitDefaultValue = false)] [JsonProperty(DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)] - public IList WebResponses { get; set; } + public virtual IList WebResponses { get; set; } /// /// A specialLocations object that defines locations of special significance to SARIF consumers. /// [DataMember(Name = "specialLocations", IsRequired = false, EmitDefaultValue = false)] - public SpecialLocations SpecialLocations { get; set; } + public virtual SpecialLocations SpecialLocations { get; set; } /// /// Key/value pairs that provide additional information about the run. @@ -353,7 +353,7 @@ ISarifNode ISarifNode.DeepClone() /// /// Creates a deep copy of this instance. /// - public Run DeepClone() + public virtual Run DeepClone() { return (Run)DeepCloneCore(); } @@ -363,7 +363,7 @@ private ISarifNode DeepCloneCore() return new Run(this); } - private void Init(Tool tool, IEnumerable invocations, Conversion conversion, string language, IEnumerable versionControlProvenance, IDictionary originalUriBaseIds, IEnumerable artifacts, IEnumerable logicalLocations, IEnumerable graphs, IEnumerable results, RunAutomationDetails automationDetails, IEnumerable runAggregates, string baselineGuid, IEnumerable redactionTokens, string defaultEncoding, string defaultSourceLanguage, IEnumerable newlineSequences, ColumnKind columnKind, ExternalPropertyFileReferences externalPropertyFileReferences, IEnumerable threadFlowLocations, IEnumerable taxonomies, IEnumerable
addresses, IEnumerable translations, IEnumerable policies, IEnumerable webRequests, IEnumerable webResponses, SpecialLocations specialLocations, IDictionary properties) + protected virtual void Init(Tool tool, IEnumerable invocations, Conversion conversion, string language, IEnumerable versionControlProvenance, IDictionary originalUriBaseIds, IEnumerable artifacts, IEnumerable logicalLocations, IEnumerable graphs, IEnumerable results, RunAutomationDetails automationDetails, IEnumerable runAggregates, string baselineGuid, IEnumerable redactionTokens, string defaultEncoding, string defaultSourceLanguage, IEnumerable newlineSequences, ColumnKind columnKind, ExternalPropertyFileReferences externalPropertyFileReferences, IEnumerable threadFlowLocations, IEnumerable taxonomies, IEnumerable
addresses, IEnumerable translations, IEnumerable policies, IEnumerable webRequests, IEnumerable webResponses, SpecialLocations specialLocations, IDictionary properties) { if (tool != null) { diff --git a/src/Sarif/Autogenerated/SarifLog.cs b/src/Sarif/Autogenerated/SarifLog.cs index 3c19ccd70..243027c22 100644 --- a/src/Sarif/Autogenerated/SarifLog.cs +++ b/src/Sarif/Autogenerated/SarifLog.cs @@ -6,17 +6,15 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Microsoft.CodeAnalysis.Sarif.Readers; - using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif { /// - /// Static Analysis Results Format (SARIF) Version 2.0.0-csd.2.beta-2019-01-24 JSON Schema: a standard format for the output of static analysis tools. + /// Static Analysis Results Format (SARIF) Version 2.1.0-rtm.5 JSON Schema: a standard format for the output of static analysis tools. /// [DataContract] - [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "0.61.0.0")] + [GeneratedCode("Microsoft.Json.Schema.ToDotNet", "1.1.5.0")] public partial class SarifLog : PropertyBagHolder, ISarifNode { public static IEqualityComparer ValueComparer => SarifLogEqualityComparer.Instance; @@ -29,7 +27,7 @@ public partial class SarifLog : PropertyBagHolder, ISarifNode /// /// Gets a value indicating the type of object implementing . /// - public SarifNodeKind SarifNodeKind + public virtual SarifNodeKind SarifNodeKind { get { @@ -41,27 +39,27 @@ public SarifNodeKind SarifNodeKind /// The URI of the JSON schema corresponding to the version. ///
[DataMember(Name = "$schema", IsRequired = false, EmitDefaultValue = false)] - [JsonConverter(typeof(UriConverter))] - public Uri SchemaUri { get; set; } + [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.UriConverter))] + public virtual Uri SchemaUri { get; set; } /// /// The SARIF format version of this log file. /// [DataMember(Name = "version", IsRequired = true)] [JsonConverter(typeof(Microsoft.CodeAnalysis.Sarif.Readers.SarifVersionConverter))] - public SarifVersion Version { get; set; } + public virtual SarifVersion Version { get; set; } /// /// The set of runs contained in this log file. /// [DataMember(Name = "runs", IsRequired = true)] - public IList Runs { get; set; } + public virtual IList Runs { get; set; } /// /// References to external property files that share data between runs. /// [DataMember(Name = "inlineExternalProperties", IsRequired = false, EmitDefaultValue = false)] - public IList InlineExternalProperties { get; set; } + public virtual IList InlineExternalProperties { get; set; } /// /// Key/value pairs that provide additional information about the log file. @@ -130,7 +128,7 @@ ISarifNode ISarifNode.DeepClone() /// /// Creates a deep copy of this instance. /// - public SarifLog DeepClone() + public virtual SarifLog DeepClone() { return (SarifLog)DeepCloneCore(); } @@ -140,7 +138,7 @@ private ISarifNode DeepCloneCore() return new SarifLog(this); } - private void Init(Uri schemaUri, SarifVersion version, IEnumerable runs, IEnumerable inlineExternalProperties, IDictionary properties) + protected virtual void Init(Uri schemaUri, SarifVersion version, IEnumerable runs, IEnumerable inlineExternalProperties, IDictionary properties) { if (schemaUri != null) { diff --git a/src/Sarif/NotYetAutoGenerated/Address.cs b/src/Sarif/NotYetAutoGenerated/Address.cs index d30ab1e4d..39ec63b61 100644 --- a/src/Sarif/NotYetAutoGenerated/Address.cs +++ b/src/Sarif/NotYetAutoGenerated/Address.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/Invocation.cs b/src/Sarif/NotYetAutoGenerated/Invocation.cs index 64e420923..6eb1d505f 100644 --- a/src/Sarif/NotYetAutoGenerated/Invocation.cs +++ b/src/Sarif/NotYetAutoGenerated/Invocation.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/Location.cs b/src/Sarif/NotYetAutoGenerated/Location.cs index 52230bfd3..21a679f6b 100644 --- a/src/Sarif/NotYetAutoGenerated/Location.cs +++ b/src/Sarif/NotYetAutoGenerated/Location.cs @@ -7,6 +7,7 @@ using System.ComponentModel; using System.Numerics; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs b/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs index d3ff85819..df8317b58 100644 --- a/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs +++ b/src/Sarif/NotYetAutoGenerated/ReportingConfiguration.cs @@ -6,7 +6,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Microsoft.CodeAnalysis.Sarif.Readers; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/ReportingDescriptor.cs b/src/Sarif/NotYetAutoGenerated/ReportingDescriptor.cs index fbe32c145..7cfc2cfae 100644 --- a/src/Sarif/NotYetAutoGenerated/ReportingDescriptor.cs +++ b/src/Sarif/NotYetAutoGenerated/ReportingDescriptor.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/Result.cs b/src/Sarif/NotYetAutoGenerated/Result.cs index 727faba15..93740a77f 100644 --- a/src/Sarif/NotYetAutoGenerated/Result.cs +++ b/src/Sarif/NotYetAutoGenerated/Result.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/Run.cs b/src/Sarif/NotYetAutoGenerated/Run.cs index 6cb35e484..1345292e3 100644 --- a/src/Sarif/NotYetAutoGenerated/Run.cs +++ b/src/Sarif/NotYetAutoGenerated/Run.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif diff --git a/src/Sarif/NotYetAutoGenerated/SarifLog.cs b/src/Sarif/NotYetAutoGenerated/SarifLog.cs index a91d21798..243027c22 100644 --- a/src/Sarif/NotYetAutoGenerated/SarifLog.cs +++ b/src/Sarif/NotYetAutoGenerated/SarifLog.cs @@ -5,6 +5,7 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Runtime.Serialization; + using Newtonsoft.Json; namespace Microsoft.CodeAnalysis.Sarif