Files
Discord.Net/src/Discord.Net.WebSocket/Net/DefaultUdpSocketProvider.cs
RogueException a306d83283 Added net45 TFM
2017-04-26 10:25:08 -03:00

27 lines
875 B
C#

using System;
namespace Discord.Net.Udp
{
public static class DefaultUdpSocketProvider
{
#if DEFAULTUDPCLIENT
public static readonly UdpSocketProvider Instance = () =>
{
try
{
return new DefaultUdpSocket();
}
catch (PlatformNotSupportedException ex)
{
throw new PlatformNotSupportedException("The default UdpSocketProvider is not supported on this platform.", ex);
}
};
#else
public static readonly UdpSocketProvider Instance = () =>
{
throw new PlatformNotSupportedException("The default UdpSocketProvider is not supported on this platform.\n" +
"You must specify a UdpSocketProvider or target a runtime supporting .NET Standard 1.3, such as .NET Framework 4.6+.");
};
#endif
}
}