当前位置: 首页>>代码示例>>C#>>正文


C# IIterator类代码示例

本文整理汇总了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());
     }
 }
开发者ID:muriloxk,项目名称:csharp-designpatterns-estudo,代码行数:7,代码来源:Program.cs

示例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));
     }
 }
开发者ID:param2000,项目名称:HeadFirstDesignPattern,代码行数:8,代码来源:NewWaitressWithIterator.cs

示例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);
     }
 }
开发者ID:brian-smith723,项目名称:DesignPatterns,代码行数:20,代码来源:Cafe.cs

示例4: PrintUsers

 public static void PrintUsers(IIterator iterate)
 {
     iterate.First();
     while (!iterate.IsDone())
     {
         Console.WriteLine(iterate.Next());
     }
 }
开发者ID:Karenzuniga,项目名称:pddcsharp,代码行数:8,代码来源:Program.cs

示例5: printMember

 public void printMember(IIterator iterate)
 {
     iterate.First();
     while (!iterate.IsDone())
     {
         //textBox.AppendText("Friend");
     }
 }
开发者ID:userWayneCampbell,项目名称:Design-Patterns-ONU,代码行数:8,代码来源:Form1.cs

示例6: PrintMenu

 private void PrintMenu(IIterator iterator)
 {
     while (iterator.hasNext())
     {
         MenuItem menuItem = (MenuItem)iterator.next();
         Response.Write(menuItem.name + "<br/>");
     }
 }
开发者ID:Lonka,项目名称:Design-Patterns-,代码行数:8,代码来源:IteratorTest.aspx.cs

示例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());
     }
 }
开发者ID:tonyriddle,项目名称:HeadFirstPatterns,代码行数:10,代码来源:Waitress.cs

示例8: DbIterator

		public DbIterator(StorageState storageContext, IIterator iterator, ulong sequence)
		{
			this.iterator = iterator;
			this.sequence = sequence;
			this.storageContext = storageContext;

			direction = Direction.Forward;

			IsValid = false;
		}
开发者ID:mattwarren,项目名称:temp.raven.storage,代码行数:10,代码来源:DbIterator.cs

示例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;
		}
开发者ID:mattwarren,项目名称:temp.raven.storage,代码行数:10,代码来源:MergingIterator.cs

示例10: TwoLevelIterator

		public TwoLevelIterator(
			IIterator indexIterator,
			Func<ReadOptions, BlockHandle, IIterator> getIterator,
			ReadOptions readOptions
		)
		{
			_indexIterator = indexIterator;
			_readOptions = readOptions;
			this.getIterator = getIterator;
		}
开发者ID:mattwarren,项目名称:temp.raven.storage,代码行数:10,代码来源:TwoLevelIterator.cs

示例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);
     }
 }
开发者ID:pavelanikhimovski,项目名称:design-patterns,代码行数:10,代码来源:Waitress.cs

示例12: Recover

		public override void Recover()
		{
			arrayIterator = null;
			indexArray = new ArrayList();
			status = new InsertSortStatus(this.r);
			base.Recover();
		}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:7,代码来源:InsertSort.cs

示例13: AlbumView

 public AlbumView(PhotoAlbum m_selectedAlbum)
 {
     InitializeComponent();
     m_album = m_selectedAlbum;
     m_albumIterator = m_selectedAlbum.Iterator;
     updateImageAndIndexIndicator();
 }
开发者ID:aviadhahami,项目名称:HomeWorkThirdYearFirstSemester,代码行数:7,代码来源:AlbumView.xaml.cs

示例14: ActiveWorkbenchWindow_CloseEvent

		public override void ActiveWorkbenchWindow_CloseEvent(object sender, EventArgs e) 
		{
			arrayIterator = null;

			base.ActiveWorkbenchWindow_CloseEvent(sender,e);

		}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:7,代码来源:SequenceDelete.cs

示例15: Recover

		public override void Recover()
		{
			arrayIterator = null;
			nullIterator = null;
			status = new SeqSearchStatus(r,key);
			base.Recover();
		}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:7,代码来源:SeqSearch.cs


注:本文中的IIterator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。