コード例 #1
0
ファイル: Artifact.cs プロジェクト: dbjorge/sarif-sdk
        private void Init(Message description, ArtifactLocation location, int parentIndex, int offset, int length, ArtifactRoles roles, string mimeType, ArtifactContent contents, string encoding, string sourceLanguage, IDictionary <string, string> hashes, DateTime lastModifiedTimeUtc, IDictionary <string, SerializedPropertyInfo> properties)
        {
            if (description != null)
            {
                Description = new Message(description);
            }

            if (location != null)
            {
                Location = new ArtifactLocation(location);
            }

            ParentIndex = parentIndex;
            Offset      = offset;
            Length      = length;
            Roles       = roles;
            MimeType    = mimeType;
            if (contents != null)
            {
                Contents = new ArtifactContent(contents);
            }

            Encoding       = encoding;
            SourceLanguage = sourceLanguage;
            if (hashes != null)
            {
                Hashes = new Dictionary <string, string>(hashes);
            }

            LastModifiedTimeUtc = lastModifiedTimeUtc;
            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
コード例 #2
0
ファイル: Artifact.cs プロジェクト: dbjorge/sarif-sdk
 /// <summary>
 /// Initializes a new instance of the <see cref="Artifact" /> class from the supplied values.
 /// </summary>
 /// <param name="description">
 /// An initialization value for the <see cref="P:Description" /> property.
 /// </param>
 /// <param name="location">
 /// An initialization value for the <see cref="P:Location" /> property.
 /// </param>
 /// <param name="parentIndex">
 /// An initialization value for the <see cref="P:ParentIndex" /> property.
 /// </param>
 /// <param name="offset">
 /// An initialization value for the <see cref="P:Offset" /> property.
 /// </param>
 /// <param name="length">
 /// An initialization value for the <see cref="P:Length" /> property.
 /// </param>
 /// <param name="roles">
 /// An initialization value for the <see cref="P:Roles" /> property.
 /// </param>
 /// <param name="mimeType">
 /// An initialization value for the <see cref="P:MimeType" /> property.
 /// </param>
 /// <param name="contents">
 /// An initialization value for the <see cref="P:Contents" /> property.
 /// </param>
 /// <param name="encoding">
 /// An initialization value for the <see cref="P:Encoding" /> property.
 /// </param>
 /// <param name="sourceLanguage">
 /// An initialization value for the <see cref="P:SourceLanguage" /> property.
 /// </param>
 /// <param name="hashes">
 /// An initialization value for the <see cref="P:Hashes" /> property.
 /// </param>
 /// <param name="lastModifiedTimeUtc">
 /// An initialization value for the <see cref="P:LastModifiedTimeUtc" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public Artifact(Message description, ArtifactLocation location, int parentIndex, int offset, int length, ArtifactRoles roles, string mimeType, ArtifactContent contents, string encoding, string sourceLanguage, IDictionary <string, string> hashes, DateTime lastModifiedTimeUtc, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(description, location, parentIndex, offset, length, roles, mimeType, contents, encoding, sourceLanguage, hashes, lastModifiedTimeUtc, properties);
 }