@@ -8,119 +8,119 @@ namespace Segment
8
8
/// <summary>
9
9
/// Config required to initialize the client
10
10
/// </summary>
11
- public class Config
11
+ public class Config
12
12
{
13
- /// <summary>
14
- /// The REST API endpoint
15
- /// </summary>
16
- internal string Host { get ; set ; }
13
+ /// <summary>
14
+ /// The REST API endpoint
15
+ /// </summary>
16
+ internal string Host { get ; set ; }
17
17
18
- internal string Proxy { get ; set ; }
18
+ internal string Proxy { get ; set ; }
19
19
20
- internal int MaxQueueSize { get ; set ; }
20
+ internal int MaxQueueSize { get ; set ; }
21
21
22
- internal int MaxBatchSize { get ; set ; }
22
+ internal int MaxBatchSize { get ; set ; }
23
23
24
- internal bool Async { get ; set ; }
24
+ internal bool Async { get ; set ; }
25
25
26
- internal bool CompressRequest { get ; set ; }
26
+ internal bool CompressRequest { get ; set ; }
27
27
28
- internal TimeSpan Timeout { get ; set ; }
28
+ internal TimeSpan Timeout { get ; set ; }
29
29
30
- public Config ( )
31
- {
32
- this . Host = Defaults . Host ;
33
- this . Proxy = "" ;
34
- this . Timeout = Defaults . Timeout ;
35
- this . MaxQueueSize = Defaults . MaxQueueCapacity ;
36
- this . MaxBatchSize = Defaults . MaxBatchSize ;
37
- this . Async = Defaults . Async ;
38
- }
30
+ public Config ( )
31
+ {
32
+ this . Host = Defaults . Host ;
33
+ this . Proxy = "" ;
34
+ this . Timeout = Defaults . Timeout ;
35
+ this . MaxQueueSize = Defaults . MaxQueueCapacity ;
36
+ this . MaxBatchSize = Defaults . MaxBatchSize ;
37
+ this . Async = Defaults . Async ;
38
+ }
39
39
40
- /// <summary>
41
- /// Set the API host server address, instead of default server "https://api.segment.io"
42
- /// </summary>
43
- /// <param name="host">Host server url</param>
44
- /// <returns></returns>
45
- public Config SetHost ( string host )
46
- {
47
- this . Host = host ;
48
- return this ;
49
- }
40
+ /// <summary>
41
+ /// Set the API host server address, instead of default server "https://api.segment.io"
42
+ /// </summary>
43
+ /// <param name="host">Host server url</param>
44
+ /// <returns></returns>
45
+ public Config SetHost ( string host )
46
+ {
47
+ this . Host = host ;
48
+ return this ;
49
+ }
50
50
51
- /// <summary>
52
- /// Set the proxy server Uri
53
- /// </summary>
54
- /// <param name="proxy">Proxy server Uri</param>
55
- /// <returns></returns>
56
- public Config SetProxy ( string proxy )
57
- {
58
- this . Proxy = proxy ;
59
- return this ;
60
- }
51
+ /// <summary>
52
+ /// Set the proxy server Uri
53
+ /// </summary>
54
+ /// <param name="proxy">Proxy server Uri</param>
55
+ /// <returns></returns>
56
+ public Config SetProxy ( string proxy )
57
+ {
58
+ this . Proxy = proxy ;
59
+ return this ;
60
+ }
61
61
62
- /// <summary>
63
- /// Sets the maximum amount of timeout on the HTTP request flushes to the server.
64
- /// </summary>
65
- /// <param name="timeout"></param>
66
- /// <returns></returns>
67
- public Config SetTimeout ( TimeSpan timeout )
68
- {
69
- this . Timeout = timeout ;
70
- return this ;
71
- }
72
-
73
- /// <summary>
74
- /// Sets the maximum amount of items that can be in the queue before no more are accepted.
75
- /// </summary>
76
- /// <param name="maxQueueSize"></param>
77
- /// <returns></returns>
78
- public Config SetMaxQueueSize ( int maxQueueSize )
79
- {
80
- this . MaxQueueSize = maxQueueSize ;
81
- return this ;
82
- }
62
+ /// <summary>
63
+ /// Sets the maximum amount of timeout on the HTTP request flushes to the server.
64
+ /// </summary>
65
+ /// <param name="timeout"></param>
66
+ /// <returns></returns>
67
+ public Config SetTimeout ( TimeSpan timeout )
68
+ {
69
+ this . Timeout = timeout ;
70
+ return this ;
71
+ }
72
+
73
+ /// <summary>
74
+ /// Sets the maximum amount of items that can be in the queue before no more are accepted.
75
+ /// </summary>
76
+ /// <param name="maxQueueSize"></param>
77
+ /// <returns></returns>
78
+ public Config SetMaxQueueSize ( int maxQueueSize )
79
+ {
80
+ this . MaxQueueSize = maxQueueSize ;
81
+ return this ;
82
+ }
83
83
84
- /// <summary>
85
- /// Sets the maximum amount of messages to send per batch
86
- /// </summary>
87
- /// <param name="maxBatchSize"></param>
88
- /// <returns></returns>
89
- public Config SetMaxBatchSize ( int maxBatchSize )
90
- {
91
- this . MaxBatchSize = maxBatchSize ;
92
- return this ;
93
- }
84
+ /// <summary>
85
+ /// Sets the maximum amount of messages to send per batch
86
+ /// </summary>
87
+ /// <param name="maxBatchSize"></param>
88
+ /// <returns></returns>
89
+ public Config SetMaxBatchSize ( int maxBatchSize )
90
+ {
91
+ this . MaxBatchSize = maxBatchSize ;
92
+ return this ;
93
+ }
94
94
95
- /// <summary>
96
- /// Sets whether the flushing to the server is synchronous or asynchronous.
97
- ///
98
- /// True is the default and will allow your calls to Analytics.Client.Identify(...), Track(...), etc
99
- /// to return immediately and to be queued to be flushed on a different thread.
100
- ///
101
- /// False is convenient for testing but should not be used in production. False will cause the
102
- /// HTTP requests to happen immediately.
103
- ///
104
- /// </summary>
105
- /// <param name="async">True for async flushing, false for blocking flushing</param>
106
- /// <returns></returns>
107
- public Config SetAsync ( bool async )
95
+ /// <summary>
96
+ /// Sets whether the flushing to the server is synchronous or asynchronous.
97
+ ///
98
+ /// True is the default and will allow your calls to Analytics.Client.Identify(...), Track(...), etc
99
+ /// to return immediately and to be queued to be flushed on a different thread.
100
+ ///
101
+ /// False is convenient for testing but should not be used in production. False will cause the
102
+ /// HTTP requests to happen immediately.
103
+ ///
104
+ /// </summary>
105
+ /// <param name="async">True for async flushing, false for blocking flushing</param>
106
+ /// <returns></returns>
107
+ public Config SetAsync ( bool async )
108
108
{
109
- this . Async = async;
109
+ this . Async = async;
110
110
return this ;
111
111
}
112
112
113
- /// <summary>
114
- /// Sets the API request header uses GZip option.
115
- /// Enable this when the network is the bottleneck for your application (typically in client side applications).
116
- /// If useGZip is set, it compresses request content with GZip algorithm
117
- /// </summary>
118
- /// <param name="bCompress">True to compress request header, false for no compression</param>
119
- /// <returns></returns>
120
- public Config SetRequestCompression ( bool bCompress )
121
- {
122
- this . CompressRequest = bCompress ;
123
- return this ;
124
- }
113
+ /// <summary>
114
+ /// Sets the API request header uses GZip option.
115
+ /// Enable this when the network is the bottleneck for your application (typically in client side applications).
116
+ /// If useGZip is set, it compresses request content with GZip algorithm
117
+ /// </summary>
118
+ /// <param name="bCompress">True to compress request header, false for no compression</param>
119
+ /// <returns></returns>
120
+ public Config SetRequestCompression ( bool bCompress )
121
+ {
122
+ this . CompressRequest = bCompress ;
123
+ return this ;
124
+ }
125
125
}
126
126
}
0 commit comments