/// <summary> /// Get the conflict item /// </summary> /// <returns>Conflict item</returns> public virtual Conflict GetConflict() { if (!HasConflict()) { return(null); } Conflict conflict = null; if (_currentEntryWrapper.IsConflict) { conflict = new SyncConflict() { LiveEntity = _liveEntity, LosingEntity = ReflectionUtility.GetObjectForType(_currentEntryWrapper.ConflictWrapper, this._knownTypes), Resolution = (SyncConflictResolution)Enum.Parse(FormatterConstants.SyncConflictResolutionType, _currentEntryWrapper.ConflictDesc, true) }; } else { conflict = new SyncError() { LiveEntity = _liveEntity, ErrorEntity = ReflectionUtility.GetObjectForType(_currentEntryWrapper.ConflictWrapper, this._knownTypes), Description = _currentEntryWrapper.ConflictDesc }; } return(conflict); }
/// <summary> /// Returns the current entry element casted as an IOfflineEntity element /// </summary> /// <returns>Typed entry element</returns> public override IOfflineEntity GetItem() { CheckItemType(ReaderItemType.Entry); // Get the type name and the list of properties. _currentEntryWrapper = new AtomEntryInfoWrapper((XElement)XElement.ReadFrom(_reader)); _liveEntity = ReflectionUtility.GetObjectForType(_currentEntryWrapper, this._knownTypes); return(_liveEntity); }