示例#1
0
        public static int GetCounter(this IAppContext ctx)
        {
            //return ctx.Get<int>(AppSettings.CounterKey);

            // debug
            var x = ctx.Get <int>(AppSettings.CounterKey);;

            return(x);
        }
示例#2
0
        public void Execute(IAppContext context)
        {
            _logger.LogInformation(this, context, _singletonDependency, _scopedDependency, _transientDependency);

            int counter = context.Get <int>(AppSettings.CounterKey);

            _logger.LogInformation($"{this} --- while counter: {counter}");

            // while loop condition
            context.Set(AppSettings.CounterKey, ++counter);
        }