Beispiel #1
0
        private void WriteStreamInvocationMessage(StreamInvocationMessage message, JsonTextWriter writer)
        {
            WriteInvocationId(message, writer);
            writer.WritePropertyName(TargetPropertyName);
            writer.WriteValue(message.Target);

            WriteArguments(message.Arguments, writer);
        }
Beispiel #2
0
        private void WriteStreamInvocationMessage(StreamInvocationMessage message, Utf8JsonWriter writer)
        {
            WriteInvocationId(message, writer);
            writer.WriteString(TargetPropertyNameBytes, message.Target);

            WriteArguments(message.Arguments, writer);

            WriteStreamIds(message.StreamIds, writer);
        }
        private void WriteStreamInvocationMessage(StreamInvocationMessage message, ref MessagePackWriter writer)
        {
            writer.WriteArrayHeader(6);

            writer.Write(HubProtocolConstants.StreamInvocationMessageType);
            PackHeaders(message.Headers, ref writer);
            writer.Write(message.InvocationId);
            writer.Write(message.Target);

            writer.WriteArrayHeader(message.Arguments.Length);
            foreach (var arg in message.Arguments)
            {
                WriteArgument(arg, ref writer);
            }

            WriteStreamIds(message.StreamIds, ref writer);
        }