/// <summary> /// Generate Data /// </summary> /// <returns></returns> private SPCalendarItemCollection DataSource() { SPCalendarItemCollection items = new SPCalendarItemCollection(); Array.Sort(Items); foreach (SPSCalendarItem item in Items) { SPCalendarItem calItem = new SPCalendarItem { CalendarType = item.CalendarType, StartDate = item.StartDate, EndDate = item.EndDate, IsAllDayEvent = item.IsAllDayEvent, Title = item.Title, Description = item.Description, Location = item.Location, IsRecurrence = item.IsRecurrence, DisplayFormUrl = item.DisplayFormUrl, ItemID = item.ItemID, }; if (item.BackgroundColorClassName != null) { calItem.BackgroundColorClassName = item.BackgroundColorClassName; } #if (DEBUG) XmlSerializer s = new XmlSerializer(typeof(SPSCalendarItem)); StringWriter sw = new StringWriter(); s.Serialize(sw, item); Debug.WriteLine("*" + sw); sw.Close(); #endif items.Add(calItem); } #if (DEBUG) foreach (SPCalendarItem item in items) { SPSDebug.DumpObject(item); } //SPCalendarItem calItem1 = new SPCalendarItem // { // StartDate = new DateTime(2009, 1, 14, 11, 00, 00), // EndDate = new DateTime(2009, 1, 21, 11, 00, 00), // Title = "TEST" // }; //items.Add(calItem1); #endif return(items); }
public void Dummy() { SPSDebug.DumpException(new ArgumentNullException()); SPSDebug.DumpException("Null", new InvalidOperationException()); Assert.IsTrue(true); }