public static Serializer FromGeneralSerializer<T>(IGeneralSerializer<T> serializer) { return new Serializer() { TargetType = typeof(T), IsGeneral = true, SerializeFunction = serializer.Serialize, DeserializeFunction = serializer.Deserialize }; }
public void RegisterGeneralSerializer <T>(IGeneralSerializer <T> serializer) { var resultSerializer = Serializer.FromGeneralSerializer(serializer); RegisterSerializer(resultSerializer); }
public IMessageRouter RegisterGeneralSerializer <T>(IGeneralSerializer <T> serializer) { _dataContractBuilder.RegisterGeneralSerializer(serializer); return(this); }