Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
MongoDBSettings.cs
1
using
Waher.Content
;
2
using
Waher.Persistence
;
3
using
Waher.Persistence.Attributes
;
4
5
namespace
Waher.IoTGateway.Setup.Databases
6
{
10
public
class
MongoDBSettings
:
DatabaseSettings
,
IHostReference
,
IEncryptedProperties
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
22
public
MongoDBSettings
()
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
}
Waher.IoTGateway.Setup.Databases.DatabaseSettings
Interface for Database settings
Definition:
DatabaseSettings.cs:10
Waher.IoTGateway.Setup.Databases.MongoDBSettings
MongoDB Settings.
Definition:
MongoDBSettings.cs:11
Waher.IoTGateway.Setup.Databases.MongoDBSettings.EncryptedProperties
string[] EncryptedProperties
Array of properties that are encrypted.
Definition:
MongoDBSettings.cs:89
Waher.IoTGateway.Setup.Databases.MongoDBSettings.Host
string Host
Name of database host, or empty if running on local machine.
Definition:
MongoDBSettings.cs:31
Waher.IoTGateway.Setup.Databases.MongoDBSettings.UserName
string UserName
User Name
Definition:
MongoDBSettings.cs:71
Waher.IoTGateway.Setup.Databases.MongoDBSettings.DefaultCollection
string DefaultCollection
Default collection
Definition:
MongoDBSettings.cs:61
Waher.IoTGateway.Setup.Databases.MongoDBSettings.MongoDBSettings
MongoDBSettings()
MongoDB Settings.
Definition:
MongoDBSettings.cs:22
Waher.IoTGateway.Setup.Databases.MongoDBSettings.Password
string Password
User Name
Definition:
MongoDBSettings.cs:81
Waher.IoTGateway.Setup.Databases.MongoDBSettings.Port
int? Port
Port number, or null if standard MongoDB service port.
Definition:
MongoDBSettings.cs:41
Waher.Persistence.Database
Static interface for database persistence. In order to work, a database provider has to be assigned t...
Definition:
Database.cs:21
Waher.Content.IHostReference
Interface for objects that contain a reference to a host.
Definition:
IHostReference.cs:7
Waher.Persistence.IEncryptedProperties
Interface for objects containing encrypted properties. Mark the properties that are encrypted with th...
Definition:
IEncryptedProperties.cs:10
Waher.Content
Definition:
Array.cs:6
Waher.IoTGateway.Setup.Databases
Definition:
DatabaseSettings.cs:4
Waher.Persistence.Attributes
Definition:
ArchivingTimeAttribute.cs:4
Waher.Persistence
Definition:
Bookmark.cs:4
IoTGateway
Waher.IoTGateway
Setup
Databases
MongoDBSettings.cs
Generated by
1.9.5