5using System.Xml.Schema;
13 [CollectionName(
"ValidationSchemas")]
16 [Index(
"Namespace",
"HashBase64")]
17 [Index(
"Namespace",
"Created")]
20 private string objectId =
null;
22 private string hashBase64 =
string.
Empty;
23 private string contentType =
string.
Empty;
24 private byte[] xmlSchema =
null;
26 private DateTime created = DateTime.MinValue;
36 set => this.objectId = value;
45 set => this.ns = value;
53 get => this.hashBase64;
54 set => this.hashBase64 = value;
64 set => this.function = value;
73 get => this.xmlSchema;
74 set => this.xmlSchema = value;
80 [DefaultValueStringEmpty]
83 get => this.contentType;
84 set => this.contentType = value;
93 set => this.created = value;
105 if (
string.IsNullOrEmpty(this.contentType))
110 Encoding = Header.Encoding;
113 return (Encoding ?? Encoding.UTF8).GetString(this.xmlSchema);
124 if (this.parsed is
null)
126 using XmlReader r = XmlReader.Create(
new MemoryStream(this.xmlSchema));
127 this.parsed =
System.Xml.Schema.XmlSchema.Read(r,
null);
Represents a case-insensitive string.
static readonly CaseInsensitiveString Empty
Empty case-insensitive string
byte[] XmlSchema
XML Schema
XmlSchema Parsed
Parsed XML schema.
string Xml
XML representation of schema.
HashFunction Function
Hash Function used
CaseInsensitiveString Namespace
Namespace of schema
string HashBase64
Hash of schema
string ContentType
Content-Type
DateTime Created
When object was created
TypeNameSerialization
How the type name should be serialized.
HashFunction
Hash method enumeration.