public DbvItem Checkout(string itemPath, int revision) { var searchItem = new DbvItem() {Name = itemPath}; return _itemStore.Where(item => revision == 0 || item.Revision <= revision) .LastOrDefault(item => _cmp.Equals(searchItem, item)); }
private DbvItem FilterDeleted(DbvItem item) { if (item != null && !IsDeleted(item)) { return(item); } return(null); }
public DbvItem Checkout(string itemPath, int revision) { var searchItem = new DbvItem() { Name = itemPath }; return (_itemStore.Where(item => revision == 0 || item.Revision <= revision) .LastOrDefault(item => _cmp.Equals(searchItem, item))); }
public int Checkin(string itemPath, byte[] content, string comment, string author) { var item = new DbvItem() { Name = itemPath, Comments = comment, Author = author, Deleted = 'N', Content = content, Timestamp = DateTime.Now, }; return(Checkin(item)); }
public int Remove(string itemPath, string comment, string author) { var item = Checkout(itemPath); if (item != null) { var deletedRecord = new DbvItem() { Name = item.Name, Comments = comment, Author = author, Content = null, Deleted = 'Y', Timestamp = DateTime.Now, }; return(Checkin(deletedRecord)); } return(-1); }
private int Checkin(DbvItem item) { return(_revisionStore.Checkin(item)); }
public int Checkin(DbvItem item) { _itemStore.Add(item); item.Revision = _itemStore.Count; return(_itemStore.Count); }
public int Checkin(DbvItem item) { _itemStore.Add(item); item.Revision = _itemStore.Count; return _itemStore.Count; }