public virtual void Close() { if (RealObjectServer != null) { RealObjectServer.Close(); } }
public virtual ITransaction CycleTransaction(bool commit = true) { if (RealObjectServer == null) { throw new InvalidOperationException("ObjectServer not initialized. RealObjectServer is null."); } if (_inCycleTransaction) { throw new SopException("Sop.ObjectServer CycleTransaction is already ongoing, 'making another call fails."); } lock (this) { if (_inCycleTransaction) { throw new SopException("Sop.ObjectServer CycleTransaction is already ongoing, 'making another call fails."); } _inCycleTransaction = true; var t = RealObjectServer.CycleTransaction(commit); if (t != null && ((Sop.Transaction.Transaction)t).Server != RealObjectServer) { RealObjectServer = ((Sop.Transaction.Transaction)t).Server; } _inCycleTransaction = false; return(t); } }
/// <summary> /// Begin a new Transaction. /// </summary> /// <returns></returns> public virtual Sop.ITransaction BeginTransaction() { if (RealObjectServer == null) { throw new InvalidOperationException("ObjectServer not initialized. RealObjectServer is null."); } return(RealObjectServer.BeginTransaction()); }
public virtual void Flush() { if (RealObjectServer == null) { throw new InvalidOperationException("ObjectServer not initialized. RealObjectServer is null."); } RealObjectServer.Flush(); }
public virtual IFile GetFile(string name) { if (RealObjectServer == null) { throw new InvalidOperationException("ObjectServer not initialized. RealObjectServer is null."); } return(RealObjectServer.GetFile(name)); }
public virtual void Dispose() { if (RealObjectServer != null) { RealObjectServer.Dispose(); StoreFactory.RemoveServerStoresInMru(RealObjectServer); RealObjectServer = null; } }
/// <summary> /// Rollback the Transaction /// </summary> public virtual void Rollback() { if (RealObjectServer == null) { throw new InvalidOperationException("ObjectServer not initialized. RealObjectServer is null."); } lock (this) { RealObjectServer.Rollback(); } }