本文整理汇总了C#中IIterator类的典型用法代码示例。如果您正苦于以下问题:C# IIterator类的具体用法?C# IIterator怎么用?C# IIterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IIterator类属于命名空间,在下文中一共展示了IIterator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: Set
public void Set(IIterator<string> currentArgument)
{
try
{
_value = currentArgument.Next();
}
catch (InvalidOperationException)
{
throw new ArgsException(ErrorCode.MissingString);
}
}
开发者ID:Pvlerick,项目名称:CommandLineArgumentParser,代码行数:11,代码来源:StringArgumentMarshaler.cs
示例13: IEnumeratorAdapter
public IEnumeratorAdapter(IIterator enume)
{
if (enume != null)
{
this.enume = enume;
if (enume.HasNext())
{
this.current = enume.Next();
}
}
}
开发者ID:207h2Flogintvg,项目名称:LGame,代码行数:11,代码来源:JavaListInterface.cs
示例14: PrintMenu
public String PrintMenu(IIterator iterator)
{
StringBuilder sb = new StringBuilder();
while (iterator.HasNext()) {
MenuItem menuItem = (MenuItem)iterator.Next();
sb.Append(menuItem.Name + ", ");
sb.Append(menuItem.Price + " -- ");
sb.Append(menuItem.Description + "\n");
}
return sb.ToString();
}
开发者ID:vmp,项目名称:CSharpExamples,代码行数:12,代码来源:Waitress.cs
示例15: Recover
public override void Recover()
{
arrayIterator = null;
indexArray = new ArrayList();
status = new InsertSortStatus(this.r);
base.Recover();
}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:7,代码来源:InsertSort.cs
示例16: AlbumView
public AlbumView(PhotoAlbum m_selectedAlbum)
{
InitializeComponent();
m_album = m_selectedAlbum;
m_albumIterator = m_selectedAlbum.Iterator;
updateImageAndIndexIndicator();
}
开发者ID:aviadhahami,项目名称:HomeWorkThirdYearFirstSemester,代码行数:7,代码来源:AlbumView.xaml.cs
示例17: ActiveWorkbenchWindow_CloseEvent
public override void ActiveWorkbenchWindow_CloseEvent(object sender, EventArgs e)
{
arrayIterator = null;
base.ActiveWorkbenchWindow_CloseEvent(sender,e);
}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:7,代码来源:SequenceDelete.cs
示例18: Recover
public override void Recover()
{
arrayIterator = null;
nullIterator = null;
status = new SeqSearchStatus(r,key);
base.Recover();
}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:7,代码来源:SeqSearch.cs
示例19: Recover
public override void Recover()
{
arrayIterator = null;
nullIterator = null;
indexArray = new ArrayList();
status = new BinSearchStatus(r,key);
base.Recover();
}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:8,代码来源:BinSearch.cs
示例20: ActiveWorkbenchWindow_CloseEvent
public override void ActiveWorkbenchWindow_CloseEvent(object sender, EventArgs e)
{
arrayIterator = null;
nullIteratorI = null;
nullIteratorJ = null;
indexArray = new ArrayList();
base.ActiveWorkbenchWindow_CloseEvent(sender,e);
}
开发者ID:tangxuehua,项目名称:DataStructure,代码行数:9,代码来源:OneQuickPass.cs
注:本文中的IIterator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论