public void DoExecute(RmtClientRequestCmd cmd, Params bioParams) { if (bioParams != null) this.BioParams = bioParams; if (this.BioParams == null) this.BioParams = new Params(); try { switch (cmd) { case RmtClientRequestCmd.Run: { // запусить this._run(); this.Context.Response.Write(new BioResponse { Success = true, BioParams = this.BioParams, RmtStatePacket = this.getCurrentStatePack() }.Encode()); } break; case RmtClientRequestCmd.GetState: { // проверить состояния var rspns = new BioResponse { Success = true, BioParams = this.BioParams, RmtStatePacket = this.getCurrentStatePack() }; this.Context.Response.Write(rspns.Encode()); } break; case RmtClientRequestCmd.Break: { // остановить var vRptInst = this.Instance; if (vRptInst != null) { vRptInst.Abort(null); } this.Context.Response.Write(new BioResponse { Success = true, BioParams = this.BioParams }.Encode()); } break; case RmtClientRequestCmd.GetResult: { // отдать результат this._sendFileToClient(); } break; case RmtClientRequestCmd.Kill: { var vRptInst = this.Instance; if (vRptInst != null) { this.removeInstance(); } } break; } } catch(Exception ex) { var ebioex = EBioException.CreateIfNotEBio(ex); this.Context.Response.Write(new BioResponse { Success = false, BioParams = this.BioParams, Ex = ebioex }.Encode()); } }
internal override RmtClientRequest createRequest(RmtClientRequestCmd cmd, Params bioParams, Boolean silent, AjaxRequestDelegate callback) { var rslt = this.creRequestOfClient<DSFetchClientRequest>(cmd, bioParams, silent, callback); rslt.ExecBioCode = this.ExecBioCode; return rslt; }
internal override RmtClientRequest createRequest(RmtClientRequestCmd cmd, Params bioParams, Boolean silent, AjaxRequestDelegate callback) { var rslt = this.creRequestOfClient<LongOpClientRequest>(cmd, bioParams, silent, callback); rslt.Pipe = this.PipeName; rslt.SessionUID = this.SessionUID; return rslt; }