@@ -11,14 +11,14 @@ namespace Microsoft.Graph
11
11
using System . Reflection ;
12
12
using System . Net . Http . Headers ;
13
13
14
-
14
+
15
15
/// <summary>
16
16
/// GraphClientFactory class to create the HTTP client
17
17
/// </summary>
18
- public static class GraphClientFactory
18
+ internal static class GraphClientFactory
19
19
{
20
20
21
-
21
+
22
22
/// The key for the SDK version header.
23
23
private static readonly string SdkVersionHeaderName = CoreConstants . Headers . SdkVersionHeaderName ;
24
24
@@ -58,31 +58,31 @@ public static class GraphClientFactory
58
58
public const string Germany_Cloud = "Germany" ;
59
59
60
60
/// <summary>
61
- /// Proxy to be used with created clients
61
+ /// Proxy to be used with created clients
62
62
/// </summary>
63
63
public static IWebProxy Proxy { get ; set ; }
64
64
65
65
/// <summary>
66
66
/// DefaultHandler is a Func that returns the HttpMessageHandler for actually making the HTTP calls.
67
- /// The default implementation returns a new instance of HttpClientHandler for each HttpClient.
67
+ /// The default implementation returns a new instance of HttpClientHandler for each HttpClient.
68
68
/// </summary>
69
69
public static Func < HttpMessageHandler > DefaultHttpHandler = ( ) => {
70
70
return new HttpClientHandler
71
71
{
72
72
Proxy = Proxy
73
73
} ;
74
74
} ;
75
-
75
+
76
76
77
77
/// <summary>
78
78
/// Creates a new <see cref="HttpClient"/> instance configured with the handlers provided and with the
79
79
/// provided <paramref name="innerHandler"/> as the innermost handler.
80
80
/// </summary>
81
81
/// <param name="innerHandler">The inner handler represents the destination of the HTTP message channel.</param>
82
- /// <param name="handlers">An ordered list of <see cref="DelegatingHandler"/> instances to be invoked as an
83
- /// <see cref="HttpRequestMessage"/> travels from the <see cref="HttpClient"/> to the network and an
82
+ /// <param name="handlers">An ordered list of <see cref="DelegatingHandler"/> instances to be invoked as an
83
+ /// <see cref="HttpRequestMessage"/> travels from the <see cref="HttpClient"/> to the network and an
84
84
/// <see cref="HttpResponseMessage"/> travels from the network back to <see cref="HttpClient"/>.
85
- /// The handlers are invoked in a top-down fashion. That is, the first entry is invoked first for
85
+ /// The handlers are invoked in a top-down fashion. That is, the first entry is invoked first for
86
86
/// an outbound request message but last for an inbound response message.</param>
87
87
/// <returns>An <see cref="HttpClient"/> instance with the configured handlers.</returns>
88
88
public static HttpClient Create ( string version = "v1.0" , string nationalCloud = Global_Cloud , IEnumerable < DelegatingHandler > handlers = null )
@@ -113,7 +113,7 @@ public static IEnumerable<DelegatingHandler> CreateDefaultHandlers()
113
113
return new List < DelegatingHandler > {
114
114
new RetryHandler ( ) ,
115
115
new RedirectHandler ( )
116
- } ;
116
+ } ;
117
117
}
118
118
119
119
private static Uri DetermineBaseAddress ( string nationalCloud , string version )
@@ -127,16 +127,16 @@ private static Uri DetermineBaseAddress(string nationalCloud, string version)
127
127
return new Uri ( cloudAddress ) ;
128
128
129
129
}
130
-
130
+
131
131
/// <summary>
132
132
/// Creates an instance of an <see cref="HttpMessageHandler"/> using the <see cref="DelegatingHandler"/> instances
133
133
/// provided by <paramref name="handlers"/>. The resulting pipeline can be used to manually create <see cref="HttpClient"/>
134
134
/// or <see cref="HttpMessageInvoker"/> instances with customized message handlers.
135
135
/// </summary>
136
136
/// <param name="innerHandler">The inner handler represents the destination of the HTTP message channel.</param>
137
- /// <param name="handlers">An ordered list of <see cref="DelegatingHandler"/> instances to be invoked as part
137
+ /// <param name="handlers">An ordered list of <see cref="DelegatingHandler"/> instances to be invoked as part
138
138
/// of sending an <see cref="HttpRequestMessage"/> and receiving an <see cref="HttpResponseMessage"/>.
139
- /// The handlers are invoked in a top-down fashion. That is, the first entry is invoked first for
139
+ /// The handlers are invoked in a top-down fashion. That is, the first entry is invoked first for
140
140
/// an outbound request message but last for an inbound response message.</param>
141
141
/// <returns>The HTTP message channel.</returns>
142
142
public static HttpMessageHandler CreatePipeline ( IEnumerable < DelegatingHandler > handlers , HttpMessageHandler innerHandler = null )
0 commit comments