Exemple #1
0
        public async ValueTask <App.Dto.Res.Export.Common.Tag> ExportAsync(App.Dto.Req.Export.Common.Tag request, CancellationToken cancellationToken = default)
        {
            CallOptions = CallOptions.WithCancellationToken(cancellationToken);
            CallContext = new CallContext(CallOptions, CallContextFlags.IgnoreStreamTermination);
            App.Dto.Res.Export.Common.Tag output = new App.Dto.Res.Export.Common.Tag();
            try
            {
                using (Channel)
                {
                    var client = Channel.CreateGrpcService <ICommandAsync>();

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

                    output = result;
                }
            }
            catch (Exception ex)
            {
                Logger.LogError(GetType().FullName + "." + System.Reflection.MethodBase.GetCurrentMethod()?.Name + " - " + ex.Source + " " + ex.Message + " " + ex.StackTrace);
            }
            return(output);
        }
Exemple #2
0
 public App.Dto.Res.Export.Common.Tag ExportTag(App.Dto.Req.Export.Common.Tag request, CallContext context = default)
 {
     return(_commandHandler.ExecuteWithResponse <App.Dto.Req.Export.Common.Tag, App.Dto.Res.Export.Common.Tag>(_loggerFactory, _componentContext, request));
 }
Exemple #3
0
 public async ValueTask <App.Dto.Res.Export.Common.Tag> ExportAsync(App.Dto.Req.Export.Common.Tag exportItem, CancellationToken cancellationToken = default)
 {
     return(await _tag.ExportAsync(exportItem, cancellationToken));
 }
Exemple #4
0
 public async ValueTask <App.Dto.Res.Export.Common.Tag> ExportTagAsync(App.Dto.Req.Export.Common.Tag request, CallContext context = default)
 {
     return(await _commandHandlerAsync.ExecuteWithResponseAsync <App.Dto.Req.Export.Common.Tag, App.Dto.Res.Export.Common.Tag>(_loggerFactory, _componentContext, request, context.CancellationToken));
 }
Exemple #5
0
 public App.Dto.Res.Export.Common.Tag Export(App.Dto.Req.Export.Common.Tag exportItem, CancellationToken cancellationToken = default)
 {
     return(_tag.Export(exportItem));
 }