Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
MongoDBSettings.cs
1using Waher.Content;
4
6{
11 {
12 private string host = string.Empty;
13 private string database = "IoTGateway";
14 private string defaultCollection = "Default";
15 private string userName = string.Empty;
16 private string password = string.Empty;
17 private int? port = null;
18
23 {
24 }
25
29 [DefaultValueStringEmpty]
30 public string Host
31 {
32 get => this.host;
33 set => this.host = value;
34 }
35
39 [DefaultValueNull]
40 public int? Port
41 {
42 get => this.port;
43 set => this.port = value;
44 }
45
49 [DefaultValue("IoTGateway")]
50 public string Database
51 {
52 get => this.database;
53 set => this.database = value;
54 }
55
59 [DefaultValue("Default")]
60 public string DefaultCollection
61 {
62 get => this.defaultCollection;
63 set => this.defaultCollection = value;
64 }
65
69 [DefaultValueStringEmpty]
70 public string UserName
71 {
72 get => this.userName;
73 set => this.userName = value;
74 }
75
79 [Encrypted(32)]
80 public string Password
81 {
82 get => this.password;
83 set => this.password = value;
84 }
85
89 public string[] EncryptedProperties => new string[] { nameof(this.Password) };
90 }
91}
string[] EncryptedProperties
Array of properties that are encrypted.
string Host
Name of database host, or empty if running on local machine.
int? Port
Port number, or null if standard MongoDB service port.
Static interface for database persistence. In order to work, a database provider has to be assigned t...
Definition: Database.cs:21
Interface for objects that contain a reference to a host.
Interface for objects containing encrypted properties. Mark the properties that are encrypted with th...