public void ModifyMonitoredItemsAsyncNull() { var response = new ModifyMonitoredItemsResponse(); var channel = new TestRequestChannel(response); channel.Invoking(c => c.ModifyMonitoredItemsAsync(null)) .Should().Throw <ArgumentNullException>(); }
public async Task ModifyMonitoredItemsAsync() { var response = new ModifyMonitoredItemsResponse(); var request = new ModifyMonitoredItemsRequest(); var channel = new TestRequestChannel(response); var ret = await channel.ModifyMonitoredItemsAsync(request); ret .Should().BeSameAs(response); channel.Request .Should().BeSameAs(request); }
/// <summary> /// Invokes the ModifyMonitoredItems service. /// </summary> public IServiceResponse ModifyMonitoredItems(IServiceRequest incoming) { ModifyMonitoredItemsResponse response = null; ModifyMonitoredItemsRequest request = (ModifyMonitoredItemsRequest)incoming; MonitoredItemModifyResultCollection results = null; DiagnosticInfoCollection diagnosticInfos = null; response = new ModifyMonitoredItemsResponse(); response.ResponseHeader = ServerInstance.ModifyMonitoredItems( request.RequestHeader, request.SubscriptionId, request.TimestampsToReturn, request.ItemsToModify, out results, out diagnosticInfos); response.Results = results; response.DiagnosticInfos = diagnosticInfos; return response; }
/// <summary> /// Initializes the message with a service fault. /// </summary> public ModifyMonitoredItemsResponseMessage(ServiceFault ServiceFault) { this.ModifyMonitoredItemsResponse = new ModifyMonitoredItemsResponse(); if (ServiceFault != null) { this.ModifyMonitoredItemsResponse.ResponseHeader = ServiceFault.ResponseHeader; } }
/// <summary> /// Initializes the message with the body. /// </summary> public ModifyMonitoredItemsResponseMessage(ModifyMonitoredItemsResponse ModifyMonitoredItemsResponse) { this.ModifyMonitoredItemsResponse = ModifyMonitoredItemsResponse; }
/// <summary cref="IServiceMessage.CreateResponse" /> public object CreateResponse(IServiceResponse response) { ModifyMonitoredItemsResponse body = response as ModifyMonitoredItemsResponse; if (body == null) { body = new ModifyMonitoredItemsResponse(); body.ResponseHeader = ((ServiceFault)response).ResponseHeader; } return new ModifyMonitoredItemsResponseMessage(body); }