You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
-
- namespace Discord.Net.Rest
- {
- public static class DefaultRestClientProvider
- {
- public static readonly RestClientProvider Instance = Create();
-
- /// <exception cref="PlatformNotSupportedException">The default RestClientProvider is not supported on this platform.</exception>
- public static RestClientProvider Create(bool useProxy = false)
- {
- return url =>
- {
- try
- {
- return new DefaultRestClient(url, useProxy);
- }
- catch (PlatformNotSupportedException ex)
- {
- throw new PlatformNotSupportedException("The default RestClientProvider is not supported on this platform.", ex);
- }
- };
- }
- }
- }
|