Esempio n. 1
0
        private void updateAvailableVehicles()
        {
            ConcurrentDictionary <int, ClientVehicleDto> res = new ConcurrentDictionary <int, ClientVehicleDto>();
            GetObjectListRequest request = new GetObjectListRequest()
            {
                ClientId            = _connectionService.GetClientId(),
                ObjectType          = INVARIANT_ENTITY_NAME,
                RefreshDependencies = true,
            };

            request.RefreshExcludes.Add("PayloadProfile");
            request.RefreshExcludes.Add("Route");
            request.RefreshExcludes.Add("Mission");
            request.RefreshExcludes.Add("Platform");

            var response = _connectionService.Execute <GetObjectListResponse>(request);

            foreach (var vehicles in response.Objects)
            {
                res.TryAdd(vehicles.Vehicle.Id, new ClientVehicleDto()
                {
                    VehicleId = vehicles.Vehicle.Id,
                    Name      = vehicles.Vehicle.Name
                });
            }
            Vehicles = res;
        }
        public bool HasVideoPlayerPermission()
        {
            GetLicenseRequest request = new GetLicenseRequest
            {
                ClientId = _connectionService.GetClientId()
            };

            GetLicenseResponse response = _connectionService.Execute <GetLicenseResponse>(request);

            return(response.LicensePermissions.UgcsVideoPlayer);
        }