// GET: api/Map/5
        public IHttpActionResult Get(int id)
        {
            MapRepository mr = new MapRepository();
            var map = mr.GetByContactId(id);

            return Json(map);
        }
Esempio n. 2
0
 /// <summary>Creates an instance for the given language.</summary>
 /// <param name="culture">The culture.</param>
 /// <returns>A repository.</returns>
 public IMapRepository ForCulture(CultureInfo culture)
 {
     Contract.Ensures(Contract.Result<IMapRepository>() != null);
     IMapRepository repository = new MapRepository(this.serviceClient);
     repository.Culture = culture;
     return repository;
 }
Esempio n. 3
0
        public void Init()
        {
            _mapRepository = MapRepository.Instance;
            _personType = typeof(UnmappedPerson);

            InitMappings();
        }
Esempio n. 4
0
        public ActionResult Map()
        {
            var mapRepository = new MapRepository();

            var map = mapRepository.GetById(1);

            return(Json(map, JsonRequestBehavior.AllowGet));
        }
        /// <summary>Creates an instance for the given language.</summary>
        /// <param name="culture">The culture.</param>
        /// <returns>A repository.</returns>
        public IMapRepository ForCulture(CultureInfo culture)
        {
            if (culture == null)
            {
                throw new ArgumentNullException("culture", "Precondition: culture != null");
            }

            IMapRepository repository = new MapRepository(this.serviceClient);
            repository.Culture = culture;
            return repository;
        }
Esempio n. 6
0
        /// <summary>
        /// Get the details of a Glyma node.
        /// </summary>
        /// <param name="repositoryName">The name of the Glyma repository.</param>
        /// <param name="domainId">The GUID of the node's domain.</param>
        /// <param name="rootMapId">The GUID of the node's root map.</param>
        /// <param name="mapId">The GUID of the node's parent map.</param>
        /// <param name="nodeId">The GUID of the node to retrieve details from.</param>
        /// <param name="entityFields">A ITypeDescriptorCollection object that contains the fields to retrieve for each node.</param>
        /// <returns>A DynamicType object containing the details for the node.</returns>
        public DynamicType GetNode(string repositoryName, Guid domainId, Guid rootMapId, Guid mapId, Guid nodeId, ITypeDescriptorCollection entityFields)
        {
            GlymaSearchLogger.WriteTrace(LogCategoryId.Connector, TraceSeverity.Verbose, "GetNode(" + repositoryName + ", " + domainId + ", " + rootMapId + ", " + mapId + ", " + nodeId + ")");

            DynamicType node = null;

            node = MapRepository.GetNode(repositoryName, nodeId, entityFields);
            if (node != null)
            {
                CrawlRules.Apply(node, MapRepository);
            }

            return(node);
        }
Esempio n. 7
0
        public List <RoadMap> GetRoadMaps()
        {
            List <RoadMap> roadMapList = new List <RoadMap>();

            try
            {
                mapRepo     = new MapRepository();
                roadMapList = mapRepo.GetRoadMaps();
            }
            catch (Exception ex)
            {
            }
            return(roadMapList);
        }
Esempio n. 8
0
        //
        // GET: /Map/

        public ActionResult Index(int stationID)
        {
            var           mapRepository = new MapRepository();
            ServiceClient myService     = new ServiceClient();

            myService.ClientCredentials.Windows.ClientCredential.UserName = "******";
            myService.ClientCredentials.Windows.ClientCredential.Password = "******";

            var stations = myService.GetAllStations().Where(s => s.StationID == stationID);

            //   var map = mapRepository.GetById(stationID);
            GoogleMaps.Locations = stations.ToArray();
            ViewBag.Map          = (GoogleMaps.Webpage);
            return(View());
        }
Esempio n. 9
0
        /// <summary>
        /// Get the access control list (ACL) for a node.
        /// </summary>
        /// <param name="repositoryName">The name of the Glyma repository.</param>
        /// <param name="domainId">The GUID of the node's domain.</param>
        /// <param name="rootMapId">The GUID of the node's root map.</param>
        /// <param name="mapId">The GUID of the node's parent map.</param>
        /// <param name="nodeId">The GUID of the node to retrieve details from.</param>
        /// <param name="entityFields">A ITypeDescriptorCollection object that contains the fields to retrieve for each node.</param>
        /// <returns></returns>
        public byte[] GetNodeAcl(string repositoryName, Guid domainId, Guid rootMapId, Guid mapId, Guid nodeId, ITypeDescriptorCollection entityFields)
        {
            GlymaSearchLogger.WriteTrace(LogCategoryId.Connector, TraceSeverity.Verbose, "GetNodeAcl(" + repositoryName + ", " + domainId + ", " + rootMapId + ", " + mapId + ", " + nodeId + ")");

            byte[] nodeAcl = null;

            if (IsSecurityEnabled)
            {
                nodeAcl = SecurityManager.GetNodeAcl(MapRepository.GetDatabaseName(), repositoryName, domainId, rootMapId);
            }
            else
            {
                nodeAcl = SecurityManager.GetAllowAllNodeAcl(repositoryName, domainId, rootMapId);
            }

            return(nodeAcl);
        }
Esempio n. 10
0
        public bool SaveRoadMap(RoadMap roadMap)
        {
            bool isSuccess = false;

            try
            {
                mapRepo = new MapRepository();
                mapRepo.InsertRoadMap(roadMap);
                isSuccess = true;
            }
            catch (Exception ex)
            {
                isSuccess = false;
            }

            return(isSuccess);
        }
Esempio n. 11
0
        /// <summary>
        /// Gets the root map nodes from a Glyma repository.
        /// </summary>
        /// <param name="entityFields">A ITypeDescriptorCollection object that contains the fields to retrieve for each node.</param>
        /// <returns>A collection of DynamicType objects containing details of the nodes retrieved from a Glyma repository.</returns>
        /// <remarks>This is intended to be used as a Finder method in a BCS model.</remarks>
        public List <DynamicType> GetRooMaps(ITypeDescriptorCollection entityFields)
        {
            GlymaSearchLogger.WriteTrace(LogCategoryId.Connector, TraceSeverity.Verbose, "GetRootMaps");

            Uri  startUrl = new Uri(StartAddress);
            Guid domainId = Guid.Empty;

            if (startUrl.Segments.Length == 2)
            {
                domainId = new Guid(startUrl.Segments[1].TrimEnd('/'));
            }

            List <DynamicType> nodes = MapRepository.GetRootMaps(RepositoryName, domainId, entityFields);

            nodes.RemoveAll(node => !CrawlRules.Apply(node, MapRepository));

            return(nodes);
        }
Esempio n. 12
0
        public UnitOfWork(GameStatsDbContext db)
        {
            _db = db;

            Players   = new PlayerRepository(db);
            Servers   = new ServerRepository(db);
            GameModes = new GameModeRepository(db);
            Maps      = new MapRepository(db);
            Matches   = new MatchRepository(db);

            PlayerStatistics = new PlayerStatisticsRepository(db);
            ServerStatistics = new ServerStatisticsRepository(db);

            PlayerServerStats   = new PlayerServerStatsRepository(db);
            PlayerGameModeStats = new PlayerGameModeStatsRepository(db);
            ServerGameModeStats = new ServerGameModeStatsRepository(db);
            ServerMapStats      = new ServerMapStatsRepository(db);

            DatePlayerStats = new DatePlayerStatsRepository(db);
            DateServerStats = new DateServerStatsRepository(db);

            BestPlayers = new BestPlayerRepository(db);
        }