internal static void MergeFrom(this IMessage message, ByteString data, bool discardUnknownFields, ExtensionRegistry registry) { ProtoPreconditions.CheckNotNull(message, "message"); ProtoPreconditions.CheckNotNull(data, "data"); CodedInputStream input = data.CreateCodedInput(); input.DiscardUnknownFields = discardUnknownFields; input.ExtensionRegistry = registry; message.MergeFrom(input); input.CheckReadEndOfStreamTag(); }
internal static void MergeFrom(this IMessage message, Stream input, bool discardUnknownFields, ExtensionRegistry registry) { ProtoPreconditions.CheckNotNull(message, "message"); ProtoPreconditions.CheckNotNull(input, "input"); CodedInputStream codedInput = new CodedInputStream(input); codedInput.DiscardUnknownFields = discardUnknownFields; codedInput.ExtensionRegistry = registry; message.MergeFrom(codedInput); codedInput.CheckReadEndOfStreamTag(); }
internal static void MergeFrom(this IMessage message, byte[] data, int offset, int length, bool discardUnknownFields, ExtensionRegistry registry) { ProtoPreconditions.CheckNotNull(message, "message"); ProtoPreconditions.CheckNotNull(data, "data"); CodedInputStream input = new CodedInputStream(data, offset, length); input.DiscardUnknownFields = discardUnknownFields; input.ExtensionRegistry = registry; message.MergeFrom(input); input.CheckReadEndOfStreamTag(); }