namespace Microsoft.Rest.ClientRuntime { using System; using System.Threading; ///Represents the data in signaled event. public partial class EventData { /// /// The type of the event being signaled /// public string Id; /// /// The user-ready message from the event. /// public string Message; /// /// When the event is about a parameter, this is the parameter name. /// Used in Validation Events /// public string Parameter; /// /// This represents a numeric value associated with the event. /// Use for progress-style events /// public double Value; /// /// Any extended data for an event should be serialized and stored here. /// public string ExtendedData; /// /// If the event triggers after the request message has been created, this will contain the Request Message (which in HTTP calls would be HttpRequestMessage) /// /// Typically you'd cast this to the expected type to use it: /// /// if(eventData.RequestMessgae is HttpRequestMessage httpRequest) /// { /// httpRequest.Headers.Add("x-request-flavor", "vanilla"); /// } /// /// public object RequestMessage; /// /// If the event triggers after the response is back, this will contain the Response Message (which in HTTP calls would be HttpResponseMessage) /// /// Typically you'd cast this to the expected type to use it: /// /// if(eventData.ResponseMessage is HttpResponseMessage httpResponse){ /// var flavor = httpResponse.Headers.GetValue("x-request-flavor"); /// } /// /// public object ResponseMessage; /// /// Cancellation method for this event. /// /// If the event consumer wishes to cancel the request that initiated this event, call Cancel() /// /// /// The original initiator of the request must provide the implementation of this. /// public System.Action Cancel; } }