diff --git a/X10D/ComparableExtensions.cs b/X10D/ComparableExtensions.cs index eac0906..9c98b52 100644 --- a/X10D/ComparableExtensions.cs +++ b/X10D/ComparableExtensions.cs @@ -24,7 +24,7 @@ actual.CompareTo(lower) > 0 && actual.CompareTo(upper) < 0; /// - /// Gets the value + /// Gets the value /// /// /// diff --git a/X10D/ConvertibleExtensions.cs b/X10D/ConvertibleExtensions.cs index 15e126b..09278db 100644 --- a/X10D/ConvertibleExtensions.cs +++ b/X10D/ConvertibleExtensions.cs @@ -18,7 +18,7 @@ /// The object to convert. /// Returns the value converted to . public static T To(this IConvertible obj) => - (T) Convert.ChangeType(obj, typeof(T)); + (T)Convert.ChangeType(obj, typeof(T)); /// /// Converts the object to another type, returning the default value on failure. diff --git a/X10D/DateTimeExtensions.cs b/X10D/DateTimeExtensions.cs index 6f1803b..0c3130f 100644 --- a/X10D/DateTimeExtensions.cs +++ b/X10D/DateTimeExtensions.cs @@ -21,7 +21,7 @@ /// /// The date of birth. public static int Age(this DateTime dateOfBirth) => - (int) (((DateTime.Today - TimeSpan.FromDays(1) - dateOfBirth.Date).TotalDays + 1) / 365.2425); + (int)(((DateTime.Today - TimeSpan.FromDays(1) - dateOfBirth.Date).TotalDays + 1) / 365.2425); /// /// Gets a DateTime representing the first specified day in the current month @@ -147,7 +147,7 @@ public static long ToUnixTimeStamp(this DateTime time, bool useMillis = false) { TimeSpan difference = time - UnixEpoch; - return (long) (useMillis ? difference.TotalMilliseconds : difference.TotalSeconds); + return (long)(useMillis ? difference.TotalMilliseconds : difference.TotalSeconds); } /// diff --git a/X10D/Int16Extensions.cs b/X10D/Int16Extensions.cs index f37949c..29606c2 100644 --- a/X10D/Int16Extensions.cs +++ b/X10D/Int16Extensions.cs @@ -12,6 +12,7 @@ public static class Int16Extensions { #region TimeSpan Returns + // TODO change public static TimeSpan Days(this ushort number) => @@ -85,7 +86,7 @@ /// Returns a representing seconds since the Unix /// epoch. public static DateTime FromUnixTimestamp(this short timestamp, bool isMillis = false) => - ((long) timestamp).FromUnixTimestamp(isMillis); + ((long)timestamp).FromUnixTimestamp(isMillis); /// /// Converts the to a []. @@ -103,7 +104,6 @@ public static byte[] GetBytes(this short number) => BitConverter.GetBytes(number); - /// /// Determines if the is a prime number. /// @@ -111,7 +111,7 @@ /// Returns if is prime, /// otherwise. public static bool IsPrime(this short number) => - ((long) number).IsPrime(); + ((long)number).IsPrime(); /// /// Gets an boolean value that represents this integer. @@ -131,4 +131,4 @@ public static bool ToBoolean(this ushort value) => value != 0; } -} \ No newline at end of file +} diff --git a/X10D/Int32Extensions.cs b/X10D/Int32Extensions.cs index 055aad7..56cadb5 100644 --- a/X10D/Int32Extensions.cs +++ b/X10D/Int32Extensions.cs @@ -12,6 +12,7 @@ public static class Int32Extensions { #region TimeSpan Returns + // TODO change public static TimeSpan Days(this uint number) => diff --git a/X10D/Int64Extensions.cs b/X10D/Int64Extensions.cs index ccab490..889eb72 100644 --- a/X10D/Int64Extensions.cs +++ b/X10D/Int64Extensions.cs @@ -12,6 +12,7 @@ public static class Int64Extensions { #region TimeSpan Returns + // TODO change public static TimeSpan Days(this ulong number) => @@ -123,7 +124,7 @@ return false; } - long boundary = (long) Math.Floor(Math.Sqrt(number)); + long boundary = (long)Math.Floor(Math.Sqrt(number)); for (int i = 3; i <= boundary; i += 2) { if (number % i == 0) @@ -131,7 +132,7 @@ return false; } } - + return true; } diff --git a/X10D/StringExtensions.cs b/X10D/StringExtensions.cs index 9afc487..5de3e78 100644 --- a/X10D/StringExtensions.cs +++ b/X10D/StringExtensions.cs @@ -68,7 +68,7 @@ throw new ArgumentException("Type provided must be an Enum.", "T"); } - return (T) Enum.Parse(t, value, ignoreCase); + return (T)Enum.Parse(t, value, ignoreCase); } ///