Example #1
0
        public static async Task DoCombinedSync(this MyComponent parent,
                                                string name)
        {
            // calculate access Scope
            long scope = 3;

            await parent.InChild(scope, async component =>
            {
                await component.DoA(name + ".1");
                await component.DoB(name + ".2");
            });
        }
Example #2
0
        public static Task DoCombined(this MyComponent parent,
                                      string name)
        {
            // calculate access Scope
            long scope = 3;

            return(TaskCollector.With(tc =>
            {
                parent.InChild(scope, component =>
                {
                    tc.Add(component.DoA(name + ".1"));
                    tc.Add(component.DoB(name + ".2"));
                });
            }));
        }