using System;
using System.Collections.Generic;
using System.Runtime.ExceptionServices;
using System.Text;
namespace Microsoft.AspNetCore.SignalR.Protocol
{
///
/// Represents a failure to bind arguments for a StreamDataMessage. This does not represent an actual
/// message that is sent on the wire, it is returned by
/// to indicate that a binding failure occurred when parsing a StreamDataMessage. The stream ID is associated
/// so that the error can be sent to the relevant hub method.
///
public class StreamBindingFailureMessage : HubMessage
{
///
/// Gets the id of the relevant stream
///
public string Id { get; }
///
/// Gets the exception thrown during binding.
///
public ExceptionDispatchInfo BindingFailure { get; }
///
/// Initializes a new instance of the class.
///
/// The stream ID.
/// The exception thrown during binding.
public StreamBindingFailureMessage(string id, ExceptionDispatchInfo bindingFailure)
{
Id = id;
BindingFailure = bindingFailure;
}
}
}