public override void CheckoutVersion(EngineRequest request, Data.VersionId version) { CheckInitialization(); Logger.Storage.Debug("Checking out the version '" + version.ToString() + "'"); EngineMethods.CheckoutVersion act = new EngineMethods.CheckoutVersion(request, version); act.Execute(); }
public override void Process() { Remoting.Get rem; TriggerOnActionChanged(EngineActionType.GettingVersion, true); try { rem = new Remoting.Get(_db, _id.ToString(), _sendTimeout, _receiveTimeout, _sendBufferSize, _receiveBufferSize); } catch (Exception e) { Logger.Storage.Error("An exception occurred while instantiating the Transactions.Tasks.Remoting.Get object.", e); throw; } rem.OnComplete += delegate(Remoting.Base sender, ICommandReply reply) { JObject jobj; Transitions.Version txVersion = new Transitions.Version(); Version = txVersion.Transition(((Remoting.Get)sender).Document, out jobj); Remainder = jobj; TriggerOnComplete(reply); }; rem.OnError += delegate(Remoting.Base sender, string message, Exception exception) { TriggerOnError(message, exception); }; rem.OnProgress += delegate(Remoting.Base sender, OpenDMS.Networking.Protocols.Tcp.DirectionType direction, int packetSize, decimal sendPercentComplete, decimal receivePercentComplete) { TriggerOnProgress(direction, packetSize, sendPercentComplete, receivePercentComplete); }; rem.OnTimeout += delegate(Remoting.Base sender) { TriggerOnTimeout(); }; rem.Process(); }
public override void Process() { Remoting.Head rem; try { rem = new Remoting.Head(_db, _versionId.ToString(), _sendTimeout, _receiveTimeout, _sendBufferSize, _receiveBufferSize); } catch (Exception e) { Logger.Storage.Error("An exception occurred while instantiating the Transactions.Tasks.Remoting.Head object.", e); throw; } rem.OnComplete += delegate(Remoting.Base sender, ICommandReply reply) { VersionId = _versionId; Revision = ((Remoting.Head)sender).Rev.Trim(new char[] { '\"' }); TriggerOnComplete(reply); }; rem.OnError += delegate(Remoting.Base sender, string message, Exception exception) { TriggerOnError(message, exception); }; rem.OnProgress += delegate(Remoting.Base sender, OpenDMS.Networking.Protocols.Tcp.DirectionType direction, int packetSize, decimal sendPercentComplete, decimal receivePercentComplete) { TriggerOnProgress(direction, packetSize, sendPercentComplete, receivePercentComplete); }; rem.OnTimeout += delegate(Remoting.Base sender) { TriggerOnTimeout(); }; rem.Process(); }
public static Uri Build(IDatabase db, Data.VersionId versionId) { return(new Uri(db.Uri.ToString() + versionId.ToString())); }