Exemple #1
0
        public T GetService <T>(PipeContext context)
            where T : class
        {
            var lifetimeScope = context.GetPayload <ILifetimeScope>();

            return(ActivatorUtils.GetOrCreateInstance <T>(lifetimeScope));
        }
        public Activity <TInstance> GetActivity <TActivity, TInstance>(BehaviorContext <TInstance> context)
            where TActivity : class, Activity <TInstance>
        {
            var lifetimeScope = context.GetPayload <ILifetimeScope>();

            return(ActivatorUtils.GetOrCreateInstance <TActivity>(lifetimeScope));
        }