Example #1
0
        public async Task <Response <IEnumerable <Menu> > > Get()
        {
            Response <IEnumerable <Menu> > result = new Response <IEnumerable <Menu> >();

            var cts   = new CancellationTokenSource();
            var token = cts.Token;

            token.ThrowIfCancellationRequested();

            var crcBreaker = this.circuitBreaker.Invoke(
                async() =>
            {
                menuActionService.InvokeGet(result);
            },
                async() =>
            {
                menuFailActionService.InvokeGet(result);
            });

            return(result);
        }