89b38cec8a1044309ff94d06801322fc967a2bea
[platform/upstream/coreclr.git] / tests / src / tracing / keyword / TwoKeywords / TwoKeywords.cs
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4
5 using System;
6 using System.Diagnostics.Tracing;
7 using System.IO;
8 using System.Reflection;
9 using System.Threading;
10 using System.Threading.Tasks;
11 using Tracing.Tests.Common;
12
13 using Microsoft.Diagnostics.Tracing;
14 using Microsoft.Diagnostics.Tracing.Parsers.Clr;
15
16 namespace Tracing.Tests
17 {
18     public static class TwoKeywordsTest
19     {
20         public static int Main(string[] args)
21         {
22             return new TwoKeywordsTraceTest().Execute();
23         }
24     }
25
26     public class TwoKeywordsTraceTest : AbstractTraceTest
27     {
28         private bool pass;
29
30         protected override string GetConfigFileContents()
31         {
32             return @"
33 OutputPath=.
34 CircularMB=2048
35 Providers=My-Simple-Event-Source:0xFFFFFFFFFFFFFFFF:5:Key1=Value1;Key2=Value2
36 ";;
37         }
38
39         public override void OnEventCommand(object sender, EventCommandEventArgs command)
40         {
41             if (command.Command == EventCommand.Enable)
42             {
43                 this.pass = (command.Arguments.Count == 2);
44             }
45         }
46
47         protected override bool Pass()
48         {
49             return this.pass;
50         }
51     }
52 }