-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathClientSettings.cs
More file actions
34 lines (28 loc) · 988 Bytes
/
ClientSettings.cs
File metadata and controls
34 lines (28 loc) · 988 Bytes
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
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
namespace Examples.Common
{
using System.Net;
public class ClientSettings
{
public static bool IsSsl
{
get
{
string ssl = ExampleHelper.Configuration["ssl"];
return !string.IsNullOrEmpty(ssl) && bool.Parse(ssl);
}
}
public static IPAddress Host => IPAddress.Parse(ExampleHelper.Configuration["host"]);
public static int Port => int.Parse(ExampleHelper.Configuration["port"]);
public static int Size => int.Parse(ExampleHelper.Configuration["size"]);
public static bool UseLibuv
{
get
{
string libuv = ExampleHelper.Configuration["libuv"];
return !string.IsNullOrEmpty(libuv) && bool.Parse(libuv);
}
}
}
}