31 lines
969 B
C#
Raw Permalink Normal View History

2020-01-11 17:56:12 +01:00
namespace Capnp
2019-06-12 21:56:55 +02:00
{
/// <summary>
/// Generic <see cref="ICapnpSerializable"/> implementation, based on a wrapper around <see cref="DeserializerState"/>.
/// </summary>
public class AnyPointer : ICapnpSerializable
{
/// <summary>
/// The <see cref="DeserializerState"/> will be set by the Deserialize method.
/// </summary>
public DeserializerState State { get; private set; }
/// <summary>
/// Sets the State property.
/// </summary>
/// <param name="state">deserializer state</param>
public void Deserialize(DeserializerState state)
{
State = state;
}
/// <summary>
/// Performs a deep copy from State to given state.
/// </summary>
/// <param name="state">serializer state</param>
public void Serialize(SerializerState state)
{
Reserializing.DeepCopy(State, state);
}
}
2020-01-11 17:56:12 +01:00
}