public async ValueTask <bool> ModifyFieldAsync(App.Dto.Req.ModifyField.S7.S7Connection request, CancellationToken cancellationToken = default) { CallOptions = CallOptions.WithCancellationToken(cancellationToken); CallContext = new CallContext(CallOptions, CallContextFlags.IgnoreStreamTermination); var output = false; try { using (Channel) { var client = Channel.CreateGrpcService <ICommandAsync>(); var result = await client.ModifyS7ConnectionFieldAsync(request, CallContext); output = result.Result; } } catch (Exception ex) { Logger.LogError(GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name + " - " + ex.Source + " " + ex.Message + " " + ex.StackTrace); } return(output); }
public async ValueTask <bool> ModifyFieldAsync(App.Dto.Req.ModifyField.S7.S7Connection modifyS7ConnectionField, CancellationToken cancellationToken = default) { return(await _s7Connection.ModifyFieldAsync(modifyS7ConnectionField, cancellationToken)); }
public App.Dto.Res.ModifyField.S7.S7Connection ModifyS7ConnectionField(App.Dto.Req.ModifyField.S7.S7Connection request, CallContext context = default) { return(_commandHandler.ExecuteWithResponse <App.Dto.Req.ModifyField.S7.S7Connection, App.Dto.Res.ModifyField.S7.S7Connection>(_loggerFactory, _componentContext, request)); }
public bool ModifyField(App.Dto.Req.ModifyField.S7.S7Connection modifyS7ConnectionField, CancellationToken cancellationToken = default) { return(_s7Connection.ModifyField(modifyS7ConnectionField)); }
public async ValueTask <App.Dto.Res.ModifyField.S7.S7Connection> ModifyS7ConnectionFieldAsync(App.Dto.Req.ModifyField.S7.S7Connection request, CallContext context = default) { return(await _commandHandlerAsync.ExecuteWithResponseAsync <App.Dto.Req.ModifyField.S7.S7Connection, App.Dto.Res.ModifyField.S7.S7Connection>(_loggerFactory, _componentContext, request, context.CancellationToken)); }