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;
        }
예제 #2
0
        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!"));
        }
예제 #3
0
        public IEnumerable <SampleApp> Get()
        {
            var serverPath = this.config.GetOSVRServerDirectory();

            return(SampleApps.GetSampleApps(serverPath));
        }