// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.md in the project root for license information. using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using Newtonsoft.Json; namespace Microsoft.AspNet.SignalR.Hubs { /// /// The response returned from an incoming hub request. /// public class HubResponse { /// /// The changes made the the round tripped state. /// [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Type is used for serialization")] [JsonProperty("S", NullValueHandling = NullValueHandling.Ignore)] public IDictionary State { get; set; } /// /// The result of the invocation. /// [JsonProperty("R", NullValueHandling = NullValueHandling.Ignore)] public object Result { get; set; } /// /// The id of the operation. /// [JsonProperty("I")] public string Id { get; set; } /// /// The exception that occurs as a result of invoking the hub method. /// [JsonProperty("E", NullValueHandling = NullValueHandling.Ignore)] public string Error { get; set; } /// /// The stack trace of the exception that occurs as a result of invoking the hub method. /// [JsonProperty("T", NullValueHandling = NullValueHandling.Ignore)] public string StackTrace { get; set; } } }