mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 11:15:08 +00:00
feat: move PD Core into Essentials
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using PepperDash.Core.Intersystem.Tokens;
|
||||
|
||||
namespace PepperDash.Core.Intersystem.Serialization
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface to determine XSig serialization for an object.
|
||||
/// </summary>
|
||||
public interface IXSigSerialization
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialize the sig data
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IEnumerable<XSigToken> Serialize();
|
||||
|
||||
/// <summary>
|
||||
/// Deserialize the sig data
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="tokens"></param>
|
||||
/// <returns></returns>
|
||||
T Deserialize<T>(IEnumerable<XSigToken> tokens) where T : class, IXSigSerialization;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
|
||||
namespace PepperDash.Core.Intersystem.Serialization
|
||||
{
|
||||
/// <summary>
|
||||
/// Class to handle this specific exception type
|
||||
/// </summary>
|
||||
public class XSigSerializationException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// default constructor
|
||||
/// </summary>
|
||||
public XSigSerializationException() { }
|
||||
|
||||
/// <summary>
|
||||
/// constructor with message
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public XSigSerializationException(string message) : base(message) { }
|
||||
|
||||
/// <summary>
|
||||
/// constructor with message and innner exception
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="inner"></param>
|
||||
public XSigSerializationException(string message, Exception inner) : base(message, inner) { }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user