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;
 }
Beispiel #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);
        }