diff --git a/X10D/src/BooleanExtensions.cs b/X10D/src/BooleanExtensions.cs
index 41eac29..b6ca033 100644
--- a/X10D/src/BooleanExtensions.cs
+++ b/X10D/src/BooleanExtensions.cs
@@ -3,7 +3,7 @@
using System;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class BooleanExtensions
{
diff --git a/X10D/src/ByteExtensions.cs b/X10D/src/ByteExtensions.cs
index 5617885..02302cf 100644
--- a/X10D/src/ByteExtensions.cs
+++ b/X10D/src/ByteExtensions.cs
@@ -6,15 +6,15 @@
using System.Text;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class ByteExtensions
{
///
- /// Gets a literally representing the raw values in the [].
+ /// Gets a literally representing the raw values in the [].
///
/// The bytes to get.
- /// Returns a .
+ /// Returns a .
public static string AsString(this IEnumerable bytes)
{
return BitConverter.ToString(bytes.ToArray());
@@ -24,8 +24,8 @@
/// Splits into chunks of size .
///
/// The collection to split.
- /// The maximum length of the nested collection.
- /// Returns an of of
+ /// The maximum length of the nested collection.
+ /// Returns an of of
/// values.
public static IEnumerable> Chunkify(this IEnumerable bytes, int chunkSize)
{
@@ -43,82 +43,82 @@
}
///
- /// Converts the [] to an .
+ /// Converts the [] to an .
///
/// The bytes to convert.
- /// Returns an .
+ /// Returns an .
public static short GetInt16(this IEnumerable bytes)
{
return BitConverter.ToInt16(bytes.ToArray(), 0);
}
///
- /// Converts the [] to an .
+ /// Converts the [] to an .
///
/// The bytes to convert.
- /// Returns an .
+ /// Returns an .
public static int GetInt32(this IEnumerable bytes)
{
return BitConverter.ToInt32(bytes.ToArray(), 0);
}
///
- /// Converts the [] to an .
+ /// Converts the [] to an .
///
/// The bytes to convert.
- /// Returns an .
+ /// Returns an .
public static long GetInt64(this IEnumerable bytes)
{
return BitConverter.ToInt64(bytes.ToArray(), 0);
}
///
- /// Converts the [] to a .
+ /// Converts the [] to a .
///
/// The bytes to convert.
- /// Returns an .
+ /// Returns an .
public static ushort GetUInt16(this IEnumerable bytes)
{
return BitConverter.ToUInt16(bytes.ToArray(), 0);
}
///
- /// Converts the [] to an .
+ /// Converts the [] to an .
///
/// The bytes to convert.
- /// Returns an .
+ /// Returns an .
public static uint GetUInt32(this IEnumerable bytes)
{
return BitConverter.ToUInt32(bytes.ToArray(), 0);
}
///
- /// Converts the [] to an .
+ /// Converts the [] to an .
///
/// The bytes to convert.
- /// Returns an .
+ /// Returns an .
public static ulong GetUInt64(this IEnumerable bytes)
{
return BitConverter.ToUInt64(bytes.ToArray(), 0);
}
///
- /// Gets a representing the value the [] with
+ /// Gets a representing the value the [] with
/// encoding.
///
/// The bytes to convert.
- /// Returns a .
+ /// Returns a .
public static string GetString(this IEnumerable bytes)
{
return bytes.GetString(Encoding.UTF8);
}
///
- /// Gets a representing the value the [] with the provided encoding.
+ /// Gets a representing the value the [] with the provided encoding.
///
/// The bytes to convert.
/// The encoding to use.
- /// Returns a .
+ /// Returns a .
public static string GetString(this IEnumerable bytes, Encoding encoding)
{
IEnumerable enumerable = bytes as byte[] ?? bytes.ToArray();
diff --git a/X10D/src/CharExtensions.cs b/X10D/src/CharExtensions.cs
index 1e526f4..0f794de 100644
--- a/X10D/src/CharExtensions.cs
+++ b/X10D/src/CharExtensions.cs
@@ -6,7 +6,7 @@
using System.Text;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class CharExtensions
{
@@ -15,7 +15,7 @@
///
/// The character set.
/// The length of the string to generate.
- /// Returns a containing characters.
+ /// Returns a containing characters.
public static string Random(this char[] chars, int length)
{
return chars.Random(length, new Random());
@@ -27,7 +27,7 @@
/// The character set.
/// The length of the string to generate.
/// The instance.
- /// Returns a containing characters.
+ /// Returns a containing characters.
public static string Random(this char[] chars, int length, Random random)
{
StringBuilder builder = new StringBuilder(length);
@@ -44,7 +44,7 @@
///
/// The character set.
/// The length of the string to generate.
- /// Returns a containing characters.
+ /// Returns a containing characters.
public static string Random(this IEnumerable chars, int length)
{
return chars.Random(length, new Random());
@@ -56,7 +56,7 @@
/// The character set.
/// The length of the string to generate.
/// The instance.
- /// Returns a containing characters.
+ /// Returns a containing characters.
public static string Random(this IEnumerable chars, int length, Random random)
{
return chars.ToArray().Random(length, random);
@@ -67,7 +67,7 @@
///
/// The character to repeat.
/// The repeat count.
- /// Returns a whose value is repeated
+ /// Returns a whose value is repeated
/// times.
public static string Repeat(this char c, int count)
{
diff --git a/X10D/src/DictionaryExtensions.cs b/X10D/src/DictionaryExtensions.cs
index d4895a9..ae915bd 100644
--- a/X10D/src/DictionaryExtensions.cs
+++ b/X10D/src/DictionaryExtensions.cs
@@ -17,7 +17,7 @@
/// The key type.
/// The value type.
/// The dictionary.
- /// Returns a representing the dictionary as a key=value; set.
+ /// Returns a representing the dictionary as a key=value; set.
public static string ToConnectionString(this IReadOnlyDictionary dictionary)
{
static string SanitizeValue(T value)
@@ -31,7 +31,7 @@
IEnumerable strings =
dictionary.Select(o => $"{o.Key}={SanitizeValue(o.Value)}");
- return String.Join(";", strings);
+ return string.Join(";", strings);
}
///
@@ -40,7 +40,7 @@
/// The key type.
/// The value type.
/// The dictionary.
- /// Returns a representing the dictionary as a key=value; set.
+ /// Returns a representing the dictionary as a key=value; set.
public static string ToConnectionString(this IDictionary dictionary)
{
return ((IReadOnlyDictionary) dictionary).ToConnectionString();
@@ -52,7 +52,7 @@
/// The key type.
/// The value type.
/// The dictionary.
- /// Returns a representing the dictionary as a key=value; set.
+ /// Returns a representing the dictionary as a key=value; set.
public static string ToConnectionString(this Dictionary dictionary)
{
return ((IReadOnlyDictionary) dictionary).ToConnectionString();
@@ -64,7 +64,7 @@
/// The key type.
/// The value type.
/// The dictionary.
- /// Returns a representing the dictionary as a key=value& set.
+ /// Returns a representing the dictionary as a key=value& set.
public static string ToGetParameters(this IReadOnlyDictionary dictionary)
{
static string Sanitize(KeyValuePair kvp)
@@ -74,7 +74,7 @@
return $"{key}={value}";
}
- return String.Join("&", dictionary.Select(Sanitize));
+ return string.Join("&", dictionary.Select(Sanitize));
}
///
@@ -83,7 +83,7 @@
/// The key type.
/// The value type.
/// The dictionary.
- /// Returns a representing the dictionary as a key=value& set.
+ /// Returns a representing the dictionary as a key=value& set.
public static string ToGetParameters(this IDictionary dictionary)
{
return ((IReadOnlyDictionary) dictionary).ToGetParameters();
@@ -95,7 +95,7 @@
/// The key type.
/// The value type.
/// The dictionary.
- /// Returns a representing the dictionary as a key=value& set.
+ /// Returns a representing the dictionary as a key=value& set.
public static string ToGetParameters(this Dictionary dictionary)
{
return ((IReadOnlyDictionary) dictionary).ToGetParameters();
diff --git a/X10D/src/DoubleExtensions.cs b/X10D/src/DoubleExtensions.cs
index f80ad71..4566fcc 100644
--- a/X10D/src/DoubleExtensions.cs
+++ b/X10D/src/DoubleExtensions.cs
@@ -3,7 +3,7 @@
using System;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class DoubleExtensions
{
@@ -32,28 +32,28 @@
}
///
- /// Converts the to a [].
+ /// Converts the to a [].
///
/// The number to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this double number)
{
return BitConverter.GetBytes(number);
}
///
- /// Determines if the is even.
+ /// Determines if the is even.
///
/// The number.
/// Returns if is even,
/// otherwise.
public static bool IsEven(this double number)
{
- return Math.Abs(number % 2.0) < Double.Epsilon;
+ return Math.Abs(number % 2.0) < double.Epsilon;
}
///
- /// Determines if the is odd.
+ /// Determines if the is odd.
///
/// The number.
/// Returns if is odd,
diff --git a/X10D/src/EndPointExtensions.cs b/X10D/src/EndPointExtensions.cs
index e6af2f6..42ef242 100644
--- a/X10D/src/EndPointExtensions.cs
+++ b/X10D/src/EndPointExtensions.cs
@@ -12,7 +12,7 @@
/// Gets the endpoint hostname.
///
/// The endpoint whose hostname to get.
- /// Returns a representing the hostname, which may be an IP or a DNS, or empty
+ /// Returns a representing the hostname, which may be an IP or a DNS, or empty
/// string on failure.
public static string GetHost(this EndPoint endPoint)
{
@@ -20,7 +20,7 @@
{
IPEndPoint ip => ip.Address.ToString(),
DnsEndPoint dns => dns.Host,
- _ => String.Empty
+ _ => string.Empty
};
}
@@ -28,7 +28,7 @@
/// Gets the endpoint port.
///
/// The endpoint whose port to get.
- /// Returns an representing the port, or 0 on failure.
+ /// Returns an representing the port, or 0 on failure.
public static int GetPort(this EndPoint endPoint)
{
return endPoint switch
diff --git a/X10D/src/Int16Extensions.cs b/X10D/src/Int16Extensions.cs
index de77f73..c7136f5 100644
--- a/X10D/src/Int16Extensions.cs
+++ b/X10D/src/Int16Extensions.cs
@@ -3,7 +3,7 @@
using System;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class Int16Extensions
{
@@ -146,7 +146,7 @@
}
///
- /// Converts the to a treating it as a Unix timestamp.
+ /// Converts the to a treating it as a Unix timestamp.
///
/// The timestamp.
/// Optional. Whether or not the input value should be treated as milliseconds. Defaults
@@ -159,27 +159,27 @@
}
///
- /// Converts the to a [].
+ /// Converts the to a [].
///
/// The number to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this ushort number)
{
return BitConverter.GetBytes(number);
}
///
- /// Converts the to a [].
+ /// Converts the to a [].
///
/// The number to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this short number)
{
return BitConverter.GetBytes(number);
}
///
- /// Determines if the is even.
+ /// Determines if the is even.
///
/// The number.
/// Returns if is even,
@@ -190,7 +190,7 @@
}
///
- /// Determines if the is even.
+ /// Determines if the is even.
///
/// The number.
/// Returns if is even,
@@ -201,7 +201,7 @@
}
///
- /// Determines if the is odd.
+ /// Determines if the is odd.
///
/// The number.
/// Returns if is odd,
@@ -212,7 +212,7 @@
}
///
- /// Determines if the is odd.
+ /// Determines if the is odd.
///
/// The number.
/// Returns if is odd,
@@ -223,7 +223,7 @@
}
///
- /// Determines if the is a prime number.
+ /// Determines if the is a prime number.
///
/// The number.
/// Returns if is prime,
@@ -234,7 +234,7 @@
}
///
- /// Determines if the is a prime number.
+ /// Determines if the is a prime number.
///
/// The number.
/// Returns if is prime,
diff --git a/X10D/src/Int32Extensions.cs b/X10D/src/Int32Extensions.cs
index a251b63..6877437 100644
--- a/X10D/src/Int32Extensions.cs
+++ b/X10D/src/Int32Extensions.cs
@@ -3,7 +3,7 @@
using System;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class Int32Extensions
{
@@ -346,7 +346,7 @@
}
///
- /// Converts the to a treating it as a Unix timestamp.
+ /// Converts the to a treating it as a Unix timestamp.
///
/// The timestamp.
/// Optional. Whether or not the input value should be treated as milliseconds. Defaults
@@ -359,27 +359,27 @@
}
///
- /// Converts the to a [].
+ /// Converts the to a [].
///
/// The number to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this uint number)
{
return BitConverter.GetBytes(number);
}
///
- /// Converts the to a [].
+ /// Converts the to a [].
///
/// The number to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this int number)
{
return BitConverter.GetBytes(number);
}
///
- /// Determines if the is even.
+ /// Determines if the is even.
///
/// The number.
/// Returns if is even,
@@ -390,7 +390,7 @@
}
///
- /// Determines if the is even.
+ /// Determines if the is even.
///
/// The number.
/// Returns if is even,
@@ -401,7 +401,7 @@
}
///
- /// Determines if the is odd.
+ /// Determines if the is odd.
///
/// The number.
/// Returns if is odd,
@@ -412,7 +412,7 @@
}
///
- /// Determines if the is odd.
+ /// Determines if the is odd.
///
/// The number.
/// Returns if is odd,
@@ -423,7 +423,7 @@
}
///
- /// Determines if the is a prime number.
+ /// Determines if the is a prime number.
///
/// The number.
/// Returns if is prime,
diff --git a/X10D/src/Int64Extensions.cs b/X10D/src/Int64Extensions.cs
index 0691e0a..5efa15e 100644
--- a/X10D/src/Int64Extensions.cs
+++ b/X10D/src/Int64Extensions.cs
@@ -3,7 +3,7 @@
using System;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class Int64Extensions
{
@@ -137,7 +137,7 @@
}
///
- /// Converts the to a treating it as a Unix timestamp.
+ /// Converts the to a treating it as a Unix timestamp.
///
/// The timestamp.
/// Optional. Whether or not the input value should be treated as milliseconds. Defaults
@@ -154,49 +154,49 @@
}
///
- /// Converts the to a [].
+ /// Converts the to a [].
///
/// The number to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this ulong number)
{
return BitConverter.GetBytes(number);
}
///
- /// Converts the to a [].
+ /// Converts the to a [].
///
/// The number to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this long number)
{
return BitConverter.GetBytes(number);
}
///
- /// Determines if the is even.
+ /// Determines if the is even.
///
/// The number.
/// Returns if is even,
/// otherwise.
public static bool IsEven(this long number)
{
- return Math.Abs(number % 2.0) < Double.Epsilon;
+ return Math.Abs(number % 2.0) < double.Epsilon;
}
///
- /// Determines if the is even.
+ /// Determines if the is even.
///
/// The number.
/// Returns if is even,
/// otherwise.
public static bool IsEven(this ulong number)
{
- return Math.Abs(number % 2.0) < Double.Epsilon;
+ return Math.Abs(number % 2.0) < double.Epsilon;
}
///
- /// Determines if the is odd.
+ /// Determines if the is odd.
///
/// The number.
/// Returns if is odd,
@@ -207,7 +207,7 @@
}
///
- /// Determines if the is odd.
+ /// Determines if the is odd.
///
/// The number.
/// Returns if is odd,
@@ -218,7 +218,7 @@
}
///
- /// Determines if the is a prime number.
+ /// Determines if the is a prime number.
///
/// The number.
/// Returns if is prime,
@@ -253,7 +253,7 @@
}
///
- /// Determines if the is a prime number.
+ /// Determines if the is a prime number.
///
/// The number.
/// Returns if is prime,
diff --git a/X10D/src/SingleExtensions.cs b/X10D/src/SingleExtensions.cs
index e098345..e506663 100644
--- a/X10D/src/SingleExtensions.cs
+++ b/X10D/src/SingleExtensions.cs
@@ -3,7 +3,7 @@
using System;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class SingleExtensions
{
@@ -32,17 +32,17 @@
}
///
- /// Converts the to a [].
+ /// Converts the to a [].
///
/// The number to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this float number)
{
return BitConverter.GetBytes(number);
}
///
- /// Determines if the is even.
+ /// Determines if the is even.
///
/// The number.
/// Returns if is even,
@@ -53,7 +53,7 @@
}
///
- /// Determines if the is odd.
+ /// Determines if the is odd.
///
/// The number.
/// Returns if is odd,
diff --git a/X10D/src/StreamExtensions.cs b/X10D/src/StreamExtensions.cs
index 8cd54d1..a6eec97 100644
--- a/X10D/src/StreamExtensions.cs
+++ b/X10D/src/StreamExtensions.cs
@@ -15,7 +15,7 @@
///
/// A derived type.
/// The stream whose hash is to be computed.
- /// Returns a array representing the hash of the stream.
+ /// Returns a array representing the hash of the stream.
public static byte[] GetHash(this Stream stream) where T : HashAlgorithm
{
MethodInfo create = typeof(T).GetMethod("Create", Array.Empty());
diff --git a/X10D/src/StringExtensions.cs b/X10D/src/StringExtensions.cs
index cd511c2..a19a251 100644
--- a/X10D/src/StringExtensions.cs
+++ b/X10D/src/StringExtensions.cs
@@ -8,7 +8,7 @@
using System.Text;
///
- /// Extension methods for .
+ /// Extension methods for .
///
public static class StringExtensions
{
@@ -33,23 +33,23 @@
}
///
- /// Parses a into an .
+ /// Parses a into an .
///
/// The type of the .
- /// The value to parse
- /// The value corresponding to the .
+ /// The value to parse
+ /// The value corresponding to the .
public static T EnumParse(this string value)
{
return value.EnumParse(false);
}
///
- /// Parses a into an .
+ /// Parses a into an .
///
/// The type of the .
- /// The value to parse
+ /// The value to parse
/// Whether or not to ignore casing.
- /// The value corresponding to the
+ /// The value corresponding to the
public static T EnumParse(this string value, bool ignoreCase)
{
if (value == null)
@@ -76,22 +76,22 @@
}
///
- /// Gets a [] representing the value the with
+ /// Gets a [] representing the value the with
/// encoding.
///
/// The string to convert.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this string str)
{
return str.GetBytes(Encoding.UTF8);
}
///
- /// Gets a [] representing the value the with the provided encoding.
+ /// Gets a [] representing the value the with the provided encoding.
///
/// The string to convert.
/// The encoding to use.
- /// Returns a [].
+ /// Returns a [].
public static byte[] GetBytes(this string str, Encoding encoding)
{
return encoding.GetBytes(str);
@@ -102,7 +102,7 @@
///
/// The character set.
/// The length of the string to generate.
- /// Returns a containing characters.
+ /// Returns a containing characters.
public static string Random(this string str, int length)
{
return str.Random(length, new Random());
@@ -114,7 +114,7 @@
/// The character set.
/// The length of the string to generate.
/// The instance.
- /// Returns a containing characters.
+ /// Returns a containing characters.
public static string Random(this string str, int length, Random random)
{
return str.ToCharArray().Random(length, random);
@@ -125,7 +125,7 @@
///
/// The string to repeat.
/// The repeat count.
- /// Returns a whose value is repeated
+ /// Returns a whose value is repeated
/// times.
public static string Repeat(this string str, int count)
{
@@ -143,7 +143,7 @@
/// Shuffles the characters in the string.
///
/// The string to shuffle.
- /// Returns a containing the characters in , rearranged.
+ /// Returns a containing the characters in , rearranged.
public static string Shuffle(this string str)
{
return str.Shuffle(new Random());
@@ -154,18 +154,18 @@
///
/// The string to shuffle.
/// The instance.
- /// Returns a containing the characters in , rearranged.
+ /// Returns a containing the characters in , rearranged.
public static string Shuffle(this string str, Random random)
{
return new string(str.ToCharArray().Shuffle(random).ToArray());
}
///
- /// Splits the into chunks that are no greater than in length.
+ /// Splits the into chunks that are no greater than in length.
///
/// The string to split.
/// The maximum length of each string in the returned result.
- /// Returns an containing instances which are no
+ /// Returns an containing instances which are no
/// greater than in length.
public static IEnumerable Split(this string str, int chunkSize)
{
@@ -176,13 +176,13 @@
}
///
- /// Converts a to a .
+ /// Converts a to a .
///
/// The string to convert.
/// Returns a .
public static SecureString ToSecureString(this string str)
{
- if (String.IsNullOrWhiteSpace(str))
+ if (string.IsNullOrWhiteSpace(str))
{
return null;
}
@@ -197,14 +197,14 @@
}
///
- /// Converts a to a .
+ /// Converts a to a .
///
/// The to convert.
/// Whether or not to use this extension method.
- /// Returns a .
+ /// Returns a .
public static string ToString(this SecureString str, bool extension)
{
- return extension ? (new NetworkCredential(String.Empty, str).Password) : str.ToString();
+ return extension ? (new NetworkCredential(string.Empty, str).Password) : str.ToString();
}
///
diff --git a/X10D/src/TimeSpanParser.cs b/X10D/src/TimeSpanParser.cs
index a2ad5ab..c8517a2 100644
--- a/X10D/src/TimeSpanParser.cs
+++ b/X10D/src/TimeSpanParser.cs
@@ -27,32 +27,32 @@
if (match.Groups[1].Success)
{
- weeks = Double.Parse(match.Groups[1].Value);
+ weeks = double.Parse(match.Groups[1].Value);
}
if (match.Groups[2].Success)
{
- days = Double.Parse(match.Groups[2].Value);
+ days = double.Parse(match.Groups[2].Value);
}
if (match.Groups[3].Success)
{
- hours = Double.Parse(match.Groups[3].Value);
+ hours = double.Parse(match.Groups[3].Value);
}
if (match.Groups[4].Success)
{
- minutes = Double.Parse(match.Groups[4].Value);
+ minutes = double.Parse(match.Groups[4].Value);
}
if (match.Groups[5].Success)
{
- seconds = Double.Parse(match.Groups[5].Value);
+ seconds = double.Parse(match.Groups[5].Value);
}
if (match.Groups[6].Success)
{
- milliseconds = Double.Parse(match.Groups[6].Value);
+ milliseconds = double.Parse(match.Groups[6].Value);
}
Trace.WriteLine($"Input: {input}");