Beispiel #1
0
        /// <summary>
        /// Creates a site graph based on a given URI.
        /// </summary>
        /// <param name="uri"></param>
        /// <returns></returns>
        public bool CreateSiteGraph(String uri)
        {
            if (string.IsNullOrEmpty(uri) || Uri.IsWellFormedUriString(uri, UriKind.RelativeOrAbsolute))
            {
                return false;
            }

            var sg = new SiteGraph(uri);

            _logger.Info(String.Format("Creted: {0}", sg.GetKey()));

            _webGraphs.Add(sg.GetKey(), sg);

            sg.SiteCreationComplete += (g, e) => _logger.Info(string.Format("{0}->is now loaded!", g.GetKey()));

            return true;
        }
Beispiel #2
0
        public bool CreateSiteGraph(String key, String uri)
        {
            if (string.IsNullOrEmpty(uri))
            {
                return false;
            }

            if (string.IsNullOrEmpty(key))
            {
                return false;
            }

            var sg = new SiteGraph(uri);

            sg.SetKey(key);

            _logger.Info(String.Format("Creted: {0}", sg.GetKey()));

            _webGraphs.Add(sg.GetKey(), sg);

            return true;
        }