Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CategoryTreeService" /> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="unitOfWork">The unit of work.</param>
 /// <param name="treeService">The tree service.</param>
 /// <param name="nodeService">The node service.</param>
 /// <param name="nodesService">The nodes service.</param>
 /// <param name="tagService">The tag service.</param>
 /// <param name="accessControlService">The access control service.</param>
 /// <param name="securityService">The security service.</param>
 /// <param name="categoryService">The category service.</param>
 /// <param name="categoryTreeService">The category tree service</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 /// <param name="categorizableItemsService">The categorizable items service</param>
 public CategoryTreeService(
     IRepository repository,
     IUnitOfWork unitOfWork,
     INodesTreeService treeService,
     INodeService nodeService,
     INodesService nodesService,
     IAccessControlService accessControlService,
     ISecurityService securityService,
     Module.Root.Services.ICategoryService categoryService,
     Module.Root.Services.Categories.Tree.ICategoryTreeService categoryTreeService,
     ICmsConfiguration cmsConfiguration,
     ICategorizableItemsService categorizableItemsService
     )
 {
     this.repository                = repository;
     this.unitOfWork                = unitOfWork;
     this.treeService               = treeService;
     this.nodeService               = nodeService;
     this.nodesService              = nodesService;
     this.accessControlService      = accessControlService;
     this.securityService           = securityService;
     this.categoryService           = categoryService;
     this.categoryTreeService       = categoryTreeService;
     this.cmsConfiguration          = cmsConfiguration;
     this.categorizableItemsService = categorizableItemsService;
 }
 public PaginatedMetaService()
 {
     _previousPageService     = new PreviousPageService();
     _nextPageService         = new NextPageService();
     _nodeService             = new NodeService();
     _pageInCollectionService = new LastPageInCollectionService();
 }
Esempio n. 3
0
 public DashboardController(IOptions <SwarmOptions> options,
                            INodeService nodeService, IClientStore clientStore, ISwarmStore store) : base(options)
 {
     _nodeService = nodeService;
     _clientStore = clientStore;
     _store       = store;
 }
Esempio n. 4
0
 public SitemapService(IRepository repository, ISitemapTreeService treeService, INodeService nodeService, INodesService nodesService)
 {
     this.repository = repository;
     this.treeService = treeService;
     this.nodeService = nodeService;
     this.nodesService = nodesService;
 }
Esempio n. 5
0
 public TypeManager(INodeService nodeService)
     : this()
 {
     NodeService = nodeService;
     IsInitialising = false;
     IsInitialised = false;
 }
        public virtual IRoutingService ClearExceptions(INodeService targetNode)
        {
            throw new NotSupportedException("Exceptions are not supported yet.");

            Exceptions.TryRemove(Exceptions.FirstOrDefault(e => e.Value == targetNode).Key, out _);
            return(this);
        }
Esempio n. 7
0
 public NodeTypeManager(INodeService nodeService)
     : this()
 {
     NodeService    = nodeService;
     IsInitialising = false;
     IsInitialised  = false;
 }
Esempio n. 8
0
 public FileNameGenerationService(
     INodeService nodeService,
     IPathService pathService)
 {
     _nodeService = nodeService;
     _pathService = pathService;
 }
Esempio n. 9
0
 public NodesController(
     INodeService nodeService,
     IMapper mapper)
 {
     _service = nodeService;
     _mapper  = mapper;
 }
        public AssignRoleToNodeCommandHandlerTests()
        {
            IBoutRunnerService boutRunnerService = new BoutRunnerService();

            _nodeService = new NodeService(boutRunnerService);
            _nodeService.ConnectNode("nodeId", "connectionId");
        }
 protected void OverrideRegisteredINodeService(INodeService nodeService)
 {
     Bootstrapper.Container.Register(
         Component.For<INodeService>()
             .Instance(nodeService)
             .OverridesExistingRegistration());
 }
Esempio n. 12
0
 public SitemapService(IRepository repository, ISitemapTreeService treeService, INodeService nodeService, INodesService nodesService)
 {
     this.repository   = repository;
     this.treeService  = treeService;
     this.nodeService  = nodeService;
     this.nodesService = nodesService;
 }
Esempio n. 13
0
        /// <summary>
        /// Called once on applicationstart to initialize WCFService-Client
        /// </summary>
        /// <param name="strEndpointAddress">The endpointAdress to connect to</param>
        public WcfClient(String strEndpointAddress)
        {
            EndpointAddress endpointAddress = new EndpointAddress(strEndpointAddress);
            if (_channel != null) return;

            _httpFactory = new ChannelFactory<INodeService>("NodeServiceEndpoint", endpointAddress);
            _channel = _httpFactory.CreateChannel();
        }
Esempio n. 14
0
 public GraphService(
     INodeService <TNodeData, TNodeId> nodeService,
     IEdgeService <TEdgeData, TEdgeId, TNodeId> edgeService
     )
 {
     _nodeService = nodeService;
     _edgeService = edgeService;
 }
        public GraphService(IGraphRepository graphRepository, INodeService nodeService, IMapper mapper)
            : base(graphRepository)

        {
            _graphRepository = graphRepository;
            _nodeService     = nodeService;
            _mapper          = mapper;
        }
Esempio n. 16
0
 public SingleDepthNavigator(INodeService nodeService, ThemeManager themeManagementObject, Guid domainId)
     : this()
 {
     DomainId = domainId;
     NodeService = nodeService;
     NodeService.GetRelatedNodesByIdCompleted += new EventHandler<ReturnedNodesEventArgs>(OnGetRelatedNodesByIdCompleted);
     ThemeManagementObject = themeManagementObject;
 }
Esempio n. 17
0
 public SettingsController(INodeService nodeService,
                           IClientService clientService,
                           Grit.Tree.ITreeService treeService)
 {
     this.NodeService   = nodeService;
     this.TreeService   = treeService;
     this.ClientService = clientService;
 }
        public RemoveRoleFromNodeCommandHandlerTests()
        {
            IBoutRunnerService boutRunnerService = new BoutRunnerService();

            _nodeService = new NodeService(boutRunnerService);
            _nodeService.ConnectNode("nodeId", "connectionId");
            _nodeService.AddRole("nodeId", "role");
        }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="commonDao"></param>
 /// <param name="siteStructureDao"></param>
 /// <param name="userDao"></param>
 public CoreRepositoryAdapter(ICommonDao commonDao, ISiteStructureDao siteStructureDao, IUserDao userDao, INodeService nodeService, ISessionManager sessionManager)
 {
     this._commonDao        = commonDao;
     this._siteStructureDao = siteStructureDao;
     this._userDao          = userDao;
     this._nodeService      = nodeService;
     this._sessionManager   = sessionManager;
 }
Esempio n. 20
0
 public RouteService(IRouteExitFunction routeExitFunction,
                     INodeService nodeService, IStatisticsService statisticsService, ILogger logger)
 {
     _routeExitFunction = routeExitFunction;
     _nodeService       = nodeService;
     _statisticsService = statisticsService;
     _logger            = logger;
 }
        public virtual IRoutingService AddException(Func <OrganizationRequest, IEnhancedOrgService, bool> evaluator,
                                                    INodeService targetNode)
        {
            throw new NotSupportedException("Exceptions are not supported yet.");

            Exceptions[evaluator] = targetNode;
            return(this);
        }
Esempio n. 22
0
 public NodeController(ISequenceService sequenceService,
                       Grit.Tree.ITreeService treeService,
                       INodeService nodeService)
 {
     this.SequenceService = sequenceService;
     this.NodeService     = nodeService;
     this.TreeService     = treeService;
 }
Esempio n. 23
0
 public SingleDepthNavigator(INodeService nodeService, ThemeManager themeManagementObject, Guid domainId)
     : this()
 {
     DomainId    = domainId;
     NodeService = nodeService;
     NodeService.GetRelatedNodesByIdCompleted += new EventHandler <ReturnedNodesEventArgs>(OnGetRelatedNodesByIdCompleted);
     ThemeManagementObject = themeManagementObject;
 }
Esempio n. 24
0
 public NetworkController(
     INetworkService networkService,
     INodeService nodeService
     )
 {
     _networkService = networkService;
     _nodeService    = nodeService;
 }
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="commonDao"></param>
 /// <param name="siteStructureDao"></param>
 /// <param name="userDao"></param>
 public CoreRepositoryAdapter(ICommonDao commonDao, ISiteStructureDao siteStructureDao, IUserDao userDao, INodeService nodeService, ISessionManager sessionManager)
 {
     this._commonDao = commonDao;
     this._siteStructureDao = siteStructureDao;
     this._userDao = userDao;
     this._nodeService = nodeService;
     this._sessionManager = sessionManager;
 }
        public NodesViewModel(INodeService nodeService, IGraphService graphService, IAttribuetDescriptionService attribuetDescriptionService)
        {
            _nodeService  = nodeService;
            _graphService = graphService;
            _attribuetDescriptionService = attribuetDescriptionService;

            SaveCommand = new BaseCommand(SaveExecute, o => SelectedNodeModel != null);
        }
Esempio n. 27
0
 public VotingController(EVotingDbContext dbContext, INodeService nodeService, IAuthService authService, ICAuthService cAuthService, UserManager <User> userManager, Blockchain blockchain)
 {
     _context      = dbContext;
     _nodeService  = nodeService;
     _authService  = authService;
     _cAuthService = cAuthService;
     _userManager  = userManager;
     _blockchain   = blockchain;
 }
 public AdminWebService()
 {
     this._cuyahogaContainer = IoC.Container;
         this._commonDao = CuyahogaContainer.Resolve<ICommonDao>();
         this._siteService = CuyahogaContainer.Resolve<ISiteService>();
         this._sectionService = CuyahogaContainer.Resolve<ISectionService>();
         this._nodeService = CuyahogaContainer.Resolve<INodeService>();
         this._userService = CuyahogaContainer.Resolve<IUserService>();
 }
        public RelationshipContextMenu(IRelationshipProxy relationshipProxy, IMapControl map, INodeService service)
            : base()
        {
            RelationshipProxy = relationshipProxy;
            NodeService       = service;
            Navigator         = map.Navigator;

            this.Loaded += new RoutedEventHandler(NodeContextMenu_Loaded);
        }
Esempio n. 30
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        public AdminBasePage()
        {
            this._activeNode = null;

            this._siteService = Container.Resolve<ISiteService>();
            this._nodeService = Container.Resolve<INodeService>();
            this._sectionService = Container.Resolve<ISectionService>();
            this._moduleLoader = Container.Resolve<ModuleLoader>();
        }
Esempio n. 31
0
 public PagesController(INodeService nodeService, ITemplateService templateService, IFileService fileService, ISectionService sectionService, IModelValidator <Node> modelValidator, ModuleLoader moduleLoader)
 {
     _nodeService        = nodeService;
     _templateService    = templateService;
     _fileService        = fileService;
     _sectionService     = sectionService;
     this.ModelValidator = modelValidator;
     _moduleLoader       = moduleLoader;
 }
        public AddNodeToBoutCommandHandlerTests()
        {
            _nodeService = new NodeService(_boutRunnerService);
            _handler     = new AddNodeToBoutCommandHandler(_boutRunnerService, _nodeService, _boutDataService);
            _nodeService.ConnectNode("nodeId", "connectionId");
            var bout = _boutDataService.Load(Guid.Empty);

            _boutRunnerService.StartBout(bout);
        }
 public RouterEventArgs(Event @event, Status?routerStatus, RouterMode?routerMode, INodeService node = null,
                        Exception latestConnectionError = null)
 {
     Event                 = @event;
     RouterStatus          = routerStatus;
     RouterMode            = routerMode;
     Node                  = node;
     LatestConnectionError = latestConnectionError;
 }
Esempio n. 34
0
 public SiteController(ISiteService siteservice, IUserService userService, ITemplateService templateService, INodeService nodeService, IModelValidator<Site> siteValidator, IModelValidator<SiteAlias> siteAliasValidator)
 {
     _siteService = siteservice;
     _userService = userService;
     _templateService = templateService;
     _nodeService = nodeService;
     _siteAliasValidator = siteAliasValidator;
     ModelValidator = siteValidator;
 }
Esempio n. 35
0
 public PagesController(INodeService nodeService, ITemplateService templateService, IFileService fileService, ISectionService sectionService, IModelValidator<Node> modelValidator, ModuleLoader moduleLoader)
 {
     _nodeService = nodeService;
     _templateService = templateService;
     _fileService = fileService;
     _sectionService = sectionService;
     this.ModelValidator = modelValidator;
     _moduleLoader = moduleLoader;
 }
Esempio n. 36
0
 public HomeController(IProjectService projectService, INodeGroupService nodeGroupService, INodeService nodeService,
                       IChannelService channelService, ITriggerService triggerService)
 {
     this.projectService   = projectService;
     this.nodeGroupService = nodeGroupService;
     this.nodeService      = nodeService;
     this.channelService   = channelService;
     this.triggerService   = triggerService;
 }
Esempio n. 37
0
 public AUserService(IRepository rep,
     ICacheService cacheService, IDeviceService deviceService, INodeService nodeService, IUserService userService)
 {
     _rep = rep;
     _cacheService = cacheService;
     _deviceService = deviceService;
     _nodeService = nodeService;
     _userService = userService;
 }
        public RelationshipContextMenu(IRelationshipProxy relationshipProxy, IMapControl map, INodeService service)
            : base()
        {
            RelationshipProxy = relationshipProxy;
            NodeService = service;
            Navigator = map.Navigator;

            this.Loaded += new RoutedEventHandler(NodeContextMenu_Loaded);
        }
 private void CreateNewNodeService()
 {
     _umbracoHelperService = new Mock<IUmbracoHelperService>();
     _publishedContentExtensionService = new Mock<IPublishedContentExtensionService>();
     _nodeService = new NodeService(
         _umbracoHelperService.Object,
         new UmbracoMapper(),
         _publishedContentExtensionService.Object);
 }
Esempio n. 40
0
 public LogicAgent(IAttribuetDescriptionService attribuetDescriptionService, IConnectionService connectionService,
                   IConnectionTypeService connectionTypeService, IGraphService graphService, INodeService nodeService)
 {
     _attribuetDescriptionService = attribuetDescriptionService;
     _connectionService           = connectionService;
     _connectionTypeService       = connectionTypeService;
     _graphService = graphService;
     _nodeService  = nodeService;
 }
        public ConnectionsViewModel(IConnectionService connectionService, INodeService nodeService, IGraphService graphService, IConnectionTypeService connectionTypeService)
        {
            _connectionTypeService = connectionTypeService;
            _connectionService     = connectionService;
            _nodeService           = nodeService;
            _graphService          = graphService;

            SaveCommand = new BaseCommand(SaveExecute, o => SelectedConnection != null);
        }
 public ModelNodeService(
     INodeService nodeService,
     IModelLinkService modelLinkService,
     IModelLineService modelLineService)
 {
     this.nodeService      = nodeService;
     this.modelLinkService = modelLinkService;
     this.modelLineService = modelLineService;
 }
Esempio n. 43
0
 public SiteController(ISiteService siteservice, IUserService userService, ITemplateService templateService, INodeService nodeService, IModelValidator <Site> siteValidator, IModelValidator <SiteAlias> siteAliasValidator)
 {
     _siteService        = siteservice;
     _userService        = userService;
     _templateService    = templateService;
     _nodeService        = nodeService;
     _siteAliasValidator = siteAliasValidator;
     ModelValidator      = siteValidator;
 }
        public static void FalloverProperties(this BaseWebPage baseWebPage, INodeService nodeService)
        {
            _nodeService = nodeService;

            baseWebPage.PageTitle = baseWebPage.FalloverPageTitle();
            baseWebPage.HeadingTitle = baseWebPage.FalloverHeadingTitle();
            baseWebPage.MenuTitle = baseWebPage.FalloverMenuTitle();
            baseWebPage.MetaAuthor = baseWebPage.FalloverMetaAuthor();
            baseWebPage.MetaKeywords = baseWebPage.FalloverMetaKeywords();
        }
Esempio n. 45
0
 public SectionsController(ISectionService sectionService, INodeService nodeService, ModuleLoader moduleLoader, 
     SectionModelValidator modelValidator, ITemplateService templateService, IModuleTypeService moduleTypeService)
 {
     _sectionService = sectionService;
     _templateService = templateService;
     _moduleTypeService = moduleTypeService;
     _nodeService = nodeService;
     _moduleLoader = moduleLoader;
     ModelValidator = modelValidator;
 }
Esempio n. 46
0
 public WorkflowController(IWorkflowService workflowService, IDocumentMappingService documentMappingService,
     INotificationMappingService notificationMappingService, IWorkflowMappingService workflowMappingService,
     IStatusService statusService,
     INodeService nodeService)
 {
     this.workflowService = workflowService;
     this.documentMappingService = documentMappingService;
     this.notificationMappingService = notificationMappingService;
     this.workflowMappingService = workflowMappingService;
     this.nodeService = nodeService;
 }
 public WorkflowMappingController(IProcessService processService, ISubProcessService subProcessService, IClassificationService classificationService, IWorkflowService workflowService, IDocumentMappingService documentMappingService, IDocumentService documentService, INodeService nodeService)
 {
     this.processService = processService;
     this.subProcessService = subProcessService;
     this.classificationService = classificationService;
     this.workflowService = workflowService;
     this.documentMappingService = documentMappingService;
     this.documentService = documentService;
     this.nodeService = nodeService;
     this.service = new Service(documentService, processService, subProcessService, classificationService);
 }
        /// <summary>
        /// Default constructor calls base constructor with parameters for templatecontrol, 
        /// templatepath and stylesheet.
        /// </summary>
        public ModuleAdminBasePage()
            : base("ModuleAdminTemplate.ascx", "~/Controls/", "~/Admin/Css/Admin.css")
        {
            this._node = null;
            this._section = null;

            this._moduleLoader = Container.Resolve<ModuleLoader>();
            this._searchService = Container.Resolve<ISearchService>();
            this._sectionService = Container.Resolve<ISectionService>();
            this._nodeService = Container.Resolve<INodeService>();
        }
        /// <summary>
        /// Default constructor.
        /// </summary>
        public AdminBasePage()
        {
            this._activeNode = null;

            this._siteService = Container.Resolve<ISiteService>();
            this._userService = Container.Resolve<IUserService>();
            this._nodeService = Container.Resolve<INodeService>();
            this._sectionService = Container.Resolve<ISectionService>();
            this._moduleTypeService = Container.Resolve<IModuleTypeService>();
            this._moduleLoader = Container.Resolve<ModuleLoader>();
            this._templateService = Container.Resolve<ITemplateService>();
            this._fileService = Container.Resolve<IFileService>();
        }
Esempio n. 50
0
 public MapDepthNavigator(INodeService nodeService, ThemeManager themeManagementObject, Guid domainId)
     : this()
 {
     DomainId = domainId;
     NodeService = nodeService;
     NodeService.GetMapsNodesCompleted += new EventHandler<ReturnedNodesEventArgs>(OnGetMapsNodesCompletedNodeArgs);
     NodeService.AddNodeCompleted += new EventHandler<AddedNodeEventArgs>(OnAddNodeCompletedNodeArgs);
     NodeService.PasteNodeCloneCompleted += new EventHandler<AddedNodeEventArgs>(OnPasteNodeCloneCompletedNodeArgs);
     NodeService.UpdateNodeMetadataCompleted += new EventHandler<ReturnedNodesEventArgs>(OnUpdateNodeMetadataCompletedNodeArgs);
     NodeService.ConnectNodesCompleted += new EventHandler<ConnectedNodesEventArgs>(OnConnectNodesCompletedNodeArgs);
     NodeService.DeleteNodeCompleted += new EventHandler<DeleteEventArgs>(OnDeleteNodeCompletedNodeArgs);
     NodeService.DeleteRelationshipCompleted += new EventHandler<DeleteEventArgs>(OnDeleteRelationshipCompleted);
     ThemeManagementObject = themeManagementObject;
 }
Esempio n. 51
0
        /// <summary>
        /// Default constructor.
        /// </summary>
        public PageEngine()
        {
            this._activeNode = null;
            this._activeSection = null;
            this._templateControl = null;
            this._shouldLoadContent = true;

            // Get services from the container. Ideally, it should be possible to register the aspx page in the container
            // to automatically resolve dependencies but there were memory issues with registering pages in the container.
            this._moduleLoader = Container.Resolve<ModuleLoader>();
            this._nodeService = Container.Resolve<INodeService>();
            this._siteService = Container.Resolve<ISiteService>();
            this._sectionService = Container.Resolve<ISectionService>();
        }
Esempio n. 52
0
        public NodeContextMenu(INodeProxy nodeProxy, IMapControl map, INodeService service, Point location)
            : base()
        {
            messageHandler = new EventHandler<MessageReceivedEventArgs>(map_MessageReceived);

            NodeProxy = nodeProxy;
            //MessageSender = map.MessageSender;
            Navigator = map.Navigator;
            NodeService = service;
            map.MessageReceived += messageHandler;
            MapControl = map;
            Location = location;

            this.Loaded += new RoutedEventHandler(NodeContextMenu_Loaded);
            this.Unloaded += new RoutedEventHandler(NodeContextMenu_Unloaded);
        }
 public TransactionController(IWorkflowService workflowService, 
                    IProcessService processService, 
                    ISubProcessService subProcessService, 
                    IClassificationService classificationService, INodeService nodeService,
                    IDocumentMappingService documentMappingService,
                    IWorkflowMappingService workflowMappingService,
                    INotificationMappingService notificationMappingService )
 {
     this.workflowService = workflowService;
     this.processService = processService;
     this.subProcessService= subProcessService;;
     this.classificationService= classificationService;
     this.documentMappingService = documentMappingService;
     this.notificationMappingService = notificationMappingService;
     this.workflowMappingService = workflowMappingService;
     this.nodeService = nodeService;
     this.service = new Service(this.processService, this.subProcessService, this.classificationService);
 }
 public KnowledgeSessionApiController(
     IKnowledgeSessionService knowledgeSessionService,
     IKnowledgeSessionMemberService knowledgeSessionMemberService,
     INodeService nodeService,
     ISuggestionService suggestionService,
     INodeModificationService nodeModificationService,
     ICommentsService commentsService,
     INodeResourceService nodeResourceService,
     ITextMergeSuggestionService textMergeSuggestionService)
 {
     _knowledgeSessionService = knowledgeSessionService;
     _knowledgeSessionMemberService = knowledgeSessionMemberService;
     _nodeService = nodeService;
     _suggestionService = suggestionService;
     _nodeModificationService = nodeModificationService;
     _commentsService = commentsService;
     _nodeResourceService = nodeResourceService;
     _textMergeSuggestionService = textMergeSuggestionService;
 }
Esempio n. 55
0
 public SitemapService(ISitemapTreeService treeService, INodeService nodeService, INodesService nodesService)
 {
     this.treeService = treeService;
     this.nodeService = nodeService;
     this.nodesService = nodesService;
 }
Esempio n. 56
0
 public PositionService(
     IRepository rep,
     IMapService mapService,
     IMileageService mileageService, INodeService nodeService)
 {
     _rep = rep;
     _mapService = mapService;
     _mileageService = mileageService;
     _nodeService = nodeService;
 }
Esempio n. 57
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SitemapService" /> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="unitOfWork">The unit of work.</param>
 /// <param name="treeService">The tree service.</param>
 /// <param name="nodeService">The node service.</param>
 /// <param name="nodesService">The nodes service.</param>
 /// <param name="tagService">The tag service.</param>
 /// <param name="accessControlService">The access control service.</param>
 /// <param name="securityService">The security service.</param>
 /// <param name="sitemapService">The sitemap service.</param>
 /// <param name="cmsConfiguration">The CMS configuration.</param>
 public SitemapService(
     IRepository repository,
     IUnitOfWork unitOfWork,
     ISitemapTreeService treeService,
     INodeService nodeService,
     INodesService nodesService,
     ITagService tagService,
     IAccessControlService accessControlService,
     ISecurityService securityService,
     Module.Pages.Services.ISitemapService sitemapService,
     ICmsConfiguration cmsConfiguration)
 {
     this.repository = repository;
     this.unitOfWork = unitOfWork;
     this.treeService = treeService;
     this.nodeService = nodeService;
     this.nodesService = nodesService;
     this.tagService = tagService;
     this.accessControlService = accessControlService;
     this.securityService = securityService;
     this.sitemapService = sitemapService;
     this.cmsConfiguration = cmsConfiguration;
 }
Esempio n. 58
0
 public NodeServiceTest()
 {
     linkRepository = new MockLinkRepository();
     nodeRepoFactory = new MockNodeRepositoryFactory();
     target = new NodeService(linkRepository, nodeRepoFactory);
 }
        public void ProcessRequest(HttpContext context)
        {
            string rawUrl = context.Request.RawUrl;
            log.Info( "SitemapHandler::Starting request for " + rawUrl );
            DateTime startTime = DateTime.Now;

            try
            {
                if (Config.GetConfiguration()["SitemapHandler:defaultPagePriorty"] != null)
                {
                    double tempPagePriority =
                        Double.Parse(Config.GetConfiguration()["SitemapHandler:defaultPagePriorty"],
                                     new System.Globalization.CultureInfo("en-US"));
                    if (tempPagePriority >= 0 && tempPagePriority <= 1.0)
                    {
                        _defaultPagePriority = tempPagePriority;
                    }
                    else
                    {
                        log.ErrorFormat(
                            "SitemapHandler:defaultPagePriorty setting has wrong value [{0}]. Valid values range from 0.0 to 1.0..",
                            tempPagePriority);
                    }
                }

                if (Config.GetConfiguration()["SitemapHandler:defaultPageUpdateFrequency"] != null)
                {
                    //set the default page update frequency
                    _defaultPageUpdateFrequency =
                        Config.GetConfiguration()["SitemapHandler:defaultPageUpdateFrequency"];
                }

                _container = IoC.Container;
                _siteService = Container.Resolve<ISiteService>();
                _nodeService = Container.Resolve<INodeService>();

                HttpRequest request = context.Request;
                HttpResponse response = context.Response;
                response.ClearHeaders();
                response.ClearContent();
                response.ContentType = "text/xml";
                response.Write(GetGoogleSiteMap(request.Url.ToString()));
            }
            catch(Exception exc)
            {
                log.Error( "SitemapHandler::Error occured during ProcessRequest", exc );
            }

            // Log duration
            TimeSpan duration = DateTime.Now - startTime;
            log.Info( String.Format( "SitemapHandler::Request finshed. Total duration: {0} ms.", duration.Milliseconds ) );
        }
Esempio n. 60
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NodesService" /> class.
 /// </summary>
 /// <param name="repository">The repository.</param>
 /// <param name="nodeService">The node service.</param>
 public NodesService(IRepository repository, INodeService nodeService)
 {
     this.repository = repository;
     this.nodeService = nodeService;
 }