public static string SyncOutlookToCalDav_EventsExistsInCalDav(string existingEventData, string existingAppointmentId) { var entityRelationStorage = new InMemoryEntityRelationStorage <string, DateTime, IEntityRelationData <string, DateTime, WebResourceName, string>, WebResourceName, string>(); entityRelationStorage.SaveEntityRelationData(new List <IEntityRelationData <string, DateTime, WebResourceName, string> >() { new OutlookEventRelationData() { AtypeId = existingAppointmentId, AtypeVersion = new DateTime(1), BtypeId = new WebResourceName("/e1"), BtypeVersion = "v1" } }); return(SyncOutlookToCalDav_EventsExistsInCalDav(existingEventData, entityRelationStorage)); }
public static string SyncCalDavToOutlookAndBackToCalDav(string eventData) { var entityRelationStorage = new InMemoryEntityRelationStorage <string, DateTime, IEntityRelationData <string, DateTime, WebResourceName, string>, WebResourceName, string>(); SyncCalDavToOutlook(eventData, entityRelationStorage); var relation = entityRelationStorage.LoadEntityRelationData().First(); var newRelation = new OutlookEventRelationData() { AtypeId = relation.AtypeId, AtypeVersion = relation.AtypeVersion.AddHours(-1), BtypeId = relation.BtypeId, BtypeVersion = relation.BtypeVersion }; entityRelationStorage.SaveEntityRelationData(new List <IEntityRelationData <string, DateTime, WebResourceName, string> >() { newRelation }); return(SyncOutlookToCalDav_EventsExistsInCalDav(eventData, entityRelationStorage)); }