public override void Process() { Remoting.Get rem; TriggerOnActionChanged(EngineActionType.GettingResource, 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.Resource txResource = new Transitions.Resource(); Resource = txResource.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.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.Get rem; TriggerOnActionChanged(EngineActionType.Searching, true); string query = System.Text.Encoding.UTF8.GetString(System.Text.Encoding.ASCII.GetBytes(_args.Query.ToString())); try { rem = new Remoting.Get(_db, "_fti/_design/search/main?q=" + query, _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) { Document = ((Commands.GetDocumentReply)reply).Document; 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.Get rem; TriggerOnActionChanged(EngineActionType.GettingGlobalUsageRights, true); try { rem = new Remoting.Get(_db, new GlobalUsageRights(null, null).Id, _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) { Transitions.GlobalUsageRights txGur = new Transitions.GlobalUsageRights(); GlobalUsageRights = (GlobalUsageRights)txGur.Transition(((Remoting.Get)sender).Document); 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(); }