private void OnGetResourcesResponse(object sender, DualResponseEventArgs <v12.Protocol.Discovery.GetResources, v12.Protocol.Discovery.GetResourcesResponse, v12.Protocol.Discovery.GetResourcesEdgesResponse> args) { if (args.Response1 != null) { Console.WriteLine(EtpExtensions.Serialize(args.Response1.Body)); } if (args.Response2 != null) { Console.WriteLine(EtpExtensions.Serialize(args.Response2.Body)); } }
private void OnGetDataObjectsResponse(object sender, DualResponseEventArgs <v12.Protocol.Store.GetDataObjects, v12.Protocol.Store.GetDataObjectsResponse, v12.Protocol.Store.Chunk> args) { if (args.Response1 != null) { foreach (var dataObject in args.Response1.Body.DataObjects.Values) { var @string = dataObject.GetString(); dataObject.Data = null; Console.WriteLine(EtpExtensions.Serialize(dataObject)); if (!string.IsNullOrEmpty(@string)) { Console.WriteLine(@string); } } } if (args.Response2 != null) { Console.WriteLine($"Chunk received for {args.Response2.Body.BlobId} with {args.Response2.Body.Data?.Length ?? 0} bytes."); } }
/// <summary> /// Handles the response to a GetFrame message from a store. /// </summary> /// <param name="args">The <see cref="DualResponseEventArgs{GetFrame, GetFrameResponseHeader, GetFrameResponseRows}"/> instance containing the event data.</param> protected virtual void HandleGetFrameResponse(DualResponseEventArgs <GetFrame, GetFrameResponseHeader, GetFrameResponseRows> args) { }
/// <summary> /// Handles the FindDataObjectsResponse message from a store. /// </summary> /// <param name="args">The <see cref="DualResponseEventArgs{FindDataObjects, FindDataObjectsResponse, Chunk}"/> instance containing the event data.</param> protected virtual void HandleFindDataObjectsResponse(DualResponseEventArgs <FindDataObjects, FindDataObjectsResponse, Chunk> args) { }
/// <summary> /// Handles the GetDataObjectsResponse message from a store. /// </summary> /// <param name="args">The <see cref="DualResponseEventArgs{GetDataObjects, GetDataObjectsResponse, Chunk}"/> instance containing the event data.</param> protected virtual void HandleGetDataObjectsResponse(DualResponseEventArgs <GetDataObjects, GetDataObjectsResponse, Chunk> args) { }
/// <summary> /// Handles the GetResourcesResponse and GetResourcesEdgesResponse messages from a store. /// </summary> /// <param name="args">The <see cref="DualResponseEventArgs{GetResources, GetResourcesResponse, GetResourcesEdgesResponse}"/> instance containing the event data.</param> protected virtual void HandleGetResourcesResponse(DualResponseEventArgs <GetResources, GetResourcesResponse, GetResourcesEdgesResponse> args) { }
/// <summary> /// Handles the response to a RequestChannelData message from a producer. /// </summary> /// <param name="args">The <see cref="DualResponseEventArgs{RequestChannelData, ChannelMetadata, ChannelDataFrameSet}"/> instance containing the event data.</param> protected virtual void HandleRequestChannelDataResponse(DualResponseEventArgs <RequestChannelData, ChannelMetadata, ChannelDataFrameSet> args) { }