public BinaryMessageSerializer() { serializer = new BinarySerializer(this); serializer.RegisterStringHashProperty(typeof(IGenericMessage), nameof(IGenericMessage.Target)); serializer.RegisterStringHashProperty(typeof(IGenericMessage), nameof(IGenericMessage.Name)); }
public SerializationContext(BinarySerializer serializer, IUnknowContextTypeResolver unknowContextTypeResolver, bool isDeserialize) { this.serializer = serializer; this.unknowContextTypeResolver = unknowContextTypeResolver; this.IsDeserialize = isDeserialize; }