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

                    var result = await client.ImportTagGroupAsync(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.Import.Common.TagGroup> ImportAsync(App.Dto.Req.Import.Common.TagGroup exportItem, CancellationToken cancellationToken = default)
 {
     return(await _tagGroup.ImportAsync(exportItem, cancellationToken));
 }
예제 #3
0
 public App.Dto.Res.Import.Common.TagGroup ImportTagGroup(App.Dto.Req.Import.Common.TagGroup request, CallContext context = default)
 {
     return(_commandHandler.ExecuteWithResponse <App.Dto.Req.Import.Common.TagGroup, App.Dto.Res.Import.Common.TagGroup>(_loggerFactory, _componentContext, request));
 }
예제 #4
0
 public App.Dto.Res.Import.Common.TagGroup Import(App.Dto.Req.Import.Common.TagGroup exportItem, CancellationToken cancellationToken = default)
 {
     return(_tagGroup.Import(exportItem));
 }
예제 #5
0
 public async ValueTask <App.Dto.Res.Import.Common.TagGroup> ImportTagGroupAsync(App.Dto.Req.Import.Common.TagGroup request, CallContext context = default)
 {
     return(await _commandHandlerAsync.ExecuteWithResponseAsync <App.Dto.Req.Import.Common.TagGroup, App.Dto.Res.Import.Common.TagGroup>(_loggerFactory, _componentContext, request, context.CancellationToken));
 }