Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
AttachmentReference.cs
1using System;
5
7{
12 {
13 private CaseInsensitiveString id = null;
14 private CaseInsensitiveString legalId = null;
15 private string contentType = string.Empty;
16 private string fileName = null;
17 private byte[] signature = null;
18 private DateTime timestamp = DateTime.MinValue;
19 private bool preview = false;
20
25 {
26 }
27
33 {
34 this.id = Reference.id;
35 this.legalId = Reference.legalId;
36 this.contentType = Reference.contentType;
37 this.fileName = Reference.fileName;
38 this.signature = Reference.signature;
39 this.timestamp = Reference.timestamp;
40 }
41
46 {
47 get => this.id;
48 set => this.id = value;
49 }
50
55 {
56 get => this.legalId;
57 set => this.legalId = value;
58 }
59
63 public string ContentType
64 {
65 get => this.contentType;
66 set => this.contentType = value;
67 }
68
72 public string FileName
73 {
74 get => this.fileName;
75 set => this.fileName = value;
76 }
77
82 [DefaultValueNull]
83 public byte[] Signature
84 {
85 get => this.signature;
86 set => this.signature = value;
87 }
88
92 [DefaultValueDateTimeMinValue]
93 public DateTime Timestamp
94 {
95 get => this.timestamp;
96 set => this.timestamp = value;
97 }
98
102 [DefaultValue(false)]
103 public bool Preview
104 {
105 get => this.preview;
106 set => this.preview = value;
107 }
108
112 string ILegalIdentityAttachment.Id => this.id?.Value;
113
117 string ILegalIdentityAttachment.LegalId => this.legalId?.Value;
118
124 public bool UpdateRequiresReview(AttachmentReference UpdatedAttachmentReference)
125 {
126 return this.id != UpdatedAttachmentReference.id ||
127 this.legalId != UpdatedAttachmentReference.legalId ||
128 this.contentType != UpdatedAttachmentReference.contentType ||
129 this.fileName != UpdatedAttachmentReference.fileName ||
130 this.timestamp != UpdatedAttachmentReference.timestamp ||
131 Convert.ToBase64String(this.signature) != Convert.ToBase64String(UpdatedAttachmentReference.signature);
132 }
133 }
134}
Represents a case-insensitive string.
string Value
String-representation of the case-insensitive string. (Representation is case sensitive....
static readonly CaseInsensitiveString Empty
Empty case-insensitive string