Minor changes
This commit is contained in:
@@ -255,7 +255,7 @@ namespace Discord.Audio
|
||||
{
|
||||
if (data == null) throw new ArgumentException(nameof(data));
|
||||
if (count < 0) throw new ArgumentOutOfRangeException(nameof(count));
|
||||
if (offset < 0) throw new ArgumentOutOfRangeException(nameof(count));
|
||||
if (offset < 0) throw new ArgumentOutOfRangeException(nameof(offset));
|
||||
if (VoiceSocket.Server == null) return; //Has been closed
|
||||
if (count == 0) return;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ using APIRole = Discord.API.Client.Role;
|
||||
|
||||
namespace Discord
|
||||
{
|
||||
public class Role : IMentionable
|
||||
public class Role : IMentionable
|
||||
{
|
||||
private readonly static Action<Role, Role> _cloner = DynamicIL.CreateCopyMethod<Role>();
|
||||
|
||||
|
||||
@@ -10,17 +10,12 @@ namespace Discord
|
||||
{
|
||||
internal static readonly IFormatProvider _format = CultureInfo.InvariantCulture;
|
||||
|
||||
public static ulong ToId(this string value)
|
||||
=> ulong.Parse(value, NumberStyles.None, _format);
|
||||
public static ulong? ToNullableId(this string value)
|
||||
=> value == null ? (ulong?)null : ulong.Parse(value, NumberStyles.None, _format);
|
||||
public static bool TryToId(this string value, out ulong result)
|
||||
=> ulong.TryParse(value, NumberStyles.None, _format, out result);
|
||||
public static ulong ToId(this string value) => ulong.Parse(value, NumberStyles.None, _format);
|
||||
public static ulong? ToNullableId(this string value) => value == null ? (ulong?)null : ulong.Parse(value, NumberStyles.None, _format);
|
||||
public static bool TryToId(this string value, out ulong result) => ulong.TryParse(value, NumberStyles.None, _format, out result);
|
||||
|
||||
public static string ToIdString(this ulong value)
|
||||
=> value.ToString(_format);
|
||||
public static string ToIdString(this ulong? value)
|
||||
=> value?.ToString(_format);
|
||||
public static string ToIdString(this ulong value) => value.ToString(_format);
|
||||
public static string ToIdString(this ulong? value) => value?.ToString(_format);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static bool HasBit(this uint rawValue, byte bit) => ((rawValue >> bit) & 1U) == 1;
|
||||
|
||||
Reference in New Issue
Block a user