Exemplo n.º 1
0
 public static CompiledSerializer Wrap(IProtoTypeSerializer head, TypeModel model)
 {
     CompiledSerializer result = head as CompiledSerializer;
     if (result == null)
     {
         result = new CompiledSerializer(head, model);
         Helpers.DebugAssert(((IProtoTypeSerializer)result).ExpectedType == head.ExpectedType);
     }
     return result;
 }
Exemplo n.º 2
0
        public static CompiledSerializer Wrap(IProtoTypeSerializer head, TypeModel model)
        {
            CompiledSerializer result = head as CompiledSerializer;

            if (result == null)
            {
                result = new CompiledSerializer(head, model);
                Helpers.DebugAssert(((IProtoTypeSerializer)result).ExpectedType == head.ExpectedType);
            }
            return(result);
        }