-
Notifications
You must be signed in to change notification settings - Fork 9.9k
/
StreamBindingFailureMessage.cs
37 lines (34 loc) · 1.37 KB
/
StreamBindingFailureMessage.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Runtime.ExceptionServices;
using System.Text;
namespace Microsoft.AspNetCore.SignalR.Protocol
{
/// <summary>
/// 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 <see cref="IHubProtocol.TryParseMessage"/>
/// 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.
/// </summary>
public class StreamBindingFailureMessage : HubMessage
{
/// <summary>
/// Gets the id of the relevant stream
/// </summary>
public string Id { get; }
/// <summary>
/// Gets the exception thrown during binding.
/// </summary>
public ExceptionDispatchInfo BindingFailure { get; }
/// <summary>
/// Initializes a new instance of the <see cref="InvocationBindingFailureMessage"/> class.
/// </summary>
/// <param name="id">The stream ID.</param>
/// <param name="bindingFailure">The exception thrown during binding.</param>
public StreamBindingFailureMessage(string id, ExceptionDispatchInfo bindingFailure)
{
Id = id;
BindingFailure = bindingFailure;
}
}
}