public override async Task <IResponseMessage> Process(AgentUpdateRequest requestMessage) { var updatePath = Path.Combine(Configuration.Directory, "Updates"); var msiFilename = Path.Combine(updatePath, "Photon.Agent.msi"); PathEx.CreatePath(updatePath); if (File.Exists(msiFilename)) { File.Delete(msiFilename); } File.Move(requestMessage.Filename, msiFilename); var _ = Task.Delay(100) .ContinueWith(async t => { await BeginInstall(updatePath, msiFilename); }); //BeginInstall(updatePath, msiFilename); var response = new AgentUpdateResponse(); return(await Task.FromResult(response)); }
public override async Task <IResponseMessage> Process(AgentUpdateRequest requestMessage) { var updatePath = Path.Combine(Configuration.Directory, "Updates"); var msiFilename = Path.Combine(updatePath, "Photon.Agent.msi"); if (!Directory.Exists(updatePath)) { Directory.CreateDirectory(updatePath); } if (File.Exists(msiFilename)) { File.Delete(msiFilename); } File.Move(requestMessage.Filename, msiFilename); BeginInstall(updatePath, msiFilename); var response = new AgentUpdateResponse(); return(await Task.FromResult(response)); }