示例#1
0
        public static SagaQueryConsumeContext <TSaga, T> CreateQueryScope <T, TSaga>(this SagaQueryConsumeContext <TSaga, T> context)
            where T : class
            where TSaga : class, ISaga
        {
            var proxy = new SagaQueryConsumeContextProxy <TSaga, T>(context, new PayloadCacheScope(context), context.Query);

            return(proxy);
        }
示例#2
0
        public static SagaQueryConsumeContext <TSaga, T> CreateQueryScope <T, TSaga, TScope>(this SagaQueryConsumeContext <TSaga, T> context, TScope scope)
            where T : class
            where TSaga : class, ISaga
            where TScope : class
        {
            var proxy = new SagaQueryConsumeContextProxy <TSaga, T>(context, new PayloadCacheScope(context), context.Query);

            proxy.GetOrAddPayload(() => scope);

            return(proxy);
        }