-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathConnection.cs
59 lines (53 loc) · 1.43 KB
/
Connection.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
54
55
56
57
58
59
using System;
namespace sparkiy.Connectors.IoT.Windows
{
/// <summary>
/// Connection data for <see cref="DeviceApi"/> client.
/// </summary>
public class Connection
{
/// <summary>
/// Initializes a new instance of the <see cref="Connection"/> class.
/// </summary>
public Connection()
{
}
/// <summary>
/// Initializes a new instance of the <see cref="Connection"/> class.
/// </summary>
/// <param name="machineName">Name of the machine.</param>
/// <param name="port">The port.</param>
/// <exception cref="System.ArgumentNullException">
/// machineName
/// or
/// port
/// </exception>
public Connection(string machineName, string port)
{
if (string.IsNullOrWhiteSpace(machineName)) throw new ArgumentNullException(nameof(machineName));
if (string.IsNullOrWhiteSpace(port)) throw new ArgumentNullException(nameof(port));
this.MachineName = machineName;
this.RestApiPort = port;
}
/// <summary>
/// Gets or sets the name of the machine.
/// </summary>
/// <value>
/// The name of the machine.
/// </value>
/// <remarks>
/// Default value is <c>minwinpc</c>.
/// </remarks>
public string MachineName { get; set; } = "minwinpc";
/// <summary>
/// Gets or sets the REST API port.
/// </summary>
/// <value>
/// The REST API port.
/// </value>
/// <remarks>
/// Default value is <c>8080</c>
/// </remarks>
public string RestApiPort { get; set; } = "8080";
}
}