本文整理汇总了C#中MemBlock.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# MemBlock.Equals方法的具体用法?C# MemBlock.Equals怎么用?C# MemBlock.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemBlock
的用法示例。
在下文中一共展示了MemBlock.Equals方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Verify
public static void Verify(MemBlock p, ISender from, object state) {
lock(_class_lock) {
//
// Make sure that the packet equals my state.
//
if (!p.Equals(state)) {
_wrongly_routed++;
}
_received++;
}
}
示例2: VerifyRequest
///<summary>Verifies the hash with the DHEWithCertificateHash.</summary>
public bool VerifyRequest(MemBlock hash) {
if(DHEWithCertificateHash.Value == null) {
throw new Exception("Hash not set!");
} else if(!DHEWithCertificateHash.Value.Equals(hash)) {
throw new Exception("Hash does not match!");
}
_hash_verified = true;
return hash.Equals(DHEWithCertificateHash.Value);
}
示例3: IsLocalIP
/// <summary>Is this our IP? Are we routing for it?</summary>
/// <param name="ip">The IP in question.</param>
protected virtual bool IsLocalIP(MemBlock ip)
{
return _ip_to_ether.ContainsKey(ip) || ip.Equals(IPPacket.ZeroAddress);
}