Skip to content
Permalink
Browse files

Rename Extension classes to plural

  • Loading branch information
earlbread committed Feb 28, 2020
1 parent c5e09d8 commit a61b5440b167f24609d40381db075e63e5365f51
@@ -10,6 +10,18 @@ To be released.

- `BaseStore` class became to implement `IDisposable`. [[#789]]
- Removed `IStore.DeleteIndex(Guid, HashDigest<SHA256>)` method. [[#802]]
- Extension classes have been renamed. However, it is not affected
if you do not call it directly. [[#803]]
- Renamed `StunAddressExtension` class to `StunAddressExtensions`.
- Renamed `BytesConvertExtension` class to `BytesConvertExtensions`.
- Renamed `RandomExtension` class to `RandomExtensions`.
- Renamed `AddressExtension` class to `AddressExtensions`.
- Renamed `HashDigestExtension` class to `HashDigestExtensions`.
- Renamed `NetMQFrameExtension` class to `NetMQFrameExtensions`.
- Renamed `NetMQSocketExtension` class to `NetMQSocketExtensions`.
- Renamed `SerializationInfoExtension` class to
`SerializationInfoExtensions`.
- Renamed `StoreExtension` class to `StoreExtensions`.

### Backward-incompatible network protocol changes

@@ -5,7 +5,7 @@

namespace Libplanet.Stun.Tests.Attributes
{
public class StunAddressExtensionTest
public class StunAddressExtensionsTest
{
public static IEnumerable<object[]> Testcases => new List<object[]>
{
@@ -7,7 +7,7 @@

namespace Libplanet.Stun.Attributes
{
internal static class StunAddressExtension
internal static class StunAddressExtensions
{
private enum StunAf : byte
{
@@ -4,7 +4,7 @@

namespace Libplanet.Stun
{
internal static class BytesConvertExtension
internal static class BytesConvertExtensions
{
public static byte[] ToBytes(this ushort value)
{
@@ -3,7 +3,7 @@

namespace Libplanet.Tests
{
public class AddressExtensionTest
public class AddressExtensionsTest
{
[Fact]
public void CanGetAddress()
@@ -2,7 +2,7 @@

namespace Libplanet.Tests
{
public static class HashSetExtension
public static class HashSetExtensions
{
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> l)
{
@@ -6,7 +6,7 @@ namespace Libplanet.Action
/// This extension class provides some convenient methods
/// to deal with <see cref="IRandom"/>.
/// </summary>
public static class RandomExtension
public static class RandomExtensions
{
/// <summary>
/// Generates a UUID version 4, i.e., a random <see cref="Guid"/>.
@@ -104,13 +104,13 @@ public Address(byte[] address)
/// Derives the corresponding <see cref="Address"/> from a <see
/// cref="PublicKey"/>.
/// <para>Note that there is an equivalent extension method
/// <see cref="AddressExtension.ToAddress(PublicKey)"/>, which enables
/// <see cref="AddressExtensions.ToAddress(PublicKey)"/>, which enables
/// a code like <c>publicKey.ToAddress()</c> instead of
/// <c>new Address(publicKey)</c>, for convenience.</para>
/// </summary>
/// <param name="publicKey">A <see cref="PublicKey"/> to derive
/// the corresponding <see cref="Address"/> from.</param>
/// <seealso cref="AddressExtension.ToAddress(PublicKey)"/>
/// <seealso cref="AddressExtensions.ToAddress(PublicKey)"/>
public Address(PublicKey publicKey)
: this(DeriveAddress(publicKey))
{
@@ -7,7 +7,7 @@ namespace Libplanet
/// the most part) to deal with <see cref="Address"/>.
/// </summary>
/// <seealso cref="Address"/>
public static class AddressExtension
public static class AddressExtensions
{
/// <summary>
/// Derives the corresponding <see cref="Address"/> from a <see
@@ -113,7 +113,7 @@ public ImmutableArray<byte> ByteArray
/// the <see cref="Size"/>, the hash algorithm
/// (i.e., <typeparamref name="T"/> requires.</exception>
/// <seealso cref="ToString()"/>
/// <seealso cref="HashDigestExtension.ToHashDigest{T}(string)"/>
/// <seealso cref="HashDigestExtensions.ToHashDigest{T}(string)"/>
[Pure]
public static HashDigest<T> FromString(string hexDigest)
{
@@ -232,7 +232,7 @@ bool IEquatable<HashDigest<T>>.Equals(HashDigest<T> other)
/// Augments types to have some shortcut methods dealing with
/// <see cref="HashDigest{T}"/> values.
/// </summary>
public static class HashDigestExtension
public static class HashDigestExtensions
{
/// <summary>
/// Converts a given hexadecimal representation of a digest into
@@ -6,7 +6,7 @@

namespace Libplanet.Net
{
internal static class NetMQFrameExtension
internal static class NetMQFrameExtensions
{
public static HashDigest<T> ConvertToHashDigest<T>(
this NetMQFrame frame)
@@ -5,7 +5,7 @@

namespace Libplanet.Net
{
internal static class NetMQSocketExtension
internal static class NetMQSocketExtensions
{
public static async Task SendMultipartMessageAsync(
this NetMQSocket socket,
@@ -2,7 +2,7 @@

namespace Libplanet.Serialization
{
public static class SerializationInfoExtension
public static class SerializationInfoExtensions
{
public static T GetValue<T>(this SerializationInfo info, string name)
{
@@ -10,7 +10,7 @@

namespace Libplanet.Store
{
public static class StoreExtension
public static class StoreExtensions
{
/// <summary>
/// Makes a store, <paramref name="to"/>, logically (but not necessarily physically)

0 comments on commit a61b544

Please sign in to comment.
You can’t perform that action at this time.