public void StartJobAndTaskSoftCardCred(string nodeName, StartJobAndTaskArg arg, string userName, string password, byte[] certificate, ProcessStartInfo startInfo, NodeCommunicatorCallBack <StartJobAndTaskArg> callback) { this.SendRequest("startjobandtask", this.GetCallbackUri(nodeName, "taskcompleted"), nodeName, async(content, ex) => { await Task.Yield(); callback(nodeName, arg, ex); }, Tuple.Create(arg, startInfo, userName, password, certificate)); }
public async Tasks.Task <string> StartJobAndTaskAsync( string nodeName, StartJobAndTaskArg arg, string userName, string password, ProcessStartInfo startInfo, string privateKey, string publicKey, CancellationToken token) { return(await this.SendRequestAsync("startjobandtask", this.GetCallbackUri(nodeName, "taskcompleted"), nodeName, Tuple.Create(arg, startInfo, userName, password, privateKey, publicKey), 0, token)); }
public void StartJobAndTask(string nodeName, StartJobAndTaskArg arg, string userName, string password, ProcessStartInfo startInfo, NodeCommunicatorCallBack <StartJobAndTaskArg> callback) { if (IsAdmin(userName, password)) { startInfo.EnvironmentVariables["CCP_ISADMIN"] = "1"; } this.SendRequest("startjobandtask", this.GetCallbackUri(nodeName, "taskcompleted"), nodeName, async(content, ex) => { await Task.Yield(); callback(nodeName, arg, ex); }, Tuple.Create(arg, startInfo, userName, password)); }
public async Task StartJobAndTaskAsync(string nodeName, StartJobAndTaskArg arg, string userName, string password, ProcessStartInfo startInfo, CancellationToken token) { if (IsAdmin(userName, password)) { startInfo.environmentVariables[Constants.CcpAdminEnv] = "1"; } await this.SendRequestAsync("startjobandtask", this.GetCallbackUri(nodeName, "taskcompleted"), nodeName, Tuple.Create(arg, startInfo, userName, password, "", ""), 0, token); }
public void StartJobAndTaskExtendedData(string nodeName, StartJobAndTaskArg arg, string userName, string password, string extendedData, ProcessStartInfo startInfo, NodeCommunicatorCallBack <StartJobAndTaskArg> callback) { string privateKey = null, publicKey = null; if (extendedData != null) { try { XDocument xDoc = XDocument.Parse(extendedData); var privateKeyNode = xDoc.Descendants("PrivateKey").FirstOrDefault(); var publicKeyNode = xDoc.Descendants("PublicKey").FirstOrDefault(); if (privateKeyNode != null) { privateKey = privateKeyNode.Value; } if (publicKeyNode != null) { publicKey = publicKeyNode.Value; } } catch (Exception ex) { this.Tracer.TraceWarning("Error parsing extended data {0}, ex {1}", extendedData, ex); } } if (IsAdmin(userName, password)) { startInfo.EnvironmentVariables["CCP_ISADMIN"] = "1"; } this.SendRequest("startjobandtask", this.GetCallbackUri(nodeName, "taskcompleted"), nodeName, async(content, ex) => { await Task.Yield(); callback(nodeName, arg, ex); }, Tuple.Create(arg, startInfo, userName, password, privateKey, publicKey)); }