Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
SecurityString.cs
2{
6 public abstract class SecurityString : SecurityObject
7 {
8 protected bool configured;
9
13 public override bool IsConfigured => this.configured;
14
20 public override bool Configure(Vector SecurityInfo)
21 {
22 if (SecurityInfo.Length == 2)
23 {
24 object? Value = SecurityInfo[1];
25
26 if (Value is null)
27 this.Value = null;
28 else if (Value is string StringValue)
29 this.Value = StringValue;
30 else
31 return false;
32
33 this.configured = true;
34
35 return true;
36 }
37 else
38 return false;
39 }
40
44 public string? Value { get; protected set; } = string.Empty;
45
47 public override string ToString()
48 {
49 return this.GetType().Name + ": " + (this.Value ?? string.Empty);
50 }
51 }
52}
Abstract base class for security objects.
Abstract base class for security objects that represent named string values.
override bool IsConfigured
If the object has been configured.
override bool Configure(Vector SecurityInfo)
If the object can be configured by the security information provided.