1717using System . Net . Http . Headers ;
1818using System . Net . Security ;
1919using System . Reflection ;
20+ using System . Runtime . Versioning ;
2021using System . Security . Cryptography . X509Certificates ;
2122using System . Text ;
2223using RestSharp . Authenticators ;
2324using RestSharp . Extensions ;
2425
26+ // ReSharper disable UnusedAutoPropertyAccessor.Global
27+ // ReSharper disable PropertyCanBeMadeInitOnly.Global
28+ // ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
29+
2530namespace RestSharp ;
2631
2732[ GenerateImmutable ]
@@ -62,13 +67,19 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
6267 /// <summary>
6368 /// Passed to <see cref="HttpMessageHandler"/> <code>Credentials</code> property
6469 /// </summary>
70+ #if NET
71+ [ UnsupportedOSPlatform ( "browser" ) ]
72+ #endif
6573 public ICredentials ? Credentials { get ; set ; }
6674
6775 /// <summary>
6876 /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is
6977 /// running) will be sent along to the server. The default is false.
7078 /// Passed to <see cref="HttpMessageHandler"/> <code>UseDefaultCredentials</code> property
7179 /// </summary>
80+ #if NET
81+ [ UnsupportedOSPlatform ( "browser" ) ]
82+ #endif
7283 public bool UseDefaultCredentials { get ; set ; }
7384
7485 /// <summary>
@@ -80,6 +91,7 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
8091 /// Set the decompression method to use when making requests
8192 /// </summary>
8293#if NET
94+ [ UnsupportedOSPlatform ( "browser" ) ]
8395 public DecompressionMethods AutomaticDecompression { get ; set ; } = DecompressionMethods . All ;
8496#else
8597 public DecompressionMethods AutomaticDecompression { get ; set ; } = DecompressionMethods . GZip ;
@@ -88,16 +100,27 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
88100 /// <summary>
89101 /// Set the maximum number of redirects to follow
90102 /// </summary>
103+ #if NET
104+ [ UnsupportedOSPlatform ( "browser" ) ]
105+ #endif
91106 public int ? MaxRedirects { get ; set ; }
92107
93108 /// <summary>
94109 /// X509CertificateCollection to be sent with request
95110 /// </summary>
111+ #if NET
112+ [ UnsupportedOSPlatform ( "browser" ) ]
113+ #endif
96114 public X509CertificateCollection ? ClientCertificates { get ; set ; }
97115
98116 /// <summary>
99117 /// Set the proxy to use when making requests. Default is null, which will use the default system proxy if one is set.
100118 /// </summary>
119+ #if NET
120+ [ UnsupportedOSPlatform ( "browser" ) ]
121+ [ UnsupportedOSPlatform ( "ios" ) ]
122+ [ UnsupportedOSPlatform ( "tvos" ) ]
123+ #endif
101124 public IWebProxy ? Proxy { get ; set ; }
102125
103126 /// <summary>
@@ -123,12 +146,18 @@ public RestClientOptions(string baseUrl) : this(new Uri(Ensure.NotEmptyString(ba
123146 /// <summary>
124147 /// Passed to <see cref="HttpMessageHandler"/> <see langword="PreAuthenticate"/> property
125148 /// </summary>
149+ #if NET
150+ [ UnsupportedOSPlatform ( "browser" ) ]
151+ #endif
126152 public bool PreAuthenticate { get ; set ; }
127153
128154 /// <summary>
129155 /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and
130156 /// overriding certificate errors in the scope of a request.
131157 /// </summary>
158+ #if NET
159+ [ UnsupportedOSPlatform ( "browser" ) ]
160+ #endif
132161 public RemoteCertificateValidationCallback ? RemoteCertificateValidationCallback { get ; set ; }
133162
134163 /// <summary>
0 commit comments