Exemplo n.º 1
0
        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));
        }
    public static string SyncCalDavToOutlookAndBackToCalDav (string eventData)
    {
      var entityRelationStorage = new InMemoryEntityRelationStorage<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);
    }