コード例 #1
0
        internal ProfilingTasksType GenerateTasks()
        {
            // get the kernel flags first
            EtwProviderType kernelProvider = GenerateKernelProvider();

            // get the regular providers
            List <EtwProviderType> etwProviders = GenerateEtwProviderList();

            // add the kernel provider to the list of providers we will be profiling
            etwProviders.Insert(0, kernelProvider);

            // now generate the correct XML object sequence tree
            ProfilingTasksType tasks = new ProfilingTasksType();

            tasks.Task = new TaskType[] { new TaskType()
                                          {
                                              Name = "WPProfiler"
                                          } };

            // EtwProvider is an array, go figure
            tasks.Task[0].EtwProvider = etwProviders.ToArray();

            return(tasks);
        }
コード例 #2
0
        internal ProfilingTasksType GenerateTasks()
        {
            // get the kernel flags first
            EtwProviderType kernelProvider = GenerateKernelProvider();

            // get the regular providers
            List<EtwProviderType> etwProviders = GenerateEtwProviderList();

            // add the kernel provider to the list of providers we will be profiling
            etwProviders.Insert(0, kernelProvider);

            // now generate the correct XML object sequence tree
            ProfilingTasksType tasks = new ProfilingTasksType();
            tasks.Task = new TaskType[] { new TaskType() { Name = "WPProfiler" }};

            // EtwProvider is an array, go figure
            tasks.Task[0].EtwProvider = etwProviders.ToArray();

            return tasks;
        }