Example #1
0
        private void updateAvailableVehicles()
        {
            ConcurrentDictionary <int, ClientVehicleDTO> res = new ConcurrentDictionary <int, ClientVehicleDTO>();
            GetObjectListRequest request = new GetObjectListRequest()
            {
                ClientId            = _connectionService.ClientId,
                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);

            var returnVehicleList = new List <Vehicle>();

            foreach (var vehicles in response.Objects)
            {
                res.TryAdd(vehicles.Vehicle.Id, new ClientVehicleDTO()
                {
                    VehicleId  = vehicles.Vehicle.Id,
                    Name       = vehicles.Vehicle.Name,
                    TailNumber = vehicles.Vehicle.SerialNumber
                });
            }
            _vehicles = res;
        }
Example #2
0
        public bool HasVideoPlayerPermission()
        {
            GetLicenseRequest request = new GetLicenseRequest
            {
                ClientId = _connectionService.ClientId
            };

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

            return(response.LicensePermissions.UgcsVideoPlayer);
        }