当前位置: 首页>>代码示例>>C#>>正文


C# EventSource.Write方法代码示例

本文整理汇总了C#中System.Diagnostics.Tracing.EventSource.Write方法的典型用法代码示例。如果您正苦于以下问题:C# EventSource.Write方法的具体用法?C# EventSource.Write怎么用?C# EventSource.Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Diagnostics.Tracing.EventSource的用法示例。


在下文中一共展示了EventSource.Write方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Test_Write_Fuzzy

        public void Test_Write_Fuzzy()
        {
            using (var logger = new EventSource("EventSourceName"))
            {
                var tests = new List<SubTest>();

                tests.Add(new SubTest("WJUYBHDKQB",
           delegate ()
              {
                  logger.Write("WJUYBHDKQB",
                      new
                      {
                          typeToCheck = new Boolean[] { false, false },
                          P = new UInt32[] { 148, 17, 71 },
                          W = false,
                          Z = new Double[] { 0.268929284656853f, 0.742295096974026f },
                          A = 'A',
                          D = new UInt32[] { 189, 130 },
                          E = new
                          {
                              QB = 4,
                              OQ = new UInt32[] { 217, 87, 57, 82 },
                              WD = 99,
                              LE = new
                              {
                                  YSE = new Byte[] { 11 },
                                  PCI = 149,
                                  LNK = 138,
                                  QXH = 58778,
                                  ICZ = 0.0947599141368456f,
                                  ROQ = new
                                  {
                                      MMBW = 0.8394049f,
                                      ZOZL = new Byte[] { 152 },
                                      CVQC = new Int16[] { 15147, 1106, 24561, 3912 },
                                      UMNP = new UIntPtr(144),
                                      QQPE = new Decimal(0.286001046321355f),
                                      BALW = new
                                      {
                                          GXOSO = new Guid[] { new Guid("2b2c6a42-1011-8ba5-b799-d5652c22d1aa") },
                                          XVPOF = new
                                          {
                                              HJRKVT = new TimeSpan(321),
                                              DBFFJU = 17,
                                              KAOGPS = 923,
                                              GGBLRC = new UInt64[] { 93, 110, 152, 92 },
                                              KHVFCF = new
                                              {
                                                  HGWJUNM = new Int64[] { 12544, 32021, 27152 },
                                                  KLLPZZS = 250,
                                                  ZPNDOEB = new
                                                  {
                                                      UCUBZMJE = new Double[] { 0.093586054674157f, 0.380068612927603f, 0.219240242251773f },
                                                      GYBXWALA = new UInt64[] { 57 },
                                                      RCLPECCQ = 0.339707483695684f,
                                                      IETSJOER = new
                                                      {
                                                          YCHWSOMSB = 23,
                                                          SOYKCAJLU = new UIntPtr[] { new UIntPtr(204), new UIntPtr(152), new UIntPtr(162) },
                                                          OYEBBFINH = new Decimal(0.381492302465016f),
                                                          BEJVKWDLA = new Boolean[] { false, false, false, false },
                                                          HLTFIQJFS = new Decimal(0.637544767762322f),
                                                          VTXOMKNSO = new
                                                          {
                                                              LPYMUBHQMI = new Single[] { 0.7763445f, 0.06919894f, 0.8328319f },
                                                              QRSIWWSECE = new IntPtr(556),
                                                              IPXWJSYIMM = 148,
                                                              HLHISSJNFP = new Int16[] { 29766, 20985 },
                                                              VEOQAJJLBZ = new
                                                              {
                                                                  LLJUDQKBTEZ = new Byte[] { 104, 11 },
                                                                  OJLJVJISNRA = new UInt32[] { 82, 6, 191, 174 },
                                                                  HHDCFLHZWZY = new
                                                                  {
                                                                      PTDEWXGPDDBR = new TimeSpan(7588),
                                                                      SRSXRTYMCTQB = 0.92578462461279f,
                                                                      TKSKNUCFEWPL = new Guid[] { new Guid("77149377-01d2-8ebb-3de5-b840c76f8325") },
                                                                      AFQFDPTQGYHE = new
                                                                      {
                                                                          QGAKGVMVKTJGK = 27,
                                                                          NWIGJXMWDKYEA = new Int16[] { 15083, 28400 }
                                                                      }
                                                                  }
                                                              }
                                                          }
                                                      }
                                                  }
                                              }
                                          }
                                      }
                                  }
                              }
                          }
                      }
                  );
              },
                delegate (Event evt)
                {
                    Assert.Equal(logger.Name, evt.ProviderName);
                    Assert.Equal("WJUYBHDKQB", evt.EventName);
//.........这里部分代码省略.........
开发者ID:Alantoo,项目名称:corefx,代码行数:101,代码来源:FuzzyTests.cs


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