3using System.Threading.Tasks;
17 private readonly
string fileName;
18 private readonly DateTime created;
19 private readonly DateTime updated;
31 : this(
FileName, Created, Updated, null)
46 this.created = Created;
47 this.updated = Updated;
48 this.identity = Identity;
49 this.variables =
null;
57 this.created = Created;
58 this.updated = Updated;
61 this.identity = Identity;
66 return new PreviewIdApplication(this.fileName, this.created, this.updated,
73 public async Task<LegalIdentity>
Load()
75 this.identity ??= await
LegalComponent.GetPreviewIdentity(this.fileName);
86 get => this.identity?.
Id ?? this.
Load().Result?.Id;
87 set =>
throw InvalidOperation();
92 get => this.identity?.
Provider ?? this.
Load().Result?.Provider;
93 set =>
throw InvalidOperation();
99 set =>
throw InvalidOperation();
104 get => this.identity?.Account ?? this.
Load().Result?.Account;
105 set =>
throw InvalidOperation();
108 public DateTime Created
111 set =>
throw InvalidOperation();
114 public DateTime Updated
117 set =>
throw InvalidOperation();
122 get => this.identity?.
From ?? this.
Load().Result?.From ?? DateTime.MinValue;
123 set =>
throw InvalidOperation();
128 get => this.identity?.
To ?? this.
Load().Result?.To ?? DateTime.MinValue;
129 set =>
throw InvalidOperation();
132 public Property[] Properties
134 get => this.identity?.
Properties ?? this.
Load().Result?.Properties;
135 set =>
throw InvalidOperation();
141 set =>
throw InvalidOperation();
144 public string ClientKeyName
147 set =>
throw InvalidOperation();
150 public byte[] ClientPubKey
153 set =>
throw InvalidOperation();
156 public byte[] ClientSignature
159 set =>
throw InvalidOperation();
162 public byte[] ServerSignature
165 set =>
throw InvalidOperation();
168 public int NrPeerReviews
170 get => this.identity?.NrPeerReviews ?? this.
Load().Result?.NrPeerReviews ?? 0;
171 set =>
throw InvalidOperation();
176 get => this.identity?.Version ?? this.
Load().Result?.Version ??
NamespaceSet.Unknown;
177 set =>
throw InvalidOperation();
180 public object this[
string Property]
184 LegalIdentity Identity = this.identity ?? this.
Load().Result;
188 !IsWellKnownIdentityProperty(Property))
204 private static bool IsWellKnownIdentityProperty(
string Property)
206 switch (Property.ToUpperInvariant())
247 private static InvalidOperationException InvalidOperation()
249 return new InvalidOperationException(
"Object is read-only.");
Represents a case-insensitive string.
static bool IsNullOrEmpty(CaseInsensitiveString value)
Indicates whether the specified string is null or an CaseInsensitiveString.Empty string.
Base class for all nodes in a parsed script tree.
Represents a variable reference.
static IElement TryGetConstant(string VariableName, Variables Variables, ScriptNode Node)
Tries to get a constant value, given a variable name. This method will also check for namespaces and ...
Represents an attachment to a document.
byte[] ClientSignature
Client signature
Property[] Properties
Properties detailing the legal identity.
CaseInsensitiveString Id
ID of the legal identity
CaseInsensitiveString Provider
Provider where the identity is maintained.
AttachmentReference[] Attachments
Attachments assigned to the legal identity.
DateTime To
To what point in time the legal identity is valid.
byte[] ClientPubKey
Client Public key
DateTime From
From what point in time the legal identity is valid.
IdentityState State
Current state of identity
byte[] ServerSignature
Server signature
string ClientKeyName
Type of key used for client signatures
Preview of an ID Application.
async Task< LegalIdentity > Load()
Loads the preview identity.
PreviewIdApplication(string FileName, DateTime Created, DateTime Updated)
Preview of an ID Application.
string FileName
Name of encrypted file.
PreviewIdApplication(string FileName, DateTime Created, DateTime Updated, LegalIdentity Identity)
Preview of an ID Application.
Legal (digital identities, smart contracts) service component.
Basic interface for all types of elements.
object AssociatedObjectValue
Associated object value.
IdentityState
Lists recognized legal identity states.
NamespaceSet
Namespace versions