當前位置: 首頁>>代碼示例>>C#>>正文


C# CancelWait.TaskCancelWaitTest類代碼示例

本文整理匯總了C#中System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTest的典型用法代碼示例。如果您正苦於以下問題:C# TaskCancelWaitTest類的具體用法?C# TaskCancelWaitTest怎麽用?C# TaskCancelWaitTest使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TaskCancelWaitTest類屬於System.Threading.Tasks.Tests.CancelWait命名空間,在下文中一共展示了TaskCancelWaitTest類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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

示例2: 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

示例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: TaskCancelWait31

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

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

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
開發者ID:noahfalk,項目名稱:corefx,代碼行數:9,代碼來源:TaskCancelWaitTests.cs

示例5: TaskCancelWait24

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

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

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

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

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
開發者ID:noahfalk,項目名稱:corefx,代碼行數:14,代碼來源:TaskCancelWaitTests.cs

示例6: 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

示例7: TaskCancelWait52

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

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

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

            TaskInfo node_3 = new TaskInfo(node, "node_3", WorkloadType.Medium, "RespectParentCancellation");

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

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

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

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

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

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
開發者ID:noahfalk,項目名稱:corefx,代碼行數:24,代碼來源:TaskCancelWaitTests.cs

示例8: 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

示例9: 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

示例10: 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

示例11: 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

示例12: 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

示例13: TaskCancelWait80

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

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

            TaskCancelWaitTest test = new TaskCancelWaitTest(parameters);
            test.RealRun();
        }
開發者ID:noahfalk,項目名稱:corefx,代碼行數:9,代碼來源:TaskCancelWaitTests.cs

示例14: 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

示例15: 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


注:本文中的System.Threading.Tasks.Tests.CancelWait.TaskCancelWaitTest類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。