• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CancelWait.TestParameters类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Threading.Tasks.Tests.CancelWait.TestParameters的典型用法代码示例。如果您正苦于以下问题:C# TestParameters类的具体用法?C# TestParameters怎么用?C# TestParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TestParameters类属于System.Threading.Tasks.Tests.CancelWait命名空间,在下文中一共展示了TestParameters类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: TaskCancelWaitTest

        private CountdownEvent _countdownEvent;         // event to signal the main thread that the whole task tree has been created     

        #endregion

        /// <summary>
        /// .ctor
        /// </summary>
        public TaskCancelWaitTest(TestParameters parameters)
        {
            _api = parameters.API_CancelWait;
            _waitBy = parameters.WaitBy_CancelWait;
            _waitTimeout = parameters.WaitTime;
            _taskTree = parameters.RootNode;
            _countdownEvent = new CountdownEvent(CaluateLeafNodes(_taskTree));
        }
开发者ID:ChuangYang,项目名称:corefx,代码行数:15,代码来源:TaskCancelWaitTest.cs


示例2: TaskCancelWait5

        public static void TaskCancelWait5()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Light, "RespectParentCancellation");

            TestParameters parameters = new TestParameters(node, API.Cancel, WaitBy.None, -1);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例3: TaskCancelWait1

        public static void TaskCancelWait1()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Heavy, string.Empty, true);

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.Light, string.Empty);

            node.AddChildren(new[] { node_1, });
            TestParameters parameters = new TestParameters(node, API.Cancel, WaitBy.None, -1);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:12,代码来源:TaskCancelWaitTests.cs


示例4: TaskCancelWait4

        public static void TaskCancelWait4()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Light, "AttachedToParent");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.VeryHeavy, "RespectParentCancellation");

            node.AddChildren(new[] { node_1, });
            TestParameters parameters = new TestParameters(node, API.Cancel, WaitBy.None, -1);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:12,代码来源:TaskCancelWaitTests.cs


示例5: TaskCancelWait75

        public static void TaskCancelWait75()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Medium, "LongRunning");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.Heavy, "LongRunning, AttachedToParent");

            TaskInfo node_2 = new TaskInfo(node, "node_2", WorkloadType.Light, "RespectParentCancellation");

            node.AddChildren(new[] { node_1, node_2, });
            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.Millisecond, 197);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:14,代码来源:TaskCancelWaitTests.cs


示例6: TaskCancelWait40

        public static void TaskCancelWait40()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.VeryHeavy, "LongRunning, RespectParentCancellation");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.Medium, "RespectParentCancellation");
            TaskInfo node_1_1 = new TaskInfo(node_1, "node_1_1", WorkloadType.VeryHeavy, "RespectParentCancellation");
            node_1.AddChildren(new[] { node_1_1, });

            TaskInfo node_2 = new TaskInfo(node, "node_2", WorkloadType.VeryHeavy, "LongRunning, RespectParentCancellation");

            TaskInfo node_3 = new TaskInfo(node, "node_3", WorkloadType.Heavy, "RespectParentCancellation");
            TaskInfo node_3_1 = new TaskInfo(node_3, "node_3_1", WorkloadType.Medium, "RespectParentCancellation");
            TaskInfo node_3_2 = new TaskInfo(node_3, "node_3_2", WorkloadType.Light, "AttachedToParent");
            node_3.AddChildren(new[] { node_3_1, node_3_2, });

            node.AddChildren(new[] { node_1, node_2, node_3, });
            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.TimeSpan, -1);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:21,代码来源:TaskCancelWaitTests.cs


示例7: TaskCancelWait38

        public static void TaskCancelWait38()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Medium, "AttachedToParent");

            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.TimeSpan, -1);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例8: TaskCancelWait53

        public static void TaskCancelWait53()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Medium, "AttachedToParent");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.Heavy, "LongRunning");

            node.AddChildren(new[] { node_1, });
            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.Millisecond, 0);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:12,代码来源:TaskCancelWaitTests.cs


示例9: TaskCancelWait84

        public static void TaskCancelWait84()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.VeryHeavy, "LongRunning");

            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.TimeSpan, 197);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例10: TaskCancelWait141

        public static void TaskCancelWait141()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Heavy, "LongRunning, RespectParentCancellation");

            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.TimeSpan, 27);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例11: TaskCancelWait49

        public static void TaskCancelWait49()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.VeryLight, "LongRunning, AttachedToParent");

            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.Millisecond, 0);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例12: TaskCancelWait14

        public static void TaskCancelWait14()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.VeryLight, "AttachedToParent");

            TestParameters parameters = new TestParameters(node, API.Cancel, WaitBy.None, -1);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例13: TaskCancelWait137

        public static void TaskCancelWait137()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Heavy, "RespectParentCancellation");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.Heavy, "RespectParentCancellation");

            TaskInfo node_2 = new TaskInfo(node, "node_2", WorkloadType.Light, "RespectParentCancellation");

            node.AddChildren(new[] { node_1, node_2, });
            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.TimeSpan, 27);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:14,代码来源:TaskCancelWaitTests.cs


示例14: TaskCancelWait126

        public static void TaskCancelWait126()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Heavy, "AttachedToParent");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.VeryLight, "LongRunning, AttachedToParent");

            TaskInfo node_2 = new TaskInfo(node, "node_2", WorkloadType.VeryLight, "None");

            node.AddChildren(new[] { node_1, node_2, });
            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.Millisecond, 27);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:14,代码来源:TaskCancelWaitTests.cs


示例15: TaskCancelWait124

        public static void TaskCancelWait124()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.VeryLight, "None");

            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.Millisecond, 27);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例16: TaskCancelWait120

        public static void TaskCancelWait120()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.VeryLight, "LongRunning, RespectParentCancellation");

            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.Millisecond, 27);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例17: TaskCancelWait42

        public static void TaskCancelWait42()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.VeryHeavy, "LongRunning");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.Light, "LongRunning, RespectParentCancellation");

            node.AddChildren(new[] { node_1, });
            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.TimeSpan, -1);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:12,代码来源:TaskCancelWaitTests.cs


示例18: TaskCancelWait19

        public static void TaskCancelWait19()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Medium, "LongRunning, AttachedToParent");

            TestParameters parameters = new TestParameters(node, API.Cancel, WaitBy.None, -1);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:9,代码来源:TaskCancelWaitTests.cs


示例19: TaskCancelWait47

        public static void TaskCancelWait47()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.Light, "LongRunning, RespectParentCancellation");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.VeryLight, "LongRunning");
            TaskInfo node_1_1 = new TaskInfo(node_1, "node_1_1", WorkloadType.VeryLight, "LongRunning, RespectParentCancellation");
            TaskInfo node_1_2 = new TaskInfo(node_1, "node_1_2", WorkloadType.Medium, "None");
            node_1.AddChildren(new[] { node_1_1, node_1_2, });

            TaskInfo node_2 = new TaskInfo(node, "node_2", WorkloadType.VeryHeavy, "RespectParentCancellation");
            TaskInfo node_2_1 = new TaskInfo(node_2, "node_2_1", WorkloadType.Light, "LongRunning, RespectParentCancellation");
            TaskInfo node_2_2 = new TaskInfo(node_2, "node_2_2", WorkloadType.VeryHeavy, "None");
            node_2.AddChildren(new[] { node_2_1, node_2_2, });

            node.AddChildren(new[] { node_1, node_2, });
            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.Millisecond, 0);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:20,代码来源:TaskCancelWaitTests.cs


示例20: TaskCancelWait69

        public static void TaskCancelWait69()
        {
            TaskInfo node = new TaskInfo(null, "node", WorkloadType.VeryHeavy, "None");

            TaskInfo node_1 = new TaskInfo(node, "node_1", WorkloadType.VeryHeavy, "None");

            node.AddChildren(new[] { node_1, });
            TestParameters parameters = new TestParameters(node, API.Wait, WaitBy.Millisecond, 197);

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
开发者ID:noahfalk,项目名称:corefx,代码行数:12,代码来源:TaskCancelWaitTests.cs



注:本文中的System.Threading.Tasks.Tests.CancelWait.TestParameters类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# WaitAllAny.TaskInfo类代码示例发布时间:2022-05-26
下一篇:
C# CancelWait.TaskInfo类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap