Beispiel #1
0
 public QueryDocument(Guid schemaId, DocumentHash hash)
 {
     Id             = Guid.NewGuid();
     SchemaId       = schemaId;
     Hash           = hash;
     ExternalHashes = new HashSet <DocumentHash>();
     Published      = DateTime.UtcNow;
 }
Beispiel #2
0
 public SchemaVersion(
     Guid schemaId,
     string?externalId,
     DocumentHash hash,
     IReadOnlyList <Tag> tags,
     DateTime published)
     : this(Guid.NewGuid(), schemaId, externalId, hash, tags, published)
 {
 }
Beispiel #3
0
 public Query(
     DocumentHash hash,
     ISet <DocumentHash> externalHashes,
     DateTime published)
 {
     Id             = Guid.NewGuid();
     Hash           = hash;
     ExternalHashes = externalHashes;
     Published      = published;
 }
Beispiel #4
0
 public Query(
     Guid id,
     DocumentHash hash,
     ISet <DocumentHash> externalHashes,
     DateTime published)
 {
     Id             = id;
     Hash           = hash;
     ExternalHashes = externalHashes;
     Published      = published;
 }
Beispiel #5
0
 public QueryDocument(
     Guid schemaId,
     DocumentHash hash,
     ISet <DocumentHash> externalHashes,
     DateTime published)
 {
     Id             = Guid.NewGuid();
     SchemaId       = schemaId;
     Hash           = hash;
     ExternalHashes = externalHashes;
     Published      = published;
 }
 public SchemaVersion(
     Guid id,
     Guid schemaId,
     string?externalId,
     DocumentHash hash,
     IReadOnlyList <Tag> tags,
     DateTime published)
 {
     Id         = id;
     SchemaId   = schemaId;
     ExternalId = externalId ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);
     Hash       = hash;
     Tags       = tags;
     Published  = published;
 }
Beispiel #7
0
        public SchemaVersion(
            Guid id,
            Guid schemaId,
            string?externalId,
            DocumentHash hash,
            IReadOnlyList <Tag> tags,
            DateTime published)
        {
            if (tags.Count > 1)
            {
                tags = new HashSet <Tag>(tags, TagComparer.Default).ToList();
            }

            Id         = id;
            SchemaId   = schemaId;
            ExternalId = externalId ?? Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);
            Hash       = hash;
            Tags       = tags;
            Published  = published;
        }