예제 #1
0
 public static Serializer FromGeneralSerializer<T>(IGeneralSerializer<T> serializer)
 {
     return new Serializer()
     {
         TargetType = typeof(T),
         IsGeneral = true,
         SerializeFunction = serializer.Serialize,
         DeserializeFunction = serializer.Deserialize
     };
 }
예제 #2
0
        public void RegisterGeneralSerializer <T>(IGeneralSerializer <T> serializer)
        {
            var resultSerializer = Serializer.FromGeneralSerializer(serializer);

            RegisterSerializer(resultSerializer);
        }
예제 #3
0
 public IMessageRouter RegisterGeneralSerializer <T>(IGeneralSerializer <T> serializer)
 {
     _dataContractBuilder.RegisterGeneralSerializer(serializer);
     return(this);
 }