コード例 #1
0
ファイル: AppExtensions.cs プロジェクト: artmind-net/appflow
        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);
        }