17
17
using System . Net . Http . Headers ;
18
18
using System . Net . Security ;
19
19
using System . Reflection ;
20
+ using System . Runtime . Versioning ;
20
21
using System . Security . Cryptography . X509Certificates ;
21
22
using System . Text ;
22
23
using RestSharp . Authenticators ;
23
24
using RestSharp . Extensions ;
24
25
26
+ // ReSharper disable UnusedAutoPropertyAccessor.Global
27
+ // ReSharper disable PropertyCanBeMadeInitOnly.Global
28
+ // ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
29
+
25
30
namespace RestSharp ;
26
31
27
32
[ GenerateImmutable ]
@@ -62,13 +67,19 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
62
67
/// <summary>
63
68
/// Passed to <see cref="HttpMessageHandler"/> <code>Credentials</code> property
64
69
/// </summary>
70
+ #if NET
71
+ [ UnsupportedOSPlatform ( "browser" ) ]
72
+ #endif
65
73
public ICredentials ? Credentials { get ; set ; }
66
74
67
75
/// <summary>
68
76
/// Determine whether or not the "default credentials" (e.g. the user account under which the current process is
69
77
/// running) will be sent along to the server. The default is false.
70
78
/// Passed to <see cref="HttpMessageHandler"/> <code>UseDefaultCredentials</code> property
71
79
/// </summary>
80
+ #if NET
81
+ [ UnsupportedOSPlatform ( "browser" ) ]
82
+ #endif
72
83
public bool UseDefaultCredentials { get ; set ; }
73
84
74
85
/// <summary>
@@ -80,6 +91,7 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
80
91
/// Set the decompression method to use when making requests
81
92
/// </summary>
82
93
#if NET
94
+ [ UnsupportedOSPlatform ( "browser" ) ]
83
95
public DecompressionMethods AutomaticDecompression { get ; set ; } = DecompressionMethods . All ;
84
96
#else
85
97
public DecompressionMethods AutomaticDecompression { get ; set ; } = DecompressionMethods . GZip ;
@@ -88,16 +100,27 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
88
100
/// <summary>
89
101
/// Set the maximum number of redirects to follow
90
102
/// </summary>
103
+ #if NET
104
+ [ UnsupportedOSPlatform ( "browser" ) ]
105
+ #endif
91
106
public int ? MaxRedirects { get ; set ; }
92
107
93
108
/// <summary>
94
109
/// X509CertificateCollection to be sent with request
95
110
/// </summary>
111
+ #if NET
112
+ [ UnsupportedOSPlatform ( "browser" ) ]
113
+ #endif
96
114
public X509CertificateCollection ? ClientCertificates { get ; set ; }
97
115
98
116
/// <summary>
99
117
/// Set the proxy to use when making requests. Default is null, which will use the default system proxy if one is set.
100
118
/// </summary>
119
+ #if NET
120
+ [ UnsupportedOSPlatform ( "browser" ) ]
121
+ [ UnsupportedOSPlatform ( "ios" ) ]
122
+ [ UnsupportedOSPlatform ( "tvos" ) ]
123
+ #endif
101
124
public IWebProxy ? Proxy { get ; set ; }
102
125
103
126
/// <summary>
@@ -123,12 +146,18 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
123
146
/// <summary>
124
147
/// Passed to <see cref="HttpMessageHandler"/> <see langword="PreAuthenticate"/> property
125
148
/// </summary>
149
+ #if NET
150
+ [ UnsupportedOSPlatform ( "browser" ) ]
151
+ #endif
126
152
public bool PreAuthenticate { get ; set ; }
127
153
128
154
/// <summary>
129
155
/// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
130
156
/// overriding certificate errors in the scope of a request.
131
157
/// </summary>
158
+ #if NET
159
+ [ UnsupportedOSPlatform ( "browser" ) ]
160
+ #endif
132
161
public RemoteCertificateValidationCallback ? RemoteCertificateValidationCallback { get ; set ; }
133
162
134
163
/// <summary>
0 commit comments