本文整理汇总了C#中Ice.GetEnumerator方法的典型用法代码示例。如果您正苦于以下问题:C# Ice.GetEnumerator方法的具体用法?C# Ice.GetEnumerator怎么用?C# Ice.GetEnumerator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ice
的用法示例。
在下文中一共展示了Ice.GetEnumerator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ice_response
public override void ice_response(Ice.Object[] r, Ice.Object[] o)
{
System.Collections.IEnumerator eo = o.GetEnumerator();
System.Collections.IEnumerator er = r.GetEnumerator();
foreach(CV obj in _i)
{
eo.MoveNext();
er.MoveNext();
test(obj.i == ((CV)eo.Current).i);
test(obj.i == ((CV)er.Current).i);
}
callback.called();
}
示例2: WriteDictionary
public virtual void WriteDictionary (Ice.Dictionary dict) {
WriteSize (dict.Count);
IDictionaryEnumerator iter = dict.GetEnumerator();
while (iter.MoveNext()) {
// FIXME -- these checks are expensive
if (iter.Key.GetType() != dict.IceDictInfo.keyType)
throw new InvalidOperationException ("Dictionary contains key with type " + iter.Key + " but keyType is " + dict.IceDictInfo.keyType);
if (iter.Value.GetType() != dict.IceDictInfo.valueType)
throw new InvalidOperationException ("Dictionary contains value with type " + iter.Value + " but valueType is " + dict.IceDictInfo.valueType);
WriteObject (iter.Key, dict.IceDictInfo.keyType);
WriteObject (iter.Value, dict.IceDictInfo.valueType);
}
}