This commit is contained in:
Даниил Заикин
2026-06-17 20:44:53 +03:00
parent 9d153773c2
commit b133e7c656
1880 changed files with 244545 additions and 0 deletions
@@ -0,0 +1,31 @@
using System;
namespace QFSW.QC
{
/// <summary>
/// Creates a Serializer that is loaded and used by the QuantumSerializer.
/// </summary>
public interface IQcSerializer
{
/// <summary>
/// The priority of this serializer to resolve multiple serializers covering the same type.
/// </summary>
int Priority { get; }
/// <summary>
/// If this serializer can serialize the incoming type.
/// </summary>
/// <param name="type">The type to test.</param>
/// <returns>If it can serialize.</returns>
bool CanSerialize(Type type);
/// <summary>
/// Serializes the incoming data.
/// </summary>
/// <param name="value">The value to serialize.</param>
/// <param name="theme">The (optional) theme to use for formatted serialization.</param>
/// <param name="recursiveSerializer">Delegate back to the main serializer to allow for recursive serialization of sub elements.</param>
/// <returns>The serialized result.</returns>
string SerializeFormatted(object value, QuantumTheme theme, Func<object, QuantumTheme, string> recursiveSerializer);
}
}