static public Event Create(iCalendar iCal) { Event evt = (Event)iCal.Create(iCal, "VEVENT"); evt.UID = UniqueComponent.NewUID(); return(evt); }
static public Journal Create(iCalendar iCal) { Journal j = (Journal)iCal.Create(iCal, "VJOURNAL"); j.UID = UniqueComponent.NewUID(); return(j); }
static public Todo Create(iCalendar iCal) { Todo t = (Todo)iCal.Create(iCal, "VTODO"); t.UID = UniqueComponent.NewUID(); return(t); }
static public Event Create(iCalendar iCal) { Event evt = new Event(iCal); evt.UID = UniqueComponent.NewUID(); return(evt); }
static public Todo Create(iCalendar iCal) { Todo t = new Todo(iCal); t.UID = UniqueComponent.NewUID(); return(t); }
static public Journal Create(iCalendar iCal) { Journal j = new Journal(iCal); j.UID = UniqueComponent.NewUID(); return(j); }
static public Event Create(iCalendar iCal) { Event evt = (Event)iCal.Create(iCal, "VEVENT"); evt.UID = UniqueComponent.NewUID(); evt.Created = DateTime.Now; evt.DTStamp = DateTime.Now; return(evt); }
static public Journal Create(iCalendar iCal) { Journal j = (Journal)iCal.Create(iCal, "VJOURNAL"); j.UID = UniqueComponent.NewUID(); j.Created = DateTime.Now; j.DTStamp = DateTime.Now; return(j); }
static public Todo Create(iCalendar iCal) { Todo t = iCal.Create <Todo>(); t.UID = UniqueComponent.NewUID(); t.Created = DateTime.Now; t.DTStamp = DateTime.Now; return(t); }
/// <summary> /// Re-links the UID dictionary to the actual components in our list. /// Also, if any items do not have a UID assigned to them, they will /// automatically have a UID assigned. /// </summary> public void ResolveUIDs() { m_Dictionary.Clear(); foreach (T item in m_Components) { if ((item as UniqueComponent).UID == null) { (item as UniqueComponent).UID = UniqueComponent.NewUID(); } m_Dictionary[(item as UniqueComponent).UID] = item; } }
public override void CreateInitialize() { base.CreateInitialize(); // Create a new UID for the component UID = UniqueComponent.NewUID(); // Here, we don't simply set to DateTime.Now because DateTime.Now contains milliseconds, and // the iCalendar standard doesn't care at all about milliseconds. Therefore, when comparing // two calendars, one generated, and one loaded from file, they may be functionally identical, // but be determined to be different due to millisecond differences. Created = new Date_Time(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second); DTStamp = Created.Copy(); }
public void Add(T item) { if (!m_Components.Contains(item)) { m_Components.Add(item); UniqueComponent uc = item as UniqueComponent; uc.UIDChanged += new UniqueComponent.UIDChangedEventHandler(UIDChangedHandler); if (uc.UID != null) { m_Dictionary[uc.UID] = item; } } }
public UniqueComponentSerializer(UniqueComponent uc) : base(uc) { }