public async Task Delete() { if (_app != null) { await _app.Delete(); _app = null; } }
void MarkAppAsInUse(BaseApp app) { lock (_inUseFileLock) { JObject appsInUse = GetInUseAppNames(); appsInUse[app.Name] = true; File.WriteAllText(InUseFilePath, JsonConvert.SerializeObject(appsInUse)); } }
public async Task <dynamic> Run(Language language, JObject requestBody) { if (_app == null) { _app = _appManager.GetAppFor(language); if (language == Language.Ruby) { var linuxApp = _app as LinuxApp; await linuxApp.UploadUserCode(_zipPackagePath); } else { var windowsApp = _app as WindowsApp; await windowsApp.UploadUserCode(_zipPackagePath); } } var json = await _app.SendRequest(new { functionBody = requestBody }); return(json.functionBody); }