本文整理汇总了C#中Brunet.Symphony.AHAddress.ToMemBlock方法的典型用法代码示例。如果您正苦于以下问题:C# AHAddress.ToMemBlock方法的具体用法?C# AHAddress.ToMemBlock怎么用?C# AHAddress.ToMemBlock使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Brunet.Symphony.AHAddress
的用法示例。
在下文中一共展示了AHAddress.ToMemBlock方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SubringTransportAddress
public SubringTransportAddress(AHAddress target, string node_ns) :
base(string.Format("brunet.{0}://{1}.{2}", TATypeToString(TAType.Subring),
target.ToMemBlock().ToBase32String(), node_ns))
{
Target = target;
Namespace = node_ns;
}
示例2: CacheTest
public void CacheTest()
{
RandomNumberGenerator rng = new RNGCryptoServiceProvider();
Address a = new AHAddress(rng);
Address a2 = new AHAddress(a.ToMemBlock());
TransportAddress ta = TransportAddressFactory.CreateInstance("brunet.tcp://127.0.0.1:5000");
TransportAddress ta2 = TransportAddressFactory.CreateInstance("brunet.tcp://127.0.0.1:5000");
NodeInfo ni = NodeInfo.CreateInstance(a, ta);
NodeInfo ni2 = NodeInfo.CreateInstance(a2, ta2);
Assert.AreSame( ni, ni2, "Reference equality of NodeInfo objects");
}