mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 04:34:56 +00:00
chore: move all files to file-scoped namespace
This commit is contained in:
@@ -1,45 +1,44 @@
|
||||
namespace PepperDash.Core.Intersystem.Tokens
|
||||
namespace PepperDash.Core.Intersystem.Tokens;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the base class for all XSig datatypes.
|
||||
/// </summary>
|
||||
public abstract class XSigToken
|
||||
{
|
||||
private readonly int _index;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the base class for all XSig datatypes.
|
||||
/// Constructs an XSigToken with the specified index.
|
||||
/// </summary>
|
||||
public abstract class XSigToken
|
||||
/// <param name="index">Index for the data.</param>
|
||||
protected XSigToken(int index)
|
||||
{
|
||||
private readonly int _index;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs an XSigToken with the specified index.
|
||||
/// </summary>
|
||||
/// <param name="index">Index for the data.</param>
|
||||
protected XSigToken(int index)
|
||||
{
|
||||
_index = index;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// XSig 1-based index.
|
||||
/// </summary>
|
||||
public int Index
|
||||
{
|
||||
get { return _index; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// XSigToken type.
|
||||
/// </summary>
|
||||
public abstract XSigTokenType TokenType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Generates the XSig bytes for the corresponding token.
|
||||
/// </summary>
|
||||
/// <returns>XSig byte array.</returns>
|
||||
public abstract byte[] GetBytes();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a new token if necessary with an updated index based on the specified offset.
|
||||
/// </summary>
|
||||
/// <param name="offset">Offset to adjust the index with.</param>
|
||||
/// <returns>XSigToken</returns>
|
||||
public abstract XSigToken GetTokenWithOffset(int offset);
|
||||
_index = index;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// XSig 1-based index.
|
||||
/// </summary>
|
||||
public int Index
|
||||
{
|
||||
get { return _index; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// XSigToken type.
|
||||
/// </summary>
|
||||
public abstract XSigTokenType TokenType { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Generates the XSig bytes for the corresponding token.
|
||||
/// </summary>
|
||||
/// <returns>XSig byte array.</returns>
|
||||
public abstract byte[] GetBytes();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a new token if necessary with an updated index based on the specified offset.
|
||||
/// </summary>
|
||||
/// <param name="offset">Offset to adjust the index with.</param>
|
||||
/// <returns>XSigToken</returns>
|
||||
public abstract XSigToken GetTokenWithOffset(int offset);
|
||||
}
|
||||
Reference in New Issue
Block a user