-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathConfig.cs
More file actions
74 lines (59 loc) · 1.75 KB
/
Copy pathConfig.cs
File metadata and controls
74 lines (59 loc) · 1.75 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace contentstack.CMA
{
internal class Config
{
#region Private Variable
private string _Protocol;
private string _Host;
private string _Port;
private string _Version;
#endregion
#region Public Properties
public string ApiKey { get; set; }
public string AppUid { get; set; }
public string AuthToken { get; set; }
public string Port {
get { return this._Port ?? "443"; }
set { this._Port = value; }
}
public string Protocol {
get { return this._Protocol ?? "https"; }
set { this._Protocol = value; }
}
public string Host {
get { return _Host ?? HostURL; }
set { this._Host = value; }
}
public string Version
{
get { return this._Version ?? "v3"; }
set { this._Version = value; }
}
public string BaseUrl
{
get
{
string BaseURL = string.Format("{0}://{1}/{2}",
this.Protocol.Trim('/').Trim('\\'),
this.Host.Trim('/').Trim('\\'),
this.Version.Trim('/').Trim('\\'));
return BaseURL;
}
}
#endregion
#region Internal
internal string HostURL
{
get
{
return "cdn.contentstack.io";
}
}
#endregion
}
}