mirror of
https://github.com/simtactics/mysimulation.git
synced 2025-03-21 01:01:22 +00:00
- NioTSO client isn't needed because we're using RayLib - Added FreeSO's API server to handle most backend operations
27 lines
950 B
C#
Executable file
27 lines
950 B
C#
Executable file
using Mina.Core.Buffer;
|
|
using System;
|
|
|
|
namespace FSO.Common.Serialization
|
|
{
|
|
public interface IModelSerializer
|
|
{
|
|
object Deserialize(uint clsid, IoBuffer input, ISerializationContext context);
|
|
void Serialize(IoBuffer output, object obj, ISerializationContext context);
|
|
void Serialize(IoBuffer output, object value, ISerializationContext context, bool clsIdPrefix);
|
|
IoBuffer SerializeBuffer(object value, ISerializationContext context, bool clsIdPrefix);
|
|
|
|
uint? GetClsid(object value);
|
|
void AddTypeSerializer(ITypeSerializer serializer);
|
|
}
|
|
|
|
public interface ITypeSerializer
|
|
{
|
|
object Deserialize(uint clsid, IoBuffer input, ISerializationContext serializer);
|
|
void Serialize(IoBuffer output, object value, ISerializationContext serializer);
|
|
|
|
uint? GetClsid(object value);
|
|
|
|
bool CanSerialize(Type type);
|
|
bool CanDeserialize(uint clsid);
|
|
}
|
|
}
|