public async Task Install() { if (this.State != ApplicationStates.Installable) { throw new InvalidOperationException("Invalid Application State"); } await DialRestService.InstallApplication(this.InstallUrl); }
public async Task Stop() { if (this.State != ApplicationStates.Running) { throw new InvalidOperationException("Invalid Application State"); } await DialRestService.StopApplication(this.InstanceUrl); this.State = ApplicationStates.Stopped; this.RunningResourceName = null; }
public async Task Run(string parameters = null) { if (this.State != ApplicationStates.Stopped) { throw new InvalidOperationException("Invalid Application State"); } var instanceUrl = await DialRestService.RunApplication(new Uri(this.DeviceInfo.ApplicationUrlBase + this.Code), parameters); this.State = ApplicationStates.Running; this.RunningResourceName = instanceUrl.AbsolutePath.Split('/').Last(); }
public async Task <IApplicationInfo> GetApplicationInfo <T>(string applicationCode) where T : ApplicationInfo { return(await DialRestService.GetApplicationInfo <T>(this, applicationCode)); }