本文整理汇总了C#中OpenSource.UPnP.UPnPService.GetHashCode方法的典型用法代码示例。如果您正苦于以下问题:C# UPnPService.GetHashCode方法的具体用法?C# UPnPService.GetHashCode怎么用?C# UPnPService.GetHashCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSource.UPnP.UPnPService
的用法示例。
在下文中一共展示了UPnPService.GetHashCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScanDeviceNode
/// <summary>
/// Scans all service nodes of the visual tree and updated any state variable values that
/// may have been updated by an incoming event.
/// </summary>
/// <param name="dNode"></param>
/// <param name="s"></param>
private void ScanDeviceNode(TreeNode dNode, UPnPService s)
{
TreeNode pNode = dNode.FirstNode;
TreeNode vNode;
while (pNode != null)
{
if (pNode.Tag.GetType() == typeof(OpenSource.UPnP.UPnPDevice))
{
ScanDeviceNode(pNode, s);
}
else
{
if (pNode.Tag.GetHashCode() == s.GetHashCode())
{
// This Service
vNode = pNode.FirstNode.FirstNode;
while (vNode != null)
{
if (((UPnPStateVariable)vNode.Tag).SendEvent == true)
{
string stringValue = UPnPService.SerializeObjectInstance(((UPnPStateVariable)vNode.Tag).Value);
if (stringValue.Length > 10) stringValue = stringValue.Substring(0, 10) + "...";
if (stringValue.Length > 0) stringValue = " [" + stringValue + "]";
vNode.Text = ((UPnPStateVariable)vNode.Tag).Name + stringValue;
}
vNode = vNode.NextNode;
}
break;
}
}
pNode = pNode.NextNode;
}
}