// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
namespace Microsoft.AspNetCore.SignalR
{
///
/// Represents a serialized message.
///
public readonly struct SerializedMessage
{
///
/// Gets the protocol of the serialized message.
///
public string ProtocolName { get; }
///
/// Gets the serialized representation of the message.
///
public ReadOnlyMemory Serialized { get; }
///
/// Initializes a new instance of the class.
///
/// The protocol of the serialized message.
/// The serialized representation of the message.
public SerializedMessage(string protocolName, ReadOnlyMemory serialized)
{
ProtocolName = protocolName;
Serialized = serialized;
}
}
}