Beispiel #1
0
   static T __Helper_DeserializeMessage <T>(grpc.DeserializationContext context, MessageParser <T> parser) where T : IMessage <T>
   {
 #if !GRPC_DISABLE_PROTOBUF_BUFFER_SERIALIZATION
       if (__Helper_MessageCache <T> .IsBufferMessage)
       {
           return(parser.ParseFrom(context.PayloadAsReadOnlySequence()));
       }
 #endif
       return(parser.ParseFrom(context.PayloadAsNewBuffer()));
   }
Beispiel #2
0
 // for backward compatibility, emulate the contextual deserializer using the simple one
 private T EmulateContextualDeserializer(DeserializationContext context)
 {
     return(this.deserializer(context.PayloadAsNewBuffer()));
 }