-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCredentials.cs
53 lines (47 loc) · 1.25 KB
/
Credentials.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using System;
namespace sparkiy.Connectors.IoT.Windows
{
/// <summary>
/// <see cref="DeviceApi"/> credentials.
/// </summary>
public class Credentials
{
/// <summary>
/// Initializes a new instance of the <see cref="Credentials"/> class.
/// </summary>
public Credentials()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="Credentials"/> class.
/// </summary>
/// <param name="userName">Name of the user.</param>
/// <param name="password">The password.</param>
/// <exception cref="System.ArgumentNullException">
/// userName
/// or
/// password
/// </exception>
public Credentials(string userName, string password)
{
if (string.IsNullOrWhiteSpace(userName)) throw new ArgumentNullException(nameof(userName));
if (string.IsNullOrWhiteSpace(password)) throw new ArgumentNullException(nameof(password));
this.UserName = userName;
this.Password = password;
}
/// <summary>
/// Gets or sets the user name of the user.
/// </summary>
/// <value>
/// The user name of the user.
/// </value>
public string UserName { get; set; }
/// <summary>
/// Gets or sets the password.
/// </summary>
/// <value>
/// The password.
/// </value>
public string Password { get; set; }
}
}