Exemplo n.º 1
0
        public Task <EntityIdWithVersion <Uri, string> > Update(Uri entityId, vCard entityToUpdate, Func <vCard, vCard> entityModifier)
        {
            using (AutomaticStopwatch.StartDebug(s_logger))
            {
                vCard newVcard = new vCard();
                newVcard.UniqueId = entityToUpdate.UniqueId;
                newVcard          = entityModifier(newVcard);

                return(_cardDavDataAccess.UpdateEntity(entityId, Serialize(newVcard)));
            }
        }
Exemplo n.º 2
0
        public Task <EntityVersion <Uri, string> > Update(
            Uri entityId,
            string entityVersion,
            vCard entityToUpdate,
            Func <vCard, vCard> entityModifier)
        {
            using (AutomaticStopwatch.StartDebug(s_logger))
            {
                vCard newVcard = new vCard();
                newVcard.UniqueId = (!string.IsNullOrEmpty(entityToUpdate.UniqueId)) ? entityToUpdate.UniqueId : Guid.NewGuid().ToString();
                newVcard          = entityModifier(newVcard);

                return(_cardDavDataAccess.UpdateEntity(entityId, entityVersion, Serialize(newVcard)));
            }
        }