Skip to content

Commit

Permalink
Merge pull request #117 from greymistcube/refactor/remove-inspection
Browse files Browse the repository at this point in the history
🧹 Removed obsoleted field Inspection
  • Loading branch information
greymistcube authored Oct 23, 2023
2 parents 51ff4d9 + 7c389e0 commit 71c480a
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 35 deletions.
4 changes: 0 additions & 4 deletions Bencodex/Types/Binary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ public Binary(string text, Encoding encoding)
CommonVariables.Separator.LongLength +
ByteArray.Length;

/// <inheritdoc cref="IValue.Inspection"/>
[Obsolete("Deprecated in favour of " + nameof(Inspect) + "() method.")]
public string Inspection => Inspect(true);

public static explicit operator Binary(ImmutableArray<byte> bytes) =>
new Binary(bytes);

Expand Down
4 changes: 0 additions & 4 deletions Bencodex/Types/Boolean.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ public Boolean(bool value)
[Pure]
public long EncodingLength => 1L;

/// <inheritdoc cref="IValue.Inspection"/>
[Obsolete("Deprecated in favour of " + nameof(Inspect) + "() method.")]
public string Inspection => Inspect(true);

public static implicit operator bool(Boolean boolean)
{
return boolean.Value;
Expand Down
4 changes: 0 additions & 4 deletions Bencodex/Types/Dictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -940,10 +940,6 @@ public long EncodingLength
internal set => _encodingLength = value;
}

/// <inheritdoc cref="IValue.Inspection"/>
[Obsolete("Deprecated in favour of " + nameof(Inspect) + "() method.")]
public string Inspection => Inspect(true);

/// <inheritdoc cref="IReadOnlyDictionary{TKey,TValue}.this[TKey]"/>
public IValue this[IKey key] => _dict[key];

Expand Down
7 changes: 0 additions & 7 deletions Bencodex/Types/IValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ public interface IValue : IEquatable<IValue>
[Pure]
long EncodingLength { get; }

/// <summary>A human-readable representation for debugging.</summary>
/// <returns>A human-readable representation.</returns>
/// <remarks>This property is deprecated. Use <see cref="Inspect(bool)"/>
/// method instead.</remarks>
[Obsolete("Deprecated in favour of " + nameof(Inspect) + "() method.")]
string Inspection { get; }

/// <summary>
/// Gets a human-readable representation for debugging.
/// <para>Unloaded values may be omitted.</para>
Expand Down
4 changes: 0 additions & 4 deletions Bencodex/Types/Integer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ public Integer(string value, IFormatProvider? provider = null)
public long EncodingLength =>
2L + CountDecimalDigits();

/// <inheritdoc cref="IValue.Inspection"/>
[Obsolete("Deprecated in favour of " + nameof(Inspect) + "() method.")]
public string Inspection => Inspect(true);

public static implicit operator BigInteger(Integer i)
{
return i.Value;
Expand Down
4 changes: 0 additions & 4 deletions Bencodex/Types/List.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ public long EncodingLength
private set => _encodingLength = value;
}

/// <inheritdoc cref="IValue.Inspection"/>
[Obsolete("Deprecated in favour of " + nameof(Inspect) + "() method.")]
public string Inspection => Inspect(true);

/// <inheritdoc cref="IReadOnlyCollection{T}.Count"/>
public int Count => _values.Length;

Expand Down
4 changes: 0 additions & 4 deletions Bencodex/Types/Null.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ namespace Bencodex.Types
[Pure]
public long EncodingLength => 1L;

/// <inheritdoc cref="IValue.Inspection"/>
[Obsolete("Deprecated in favour of " + nameof(Inspect) + "() method.")]
public string Inspection => Inspect(true);

public override int GetHashCode() => 0;

int IComparable.CompareTo(object obj) => obj is Null ? 0 : -1;
Expand Down
4 changes: 0 additions & 4 deletions Bencodex/Types/Text.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ public Text(string value)
CommonVariables.Separator.LongLength +
Utf8Length;

/// <inheritdoc cref="IValue.Inspection"/>
[Obsolete("Deprecated in favour of " + nameof(Inspect) + "() method.")]
public string Inspection => Inspect(true);

[Pure]
internal int Utf8Length =>
_utf8Length is { } l ? l : (
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Version 0.16.0

To be released.

- Removed `IValue.Inspection` property. [[#117]]

[#117]: https://github.com/planetarium/bencodex.net/pull/117


Version 0.15.0
--------------
Expand Down

0 comments on commit 71c480a

Please sign in to comment.