Moved Frame models, added default providers
This commit is contained in:
19
src/Discord.Net.Rest/Net/DefaultRestClientProvider.cs
Normal file
19
src/Discord.Net.Rest/Net/DefaultRestClientProvider.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace Discord.Net.Rest
|
||||
{
|
||||
public static class DefaultRestClientProvider
|
||||
{
|
||||
public static readonly RestClientProvider Instance = url =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return new DefaultRestClient(url);
|
||||
}
|
||||
catch (PlatformNotSupportedException ex)
|
||||
{
|
||||
throw new PlatformNotSupportedException("The default RestClientProvider is not supported on this platform.", ex);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user