static void Main(string[] args) { DateTimeAggregate tarih = new DateTimeAggregate(); tarih.StartDate = new DateTime(2020, 04, 01); tarih.EndDate = DateTime.Now; IIterator iterator = tarih.CreateIterator(); while (iterator.HasDate()) { Console.WriteLine(iterator.CurrentDate()); } Console.Read(); }
public DateTimeIterator(DateTimeAggregate aggregate) { this._aggregate = aggregate; _currentDate = aggregate.StartDate; }