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