本文整理汇总了C#中IIterator类的典型用法代码示例。如果您正苦于以下问题:C# IIterator类的具体用法?C# IIterator怎么用?C# IIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IIterator类属于命名空间,在下文中一共展示了IIterator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PrintUsers
private static void PrintUsers(IIterator iterate)
{
while (!iterate.IsDone())
{
Console.WriteLine(iterate.Next());
}
}
示例2: IteratorPrinter
private void IteratorPrinter(IIterator iterator)
{
while (iterator.HasNext())
{
var menuItem = (MenuItem) iterator.Next();
Console.WriteLine(String.Format("Name={0} Description={1} Vege?={2} Price={3}", menuItem.Name, menuItem.Description, menuItem.Vegetarian, menuItem.Price));
}
}
示例3: printMenu
//public static void Main()
//{
// PancakeHouseMenu pancakeHouseMenu = new PancakeHouseMenu();
// DinerMenu dinerMenu = new DinerMenu();
// IIterator pancakeIterator = pancakeHouseMenu.createIterator();
// IIterator dinerIterator = dinerMenu.createIterator();
// Console.WriteLine("\nMenu (with iterators)\n----\nBREAKFAST");
// printMenu(pancakeIterator);
// Console.WriteLine("\nLunch");
// printMenu(dinerIterator);
// Console.ReadKey();
//}
private static void printMenu(IIterator iterator)
{
while (iterator.hasNext())
{
string menuItem = (string)iterator.next();
Console.WriteLine(menuItem);
}
}
示例4: PrintUsers
public static void PrintUsers(IIterator iterate)
{
iterate.First();
while (!iterate.IsDone())
{
Console.WriteLine(iterate.Next());
}
}
示例5: printMember
public void printMember(IIterator iterate)
{
iterate.First();
while (!iterate.IsDone())
{
//textBox.AppendText("Friend");
}
}
示例6: PrintMenu
private void PrintMenu(IIterator iterator)
{
while (iterator.hasNext())
{
MenuItem menuItem = (MenuItem)iterator.next();
Response.Write(menuItem.name + "<br/>");
}
}
示例7: printMenu
public void printMenu(IIterator iterator)
{
while (iterator.hasNext())
{
MenuItem menuItem = (MenuItem)iterator.next();
Console.Write(menuItem.getName() + ", ");
Console.Write(menuItem.getPrice() + " == ");
Console.WriteLine(menuItem.getDescription());
}
}
示例8: DbIterator
public DbIterator(StorageState storageContext, IIterator iterator, ulong sequence)
{
this.iterator = iterator;
this.sequence = sequence;
this.storageContext = storageContext;
direction = Direction.Forward;
IsValid = false;
}
示例9: MergingIterator
public MergingIterator(IComparator comparator, IList<IIterator> children)
{
if (children == null)
throw new ArgumentNullException("children");
this.comparator = comparator;
this.children = children;
direction = Direction.Forward;
current = null;
}
示例10: TwoLevelIterator
public TwoLevelIterator(
IIterator indexIterator,
Func<ReadOptions, BlockHandle, IIterator> getIterator,
ReadOptions readOptions
)
{
_indexIterator = indexIterator;
_readOptions = readOptions;
this.getIterator = getIterator;
}
示例11: PrintMenu
private void PrintMenu(IIterator iterator)
{
while (iterator.HasNext())
{
MenuItem menuItem = (MenuItem) iterator.Next();
Console.Write(menuItem.Name + ", ");
Console.Write(menuItem.Price + " -- ");
Console.WriteLine(menuItem.Description);
}
}
示例12: Recover
public override void Recover()
{
arrayIterator = null;
indexArray = new ArrayList();
status = new InsertSortStatus(this.r);
base.Recover();
}
示例13: AlbumView
public AlbumView(PhotoAlbum m_selectedAlbum)
{
InitializeComponent();
m_album = m_selectedAlbum;
m_albumIterator = m_selectedAlbum.Iterator;
updateImageAndIndexIndicator();
}
示例14: ActiveWorkbenchWindow_CloseEvent
public override void ActiveWorkbenchWindow_CloseEvent(object sender, EventArgs e)
{
arrayIterator = null;
base.ActiveWorkbenchWindow_CloseEvent(sender,e);
}
示例15: Recover
public override void Recover()
{
arrayIterator = null;
nullIterator = null;
status = new SeqSearchStatus(r,key);
base.Recover();
}