public static string SyncOutlookToCalDav_EventsExistsInCalDav(string existingEventData, string existingAppointmentId) { var entityRelationStorage = new EntityRelationStorage <string, DateTime, IEntityRelationData <string, DateTime, Uri, string>, Uri, string>(); entityRelationStorage.SaveEntityRelationData(new List <IEntityRelationData <string, DateTime, Uri, string> >() { new OutlookEventRelationData() { AtypeId = existingAppointmentId, AtypeVersion = new DateTime(1), BtypeId = new Uri("/e1", UriKind.Relative), BtypeVersion = "v1" } }); return(SyncOutlookToCalDav_EventsExistsInCalDav(existingEventData, entityRelationStorage)); }
public static string SyncCalDavToOutlookAndBackToCalDav(string eventData) { var entityRelationStorage = new EntityRelationStorage <string, DateTime, IEntityRelationData <string, DateTime, Uri, string>, Uri, 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, Uri, string> >() { newRelation }); return(SyncOutlookToCalDav_EventsExistsInCalDav(eventData, entityRelationStorage)); }