(#41) Remove child namespaces

This commit is contained in:
Oliver Booth 2021-06-27 12:31:04 +01:00
parent 1443d7d4cf
commit 49ed44100d
27 changed files with 52 additions and 62 deletions

View File

@ -1,6 +1,6 @@
using System;
namespace X10D.BooleanExtensions
namespace X10D
{
public static partial class BooleanExtensions
{

View File

@ -1,6 +1,6 @@
using System;
namespace X10D.BooleanExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="bool" />.
@ -92,7 +92,7 @@ namespace X10D.BooleanExtensions
/// </summary>
/// <param name="value">The Boolean value to convert.</param>
/// <returns>1 if <paramref name="value" /> is <see langword="false" />, or 0 otherwise.</returns>
/// <seealso cref="DoubleExtensions.DoubleExtensions.ToBoolean(double)" />
/// <seealso cref="DoubleExtensions.ToBoolean(double)" />
/// <example>
/// The following example illustrates the conversion of <see cref="bool" /> to <see cref="double" /> values.
///
@ -107,7 +107,7 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
/// <seealso cref="DoubleExtensions.DoubleExtensions.ToBoolean(double)" />
/// <seealso cref="DoubleExtensions.ToBoolean(double)" />
public static double ToDouble(this bool value)
{
return value ? 1.0 : 0.0;
@ -207,7 +207,7 @@ namespace X10D.BooleanExtensions
/// // True converts to 1.
/// </code>
/// </example>
/// <seealso cref="SingleExtensions.SingleExtensions.ToBoolean(float)" />
/// <seealso cref="SingleExtensions.ToBoolean(float)" />
public static float ToSingle(this bool value)
{
return value ? 1.0f : 0.0f;

View File

@ -1,4 +1,4 @@
namespace X10D.ByteExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="byte" />.

View File

@ -1,6 +1,6 @@
using System;
namespace X10D.ByteExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="sbyte" />.

View File

@ -1,4 +1,4 @@
namespace X10D.CharExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="char" />.

View File

@ -1,6 +1,6 @@
using System;
namespace X10D.ComparableExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="IComparable{T}" />.

View File

@ -1,6 +1,6 @@
using System;
namespace X10D.DateTimeExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="DateTime" />.

View File

@ -1,6 +1,6 @@
using System;
namespace X10D.DateTimeExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="DateTimeOffset" />.

View File

@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Web;
namespace X10D.DictionaryExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="Dictionary{TKey,TValue}" /> and similar types.

View File

@ -1,7 +1,7 @@
using System;
using System.Runtime.CompilerServices;
namespace X10D.DoubleExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="double" />.

View File

@ -1,7 +1,7 @@
using System.Net;
using System.Runtime.CompilerServices;
namespace X10D.EndPointExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="EndPoint" /> and derived types.

View File

@ -1,6 +1,6 @@
using System;
namespace X10D.EnumExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see langword="enum" /> types.

View File

@ -1,9 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using X10D.ComparableExtensions;
using X10D.ListExtensions;
namespace X10D.EnumerableExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="IEnumerable{T}" />.

View File

@ -1,7 +1,6 @@
using System;
using X10D.Int64Extensions;
namespace X10D.Int16Extensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="short" />.
@ -94,7 +93,7 @@ namespace X10D.Int16Extensions
/// </returns>
public static double LerpFrom(this short target, double value, double alpha)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -109,7 +108,7 @@ namespace X10D.Int16Extensions
/// </returns>
public static double LerpTo(this short value, double target, double alpha)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -124,7 +123,7 @@ namespace X10D.Int16Extensions
/// </returns>
public static double LerpWith(this short alpha, double value, double target)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -139,7 +138,7 @@ namespace X10D.Int16Extensions
/// </returns>
public static float LerpFrom(this short target, float value, float alpha)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -154,7 +153,7 @@ namespace X10D.Int16Extensions
/// </returns>
public static float LerpTo(this short value, float target, float alpha)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -169,7 +168,7 @@ namespace X10D.Int16Extensions
/// </returns>
public static float LerpWith(this short alpha, float value, float target)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>

View File

@ -1,7 +1,6 @@
using System;
using X10D.Int64Extensions;
namespace X10D.Int32Extensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="int" />.
@ -94,7 +93,7 @@ namespace X10D.Int32Extensions
/// </returns>
public static double LerpFrom(this int target, double value, double alpha)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -109,7 +108,7 @@ namespace X10D.Int32Extensions
/// </returns>
public static double LerpTo(this int value, double target, double alpha)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -124,7 +123,7 @@ namespace X10D.Int32Extensions
/// </returns>
public static double LerpWith(this int alpha, double value, double target)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -139,7 +138,7 @@ namespace X10D.Int32Extensions
/// </returns>
public static float LerpFrom(this int target, float value, float alpha)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -154,7 +153,7 @@ namespace X10D.Int32Extensions
/// </returns>
public static float LerpTo(this int value, float target, float alpha)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -169,7 +168,7 @@ namespace X10D.Int32Extensions
/// </returns>
public static float LerpWith(this int alpha, float value, float target)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>

View File

@ -1,6 +1,6 @@
using System;
namespace X10D.Int64Extensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="long" />.
@ -117,7 +117,7 @@ namespace X10D.Int64Extensions
/// </returns>
public static double LerpFrom(this long target, double value, double alpha)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -132,7 +132,7 @@ namespace X10D.Int64Extensions
/// </returns>
public static double LerpTo(this long value, double target, double alpha)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -147,7 +147,7 @@ namespace X10D.Int64Extensions
/// </returns>
public static double LerpWith(this long alpha, double value, double target)
{
return DoubleExtensions.DoubleExtensions.LerpInternal(value, target, alpha);
return DoubleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -162,7 +162,7 @@ namespace X10D.Int64Extensions
/// </returns>
public static float LerpFrom(this long target, float value, float alpha)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -177,7 +177,7 @@ namespace X10D.Int64Extensions
/// </returns>
public static float LerpTo(this long value, float target, float alpha)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>
@ -192,7 +192,7 @@ namespace X10D.Int64Extensions
/// </returns>
public static float LerpWith(this long alpha, float value, float target)
{
return SingleExtensions.SingleExtensions.LerpInternal(value, target, alpha);
return SingleExtensions.LerpInternal(value, target, alpha);
}
/// <summary>

View File

@ -1,8 +1,7 @@
using System;
using System.Collections.Generic;
using X10D.RandomExtensions;
namespace X10D.ListExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="IList{T}" /> and <see cref="IReadOnlyList{T}" />.
@ -34,7 +33,7 @@ namespace X10D.ListExtensions
throw new ArgumentNullException(nameof(source));
}
random ??= RandomExtensions.RandomExtensions.Random;
random ??= RandomExtensions.Random;
return random.NextFrom(source);
}
@ -51,7 +50,7 @@ namespace X10D.ListExtensions
throw new ArgumentNullException(nameof(source));
}
random ??= RandomExtensions.RandomExtensions.Random;
random ??= RandomExtensions.Random;
var count = source.Count;
while (count > 0)

View File

@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace X10D.ListExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="byte" /> array.

View File

@ -5,7 +5,7 @@ using System.Globalization;
using System.Linq;
using System.Text;
namespace X10D.RandomExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="System.Random" />.

View File

@ -1,9 +1,8 @@
#if NET5_0
using System;
using System.Numerics;
using X10D.SingleExtensions;
namespace X10D.RandomExtensions.SystemNumerics
namespace X10D.SystemNumerics
{
public static partial class RandomExtensions
{

View File

@ -2,7 +2,7 @@
using System.Globalization;
using System.Reflection;
namespace X10D.ReflectionExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="MemberInfo" />.

View File

@ -2,7 +2,7 @@
using System.Globalization;
using System.Reflection;
namespace X10D.ReflectionExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="Type" />.

View File

@ -1,8 +1,7 @@
using System;
using System.Runtime.CompilerServices;
using X10D.DoubleExtensions;
namespace X10D.SingleExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="float" />.

View File

@ -1,7 +1,7 @@
using System;
using System.IO;
namespace X10D.StreamExtensions
namespace X10D
{
public static partial class StreamExtensions
{

View File

@ -5,7 +5,7 @@ using System.Buffers.Binary;
using System.IO;
using System.Security.Cryptography;
namespace X10D.StreamExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="Stream" />.

View File

@ -2,11 +2,8 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
using X10D.EnumerableExtensions;
using X10D.ListExtensions;
using X10D.RandomExtensions;
namespace X10D.StringExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="string" />.
@ -248,7 +245,7 @@ namespace X10D.StringExtensions
/// <exception cref="ArgumentOutOfRangeException"><paramref name="length" /> is less than 0.</exception>
public static string Randomize(this string source, int length)
{
return source.Randomize(length, RandomExtensions.RandomExtensions.Random);
return source.Randomize(length, RandomExtensions.Random);
}
/// <summary>
@ -365,7 +362,7 @@ namespace X10D.StringExtensions
/// <returns>Returns a <see cref="string" /> containing the characters in <paramref name="value" />, rearranged.</returns>
public static string Shuffled(this string value)
{
return value.Shuffled(RandomExtensions.RandomExtensions.Random);
return value.Shuffled(RandomExtensions.Random);
}
/// <summary>

View File

@ -1,7 +1,7 @@
using System.Threading;
using System.Threading.Tasks;
namespace X10D.WaitHandleExtensions
namespace X10D
{
/// <summary>
/// Extension methods for <see cref="WaitHandle" />.