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


C# TagBuilder.Process方法代码示例

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


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

示例1: NoTags

 public void NoTags()
 {
     TagBuilder builder = new TagBuilder();
     Event ev = EventFactory.CreateFromXml(TestEventXml.E001_Error);
     builder.Process(ev);
     Assert.That(ev.Tags.Count, Is.EqualTo(0));
 }
开发者ID:SayHalou,项目名称:ospy,代码行数:7,代码来源:TagBuilderTest.cs

示例2: SameSocketTag

        public void SameSocketTag()
        {
            TagBuilder builder = new TagBuilder();

            Event firstCreateEvent = EventFactory.CreateFromXml(TestEventXml.E083_CreateSocket);
            builder.Process(firstCreateEvent);
            Event firstConnEvent = EventFactory.CreateFromXml(TestEventXml.E084_Connect);
            builder.Process(firstConnEvent);

            Event secondCreateEvent = EventFactory.CreateFromXml(TestEventXml.E141_CreateSocket);
            builder.Process(secondCreateEvent);
            Event secondConnEvent = EventFactory.CreateFromXml(TestEventXml.E142_Connect);
            builder.Process(secondConnEvent);

            Assert.That(firstCreateEvent.Tags[0], Is.SameAs(firstConnEvent.Tags[0]));
            Assert.That(secondCreateEvent.Tags[0], Is.SameAs(secondConnEvent.Tags[0]));
            Assert.That(firstCreateEvent.Tags[0], Is.Not.SameAs(secondCreateEvent.Tags[0]));
        }
开发者ID:SayHalou,项目名称:ospy,代码行数:18,代码来源:TagBuilderTest.cs

示例3: BuildAndVerifySocketTag

 private void BuildAndVerifySocketTag(string xml, uint expectedHandle)
 {
     TagBuilder builder = new TagBuilder();
     Event ev = EventFactory.CreateFromXml(xml);
     builder.Process(ev);
     Assert.That(ev.Tags.Count, Is.EqualTo(1));
     Assert.That(ev.Tags[0], Is.InstanceOfType(typeof(Socket.SocketResourceTag)));
     Assert.That(ev.Tags[0].Name, Is.EqualTo("Socket"));
     ResourceTag resTag = ev.Tags[0] as ResourceTag;
     Assert.That(resTag.ResourceHandle, Is.EqualTo(expectedHandle));
 }
开发者ID:SayHalou,项目名称:ospy,代码行数:11,代码来源:TagBuilderTest.cs


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