예제 #1
0
        public async Task <App.Dto.Res.Copy.S7.S7Connection> CopyAsync(App.Dto.Req.Copy.S7.S7Connection request, CancellationToken cancellationToken = default)
        {
            CallOptions = CallOptions.WithCancellationToken(cancellationToken);
            CallContext = new CallContext(CallOptions, CallContextFlags.IgnoreStreamTermination);
            App.Dto.Res.Copy.S7.S7Connection output = new App.Dto.Res.Copy.S7.S7Connection();
            try
            {
                using (Channel)
                {
                    var client = Channel.CreateGrpcService <ICommandAsync>();

                    var result = await client.CopyS7ConnectionAsync(request, CallContext);

                    output = result;
                }
            }
            catch (Exception ex)
            {
                Logger.LogError(GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name + " - " + ex.Source + " " + ex.Message + " " + ex.StackTrace);
            }
            return(output);
        }
예제 #2
0
 public async ValueTask <App.Dto.Res.Copy.S7.S7Connection> CopyAsync(App.Dto.Req.Copy.S7.S7Connection copyS7Connection, CancellationToken cancellationToken = default)
 {
     return(await _s7Connection.CopyAsync(copyS7Connection, cancellationToken));
 }
예제 #3
0
 public App.Dto.Res.Copy.S7.S7Connection CopyS7Connection(App.Dto.Req.Copy.S7.S7Connection request, CallContext context = default)
 {
     return(_commandHandler.ExecuteWithResponse <App.Dto.Req.Copy.S7.S7Connection, App.Dto.Res.Copy.S7.S7Connection>(_loggerFactory, _componentContext, request));
 }
예제 #4
0
 public App.Dto.Res.Copy.S7.S7Connection Copy(App.Dto.Req.Copy.S7.S7Connection copyItem, CancellationToken cancellationToken = default)
 {
     return(_s7Connection.Copy(copyItem));
 }
예제 #5
0
 public async ValueTask <App.Dto.Res.Copy.S7.S7Connection> CopyS7ConnectionAsync(App.Dto.Req.Copy.S7.S7Connection request, CallContext context = default)
 {
     return(await _commandHandlerAsync.ExecuteWithResponseAsync <App.Dto.Req.Copy.S7.S7Connection, App.Dto.Res.Copy.S7.S7Connection>(_loggerFactory, _componentContext, request, context.CancellationToken));
 }