public SampleAppsViewModel() { this.AppBarLeftButtonCommand = new Command(async() => await this.NavigateBack()); this.AppBarRightButtonCommand = new Command(this.NavigateToSearch); this.OpenInStoreCommand = new Command(this.OpenInStore); IConfigurationService configurationService = DependencyService.Get <IConfigurationService>(); SampleApps sampleApps = configurationService.GetSampleAppsConfiguration(); this.DescriptionHeader = sampleApps.DescriptionHeader; this.SampleApps = sampleApps.Apps; this.Title = sampleApps.SampleAppsPageTitle; }
public IActionResult Post(string sampleAppFileName) { if (!ModelState.IsValid) { return(BadRequest()); } var serverPath = this.config.GetOSVRServerDirectory(); if (!SampleApps.RunSampleApp(sampleAppFileName, serverPath)) { return(NotFound()); } return(Content("Sample app run successfully!")); }
public IEnumerable <SampleApp> Get() { var serverPath = this.config.GetOSVRServerDirectory(); return(SampleApps.GetSampleApps(serverPath)); }