示例#1
0
 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));
     }
 }
示例#2
0
 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.");
     }
 }
示例#3
0
 /// <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)
 {
 }
示例#4
0
 /// <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)
 {
 }
示例#5
0
 /// <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)
 {
 }
示例#6
0
 /// <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)
 {
 }
示例#7
0
 /// <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)
 {
 }