本文整理汇总了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));
}
示例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]));
}
示例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));
}