Example #1
0
        private HubMessage CreateHubCloseMessage(ReadOnlySpan <byte> protobufMessage)
        {
            var protobufCloseMessage = new CloseMessageProtobuf();

            protobufCloseMessage.MergeFrom(protobufMessage.ToArray());

            return(new CloseMessage(protobufCloseMessage.Error));
        }
        private HubMessage CreateHubCloseMessage(ReadOnlySpan <byte> protobufMessage)
        {
            var protobufCloseMessage = new CloseMessageProtobuf();

            protobufCloseMessage.MergeFrom(protobufMessage.ToArray());

            var error = string.IsNullOrEmpty(protobufCloseMessage.Error) ? null : protobufCloseMessage.Error;

            return(new CloseMessage(error));
        }