public BaseTabViewModel(ICache <SettingsModel> settings,
                         IPageFactory pageFactory,
                         ILogger <BaseTabViewModel> logger,
                         MainThreadNavigator nav)
 {
     _settings           = settings;
     _pageFactory        = pageFactory;
     _logger             = logger;
     _nav                = nav;
     OnAppearingBehavior = new Command(() =>
     {
         try
         {
             if (!_dialogShown && (!_settings.GetAll().Any() || _settings.Get("").DisplayWelcomeMessage))
             {
                 _dialogShown = true;
                 _nav.Push(_pageFactory.GetPage(PageType.Instruction, true));
             }
         }
         catch (Exception ex)
         {
             _logger.LogError($"Failed to check settings on load.", ex);
         }
     });
 }
Пример #2
0
        public MasterPageViewModel(IPageFactory _page, IAppNavigation _navi)
        {
            PageFac = _page;
            Navi    = _navi;

            MasterPageItems = new List <MenuItem>();

            MasterPageItems.Add(new MenuItem
            {
                Title      = "Home",
                IconSource = "Search.png",
                TargetType = typeof(MainMapPage),
                Id         = "home"
            });

            MasterPageItems.Add(new MenuItem
            {
                Title      = "Profile",
                IconSource = "Search.png",
                TargetType = typeof(RumbleApp.Core.UI.Pages.Profile.MyProfile),
                Id         = "profile"
            });

            MasterPageItems.Add(new MenuItem
            {
                Title      = "Events",
                IconSource = "Search.png",
                TargetType = typeof(RumbleApp.Core.UI.Pages.Events.Events),
                Id         = "events"
            });
        }
 public RegisterPageViewModel(IDialogService dialogService, IConnectionHandler connectionHandler, INavigation navigation, IPageFactory pageFactory)
 {
     this.dialogService     = dialogService;
     this.connectionHandler = connectionHandler;
     this.navigation        = navigation;
     this.pageFactory       = pageFactory;
 }
Пример #4
0
 public EventsViewModel(IPageFactory _page, IAppNavigation _navi, IEventService _evnt)
 {
     Navi = _navi;
     Page = _page;
     Evnt = _evnt;
     RegisterMessageCenter();
 }
 public DynamicResourceProvider(string resourceName)
 {
     _logger = DependencyResolver.Current.GetService<ILogger>();
     _pageFactory = DependencyResolver.Current.GetService<IPageFactory>();
     _cacheAgent = DependencyResolver.Current.GetService<ICacheAgent>();
     _resourceName = resourceName;
 }
 public ManageSubscriptionViewModel(ValidationModel model,
                                    string runtimePlatform,
                                    Action <Uri> openUri,
                                    MainThreadNavigator nav,
                                    ILogger <ManageSubscriptionViewModel> logger,
                                    IPageFactory pageFactory)
 {
     _model           = model;
     _runtimePlatform = runtimePlatform;
     _openUri         = openUri;
     _nav             = nav;
     _logger          = logger;
     _pageFactory     = pageFactory;
     try
     {
         SubscriptionTypeLabel = "   " + _model.Subscription.SubscriptionType.ToString();
         RemainingOrdersLabel  = "   " + _model.RemainingOrders.ToString();
         PurchasedOrdersLabel  = "   " + _model.PurchasedReports?.Count.ToString();
         EndDateLabel          = "   " + _model.Subscription.EndDateTime.ToString("dddd, dd MMMM yyyy");
         GetMoreReportsLabel   = $"Purchase additional reports at a reduced price of ${SubscriptionUtility.GetSingleReportInfo(_model).Price} per report.";
         GetMoreReportsCommand = new Command(() => _nav.Push(_pageFactory.GetPage(PageType.SingleReportPurchase, _model)));
         var compName   = _runtimePlatform == Device.Android ? "Google" : "Apple";
         var supportUri = _runtimePlatform == Device.Android ? "https://support.google.com/googleplay/answer/7018481" :
                          "https://support.apple.com/en-us/HT202039#subscriptions";
         DisclaimerLabel  = $"NOTE: {compName} does not allow subscriptions to be cancelled through the app. This button will open a web browser with instructions on how to cancel from your device.";
         CancelSubCommand = new Command(() => _openUri(new Uri(supportUri)));
     }
     catch (Exception ex)
     {
         _logger.LogError($"Failed to load manage subscription page.", ex);
     }
 }
Пример #7
0
 public DynamicResourceProvider(string resourceName)
 {
     _logger       = DependencyResolver.Current.GetService <ILogger>();
     _pageFactory  = DependencyResolver.Current.GetService <IPageFactory>();
     _cacheAgent   = DependencyResolver.Current.GetService <ICacheAgent>();
     _resourceName = resourceName;
 }
Пример #8
0
 public PageController(IPageFactory pageFactor,
                       IComponentPresentationFactory componentPresentationFactory,
                       ILogger logger,
                       IDD4TConfiguration configuration) :
     base(pageFactor, componentPresentationFactory, logger, configuration)
 {
 }
Пример #9
0
 internal PdfDocument(ILog log,
                      IInputBytes inputBytes,
                      HeaderVersion version,
                      CrossReferenceTable crossReferenceTable,
                      bool isLenientParsing,
                      ParsingCachingProviders cachingProviders,
                      IPageFactory pageFactory,
                      Catalog catalog,
                      DocumentInformation information,
                      EncryptionDictionary encryptionDictionary,
                      IPdfTokenScanner pdfScanner,
                      IFilterProvider filterProvider,
                      AcroFormFactory acroFormFactory)
 {
     this.log                  = log;
     this.inputBytes           = inputBytes;
     this.version              = version ?? throw new ArgumentNullException(nameof(version));
     this.isLenientParsing     = isLenientParsing;
     this.cachingProviders     = cachingProviders ?? throw new ArgumentNullException(nameof(cachingProviders));
     this.encryptionDictionary = encryptionDictionary;
     this.pdfScanner           = pdfScanner ?? throw new ArgumentNullException(nameof(pdfScanner));
     this.filterProvider       = filterProvider ?? throw new ArgumentNullException(nameof(filterProvider));
     Information               = information ?? throw new ArgumentNullException(nameof(information));
     pages        = new Pages(log, catalog, pageFactory, isLenientParsing, pdfScanner);
     Structure    = new Structure(catalog, crossReferenceTable, pdfScanner);
     documentForm = new Lazy <AcroForm>(() => acroFormFactory.GetAcroForm(catalog));
 }
Пример #10
0
 public SuccessPageFactory(IPageHelper pageHelper, IPageFactory pageFactory, ISessionHelper sessionHelper, IDistributedCacheWrapper distributedCache)
 {
     _pageHelper       = pageHelper;
     _pageFactory      = pageFactory;
     _sessionHelper    = sessionHelper;
     _distributedCache = distributedCache;
 }
Пример #11
0
        public PageActionInvokerProvider(
            IPageFactory factory,
            IPageHandlerMethodSelector selector,
            IPageLoader loader,
            DiagnosticListener diagnosticSource,
            ILoggerFactory loggerFactory,
            IEnumerable <IFilterProvider> filterProviders,
            IModelMetadataProvider metadataProvider,
            ITempDataDictionaryFactory tempDataFactory,
            IOptions <MvcOptions> options,
            IOptions <MvcViewOptions> viewOptions,
            TempDataPropertyProvider pagePersistedPropertyProvider)
        {
            _factory          = factory;
            _selector         = selector;
            _diagnosticSource = diagnosticSource;
            _loader           = loader;
            _metadataProvider = metadataProvider;
            _tempDataFactory  = tempDataFactory;
            _viewOptions      = viewOptions;
            _pagePersistedPropertyProvider = pagePersistedPropertyProvider;

            _filterProviders        = filterProviders.OrderBy(fp => fp.Order).ToArray();
            _logger                 = loggerFactory.CreateLogger <PageActionInvoker>();
            _valueProviderFactories = options.Value.ValueProviderFactories.ToArray();
        }
Пример #12
0
        public PageActionInvoker(
            DiagnosticListener diagnosticSource,
            ILogger logger,
            IPageFactory factory,
            IPageModelFactory modelFactory,
            IPageHandlerMethodSelector selector,
            IModelMetadataProvider metadataProvider,
            ITempDataDictionaryFactory tempDataFactory,
            IOptions <MvcViewOptions> viewOptions,
            IFilterMetadata[] filters,
            IReadOnlyList <IValueProviderFactory> valueProviderFactories,
            ActionContext actionContext,
            CompiledPageActionDescriptor actionDescriptor,
            TempDataPropertyProvider tempDataPropertyProvider)
        {
            _diagnosticSource         = diagnosticSource;
            _logger                   = logger;
            _factory                  = factory;
            _modelFactory             = modelFactory;
            _selector                 = selector;
            _metadataProvider         = metadataProvider;
            _tempDataFactory          = tempDataFactory;
            _viewOptions              = viewOptions.Value;
            _filters                  = filters;
            _valueProviderFactories   = new CopyOnWriteList <IValueProviderFactory>(valueProviderFactories);
            _actionContext            = actionContext;
            _actionDescriptor         = actionDescriptor;
            _tempDataPropertyProvider = tempDataPropertyProvider;

            _cursor = new FilterCursor(_filters);
        }
        public MainViewModel(Action onClose, IWindowFactory windowFactory, IPageFactory pageFactory) : base(onClose)
        {
            // Deletes existing database and seeds it with predefined data
            DataSeeder dataSeeder = new DataSeeder();

            dataSeeder.SeedAll();

            // Window services.
            _windowFactory = windowFactory;
            _pageFactory   = pageFactory;

            // Setup quotation page view
            QuotationPage         = _pageFactory.GetNewPageInstanceAsObject(PageType.QuotationPageView);
            _quotationPageService = _pageFactory.GetPageService(QuotationPage);

            // Setup customer page view
            CustomerPage         = _pageFactory.GetNewPageInstanceAsObject(PageType.CustomerPageView);
            _customerPageService = _pageFactory.GetPageService(CustomerPage);

            // Setup item page view
            ItemPage          = _pageFactory.GetNewPageInstanceAsObject(PageType.ItemPageView);
            _itemsPageService = _pageFactory.GetPageService(ItemPage);

            // Setup template page view
            TemplatePage         = _pageFactory.GetNewPageInstanceAsObject(PageType.TemplatePageView);
            _templatePageService = _pageFactory.GetPageService(TemplatePage);

            SelectedTabIndex = 0;
        }
Пример #14
0
        /// <summary>
        ///     Uses the browser to execute a GET request to the specified location, validates against the specified HTTP status
        ///     code and creates a page using the specified factory.
        /// </summary>
        /// <typeparam name="T">
        ///     The type of page to return.
        /// </typeparam>
        /// <param name="browser">
        ///     The browser.
        /// </param>
        /// <param name="location">
        ///     The location to request.
        /// </param>
        /// <param name="expectedStatusCode">
        ///     The expected HTTP status code.
        /// </param>
        /// <param name="pageFactory">
        ///     The page factory.
        /// </param>
        /// <returns>
        ///     A <typeparamref name="T" /> value.
        /// </returns>
        /// <exception cref="System.ArgumentNullException">
        ///     The <paramref name="browser" /> parameter is <c>null</c>.
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        ///     The <paramref name="location" /> parameter is <c>null</c>.
        /// </exception>
        /// <exception cref="System.ArgumentNullException">
        ///     The <paramref name="pageFactory" /> parameter is <c>null</c>.
        /// </exception>
        public static T GoTo <T>(
            this IBrowser browser,
            Uri location,
            HttpStatusCode expectedStatusCode,
            IPageFactory pageFactory) where T : IPage, new()
        {
            if (browser == null)
            {
                throw new ArgumentNullException("browser");
            }

            if (location == null)
            {
                throw new ArgumentNullException("location");
            }

            if (pageFactory == null)
            {
                throw new ArgumentNullException("pageFactory");
            }

            using (var request = new HttpRequestMessage(HttpMethod.Get, location))
            {
                return(browser.Execute <T>(request, expectedStatusCode, pageFactory));
            }
        }
Пример #15
0
 public ProfileViewModel(IPageFactory _page, IAppNavigation _navi, IProfileService _prof, IEventService _evnt)
 {
     Navi = _navi;
     Page = _page;
     Prof = _prof;
     Evnt = _evnt;
 }
Пример #16
0
        public MainPageViewModel(
            IDialogService dialogService,
            INavigation navigation,
            IPageFactory pageFactory,
            IReviewPageViewModel reviewPageViewModel,
            IConnectionHandler connectionHandler,
            ThankYouPageViewModel thankYouPageViewModel,
            MasterPageViewModel masterPageViewModel,
            ILoginPageViewModel loginPageViewModel,
            EditPageViewModel editPageViewModel
            )
        {
            this.dialogService       = dialogService;
            this.navigation          = navigation;
            this.pageFactory         = pageFactory;
            this.reviewPageViewModel = reviewPageViewModel;
            this.connectionHandler   = connectionHandler;
            this.editPageViewModel   = editPageViewModel;

            ReviewsList = new ObservableCollection <ReviewMenuItem>();
            GetReviewsByUser();

            reviewPageViewModel.ViewModelReadyEvent += IntentReceiver_ItemsReceivedEvent;
            thankYouPageViewModel.ReviewDoneEvent   += OnReviewDoneEvent;
            loginPageViewModel.LoginSuccessful      += OnLoginStateChanged;
            MainPage.ItemSelected += OnReviewItemSelected;
        }
Пример #17
0
 public BlogController(ILogger <BlogController> logger, IPostService postService, IPageService pageService, ICategoryService categoryService, ITagsService tagsService, ICommentService commentService, IPostFactory postFactory, IPageFactory pageFactory, ICategoryFactory categoryFactory, ITagsFactory tagsFactory, BlogUserManager blogUserManager, IUserFactory userFactory, CommentsSettings commentsSettings, ICaptchaService captchaService, IHttpContextAccessor httpContextAccessor, IIPAddressService iPAddressService, IEmailSender emailSender, IJsonSerializer jsonSerializer, IStringLocalizer <BlogController> stringLocalizer, ISpamService spamService, IEventBus eventBus, BasicSettings basicSettings, IDistributedCache distributedCache)
 {
     _logger              = logger;
     _postService         = postService;
     _pageService         = pageService;
     _categoryService     = categoryService;
     _tagsService         = tagsService;
     _commentService      = commentService;
     _postFactory         = postFactory;
     _pageFactory         = pageFactory;
     _categoryFactory     = categoryFactory;
     _tagsFactory         = tagsFactory;
     _blogUserManager     = blogUserManager;
     _userFactory         = userFactory;
     _commentsSettings    = commentsSettings;
     _captchaService      = captchaService;
     _httpContextAccessor = httpContextAccessor;
     _iPAddressService    = iPAddressService;
     _emailSender         = emailSender;
     _jsonSerializer      = jsonSerializer;
     _stringLocalizer     = stringLocalizer;
     _spamService         = spamService;
     _eventBus            = eventBus;
     _basicSettings       = basicSettings;
     _distributedCache    = distributedCache;
 }
 public OrganisationService(IDistributedCacheWrapper distributedCache, IEnumerable <IOrganisationProvider> organisationProviders, IPageHelper pageHelper, IPageFactory pageFactory)
 {
     _distributedCache      = distributedCache;
     _pageHelper            = pageHelper;
     _organisationProviders = organisationProviders;
     _pageFactory           = pageFactory;
 }
Пример #19
0
 public MainViewModel(PageService pageService, IPageFactory pageFactory)
 {
     _pageFactory              = pageFactory;
     _pageService              = pageService;
     _pageService.PageChanged += (page) => PageSource = page;
     _pageService.OnPageChanged(_pageFactory.GetPage(PageType.General).Result);
 }
Пример #20
0
 public BookingService(
     IDistributedCacheWrapper distributedCache,
     IPageHelper pageHelper,
     IEnumerable <IBookingProvider> bookingProviders,
     IPageFactory pageFactory,
     IMappingService mappingService,
     IWebHostEnvironment environment,
     ISchemaFactory schemaFactory,
     ISessionHelper sessionHelper,
     IHashUtil hashUtil,
     IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration,
     IHttpContextAccessor httpContextAccessor)
 {
     _distributedCache = distributedCache;
     _pageHelper       = pageHelper;
     _bookingProviders = bookingProviders;
     _pageFactory      = pageFactory;
     _mappingService   = mappingService;
     _environment      = environment;
     _schemaFactory    = schemaFactory;
     _sessionHelper    = sessionHelper;
     _hashUtil         = hashUtil;
     _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value;
     _httpContextAccessor = httpContextAccessor;
 }
Пример #21
0
 internal PdfDocument(ILog log,
                      IInputBytes inputBytes,
                      HeaderVersion version,
                      CrossReferenceTable crossReferenceTable,
                      ParsingCachingProviders cachingProviders,
                      IPageFactory pageFactory,
                      Catalog catalog,
                      DocumentInformation information,
                      EncryptionDictionary encryptionDictionary,
                      IPdfTokenScanner pdfScanner,
                      ILookupFilterProvider filterProvider,
                      AcroFormFactory acroFormFactory,
                      BookmarksProvider bookmarksProvider,
                      bool clipPaths)
 {
     this.log                  = log;
     this.inputBytes           = inputBytes;
     this.version              = version ?? throw new ArgumentNullException(nameof(version));
     this.cachingProviders     = cachingProviders ?? throw new ArgumentNullException(nameof(cachingProviders));
     this.encryptionDictionary = encryptionDictionary;
     this.pdfScanner           = pdfScanner ?? throw new ArgumentNullException(nameof(pdfScanner));
     this.filterProvider       = filterProvider ?? throw new ArgumentNullException(nameof(filterProvider));
     this.bookmarksProvider    = bookmarksProvider ?? throw new ArgumentNullException(nameof(bookmarksProvider));
     this.clipPaths            = clipPaths;
     Information               = information ?? throw new ArgumentNullException(nameof(information));
     pages        = new Pages(catalog, pageFactory, pdfScanner);
     Structure    = new Structure(catalog, crossReferenceTable, pdfScanner);
     Advanced     = new AdvancedPdfDocumentAccess(pdfScanner, filterProvider, catalog);
     documentForm = new Lazy <AcroForm>(() => acroFormFactory.GetAcroForm(catalog));
 }
Пример #22
0
 public DD4TContentProvider(ILinkFactory linkFactory, IModelBuilder modelBuilder, IPageFactory pageFactory, IContentResolver resolver)
 {
     _linkFactory = linkFactory;
     DefaultModelBuilder = modelBuilder;
     _pageFactory = pageFactory;
     ContentResolver = resolver;
 }
Пример #23
0
        public static object Resource(string language, string resourceName)
        {
            //Todo: Clean

            // Get the cache
            Cache cache = HttpContext.Current.Cache;

            if (cache["Resources"] == null)
            {
                cache.Insert("Resources", new Dictionary <string, Dictionary <string, string> >());
            }

            var resources = (Dictionary <string, Dictionary <string, string> >)cache.Get("Resources");

            Dictionary <string, string> languageSpecificResources;

            if (!resources.ContainsKey(language))
            {
                // create the whole resources dictionary for the specified language
                string resourceFile = ConfigurationManager.AppSettings["ResourcePath"];

                string resourcePagePath = String.Format("/{0}/{1}", language, resourceFile);

                IPageProvider provider = DependencyResolver.Current.GetService <IPageProvider>();
                IPageFactory  factory  = DependencyResolver.Current.GetService <IPageFactory>();
                factory.PageProvider = provider;

                var resourcesPage = factory.FindPage(resourcePagePath);

                languageSpecificResources = new Dictionary <string, string>();

                foreach (IComponentPresentation componentPresentation in resourcesPage.ComponentPresentations)
                {
                    foreach (IFieldSet fieldSet in componentPresentation.Component.Fields["Resource"].EmbeddedValues)
                    {
                        if (languageSpecificResources.ContainsKey(fieldSet["Key"].Value))
                        {
                            throw new DuplicateNameException(String.Format("Duplicate key found for key name: {0}", fieldSet["Key"].Value));
                        }

                        languageSpecificResources.Add(fieldSet["Key"].Value, fieldSet["Value"].Value);
                    }
                }

                // add the dictionary to the main resources dictionary in the cache
                resources.Add(language, languageSpecificResources);
            }
            else
            {
                languageSpecificResources = resources[language];
            }

            if (languageSpecificResources.ContainsKey(resourceName))
            {
                return(languageSpecificResources[resourceName]);
            }

            return(String.Format("[{0}]", resourceName));
        }
Пример #24
0
 public MainMapPageViewModel(IPageFactory _page, IAppNavigation _navi, IEventService _evnt, IProfileService _prof)
 {
     Navi = _navi;
     Page = _page;
     Evnt = _evnt;
     Prof = _prof;
     RegisterMessageCenter();
 }
 public ContextualQuestionsViewModel(IDialogService dialogService, ReviewDataCollector dataCollector, IPageFactory pageFactory, INavigation navigation, ThankYouPageViewModel thankYouPageViewModel)
 {
     this.dialogService         = dialogService;
     this.dataCollector         = dataCollector;
     this.pageFactory           = pageFactory;
     this.navigation            = navigation;
     this.thankYouPageViewModel = thankYouPageViewModel;
 }
Пример #26
0
 public MainTabbedPage(IPageFactory pageFactory)
 {
     Children.Add(pageFactory.MakePage <NewsFeedPage>());
     Children.Add(pageFactory.MakePage <CalendarPage>());
     Children.Add(pageFactory.MakePage <ToolsPage>());
     Children.Add(pageFactory.MakePage <ProfilePage>());
     InitializeComponent();
 }
Пример #27
0
        internal Pages(Catalog catalog, IPageFactory pageFactory, IPdfTokenScanner pdfScanner)
        {
            this.catalog     = catalog ?? throw new ArgumentNullException(nameof(catalog));
            this.pageFactory = pageFactory ?? throw new ArgumentNullException(nameof(pageFactory));
            this.pdfScanner  = pdfScanner ?? throw new ArgumentNullException(nameof(pdfScanner));

            Count = catalog.PagesDictionary.GetIntOrDefault(NameToken.Count);
        }
Пример #28
0
 public RegisterViewModel(IPageFactory _page, IAppNavigation _navi, IRestService _rest, IAccountService _acc, IUserService _user)
 {
     PageFac = _page;
     Navi    = _navi;
     Rest    = _rest;
     Acc     = _acc;
     Usr     = _user;
 }
Пример #29
0
        public PageController(IPageFactory pageFactor, 
                                IComponentPresentationFactory componentPresentationFactory, 
                                ILogger logger, 
                                IDD4TConfiguration configuration) :
            base(pageFactor, componentPresentationFactory, logger, configuration)
        {

        }
Пример #30
0
 public NavigationService(ILogger <NavigationService> logger, IPageViewmodelTypeRegistry registry, IPageFactory pageFactory,
                          ICurrentRootPageProvider rootPageProvider)
 {
     _logger           = logger;
     _registry         = registry;
     _pageFactory      = pageFactory;
     _rootPageProvider = rootPageProvider;
 }
Пример #31
0
 public FileUploadService(IDistributedCacheWrapper distributedCache,
                          IPageFactory pageFactory,
                          IPageHelper pageHelper)
 {
     _distributedCache = distributedCache;
     _pageFactory      = pageFactory;
     _pageHelper       = pageHelper;
 }
Пример #32
0
        public AddEventViewModel(IPageFactory _page, IAppNavigation _navi, IEventService _envt)
        {
            PageFac = _page;
            Navi    = _navi;
            Evnt    = _envt;

            RegisterMessaging();
        }
Пример #33
0
 public LoginViewModel(IPageFactory _page, IAppNavigation _navi, IRestService _rest, IAccountService _acc, IProfileService _prof)
 {
     PageFac = _page;
     Navi    = _navi;
     Rest    = _rest;
     Acc     = _acc;
     Prof    = _prof;
 }
 public SitemapCacheDependency(int pollTime, string sitemapUrlPath, IPageFactory pageFactory)
 {
     this.PageFactory = pageFactory;
     timer = new Timer(
         new TimerCallback(CheckDependencyCallback),
         this, 0, pollTime);
     SitemapUrlPath = sitemapUrlPath;
     
     LastPublishDate = PageFactory.GetLastPublishedDateByUrl(SitemapUrlPath);
 }
Пример #35
0
 public ResourceDocument(string resourcePath, IPageFactory pageFactory)
 {
     this.ResourcePath = resourcePath;
     string s = pageFactory.FindPageContent(resourcePath);
     Stopwatch stopwatch = new Stopwatch();
     stopwatch.Start();
     this.xpath = new XPathDocument(new StringReader(s));
     stopwatch.Stop();
     LoggerService.Debug(">>ResourceDocument ({0})", new object[] { stopwatch.Elapsed.TotalMilliseconds });
 }
Пример #36
0
        public SitemapCacheDependency(int pollTime, string sitemapUrlPath, IPageFactory pageFactory)
        {
            if (pageFactory == null)
                throw new ArgumentNullException("pageFactory");

            this.PageFactory = pageFactory;
            timer = new Timer(
                new TimerCallback(CheckDependencyCallback),
                this, 0, pollTime);
            SitemapUrlPath = sitemapUrlPath;
            
            LastPublishDate = PageFactory.GetLastPublishedDateByUrl(SitemapUrlPath);
        }
 public LoginContext()
 {
     //_pageFactory = new PageFactoryBase();
     //Kernel.Bind(typeof(ILocatorTransformer<>)).To(typeof(SeleniumLocatorTransformer));
     //Kernel.Bind<IPageFactory>().To<PageFactoryBase>();
     //Kernel.Bind<IDriverDecorator>().To<SeleniumDriverDecorator>();
     //Kernel.Bind<IElement>().To<SeleniumElement>();
     //Kernel.Bind<IHow>().To<ProofOfConcept.Selenium.How>();
     //Kernel.Bind<NavigationService>().To<NavigationService>();
     //Kernel.Bind<IElementSearchConfiguration>().To<SeleniumElementFinder>();
     _pageFactory = DependencyManager.Kernel.Get<IPageFactory>();
     _navigationService = DependencyManager.Kernel.Get<NavigationService>();
 }
Пример #38
0
        public TridionSiteMapProvider(IPageFactory pageFactory, ICacheAgent cacheAgent, ILogger logger, IDD4TConfiguration configuration)
        {
            if (pageFactory == null)
                throw new ArgumentNullException("pageFactory");
            if (logger == null)
                throw new ArgumentNullException("logger");
            if (configuration == null)
                throw new ArgumentNullException("configuration");
            if (cacheAgent == null)
                throw new ArgumentNullException("cacheAgent");

            _pageFactory = pageFactory;
            _configuration = configuration;
            _cacheAgent = cacheAgent;
            _logger = logger;
        }
Пример #39
0
 public MenuController(IPageFactory pageFactory, ILinkFactory linkFactory, IPageLinkProvider pageLinkProvider,
                       IComponentFactory componentFactory)
 {
     menuHelper = new MenuHelper(pageFactory, componentFactory, pageLinkProvider);
        this.linkFactory = linkFactory;
 }
Пример #40
0
 public ModelControllerBase(IPageFactory pageFactory, IComponentPresentationFactory componentPresentationFactory, ILogger logger, IDD4TConfiguration dd4tConfiguration, IViewModelFactory viewModelFactory) : base(pageFactory, componentPresentationFactory, logger, dd4tConfiguration)
 {
     this.ViewModelFactory = viewModelFactory;
 }
Пример #41
0
 public TridionControllerBase(IPageFactory pageFactory, IComponentPresentationFactory componentPresentationFactory, ILogger logger, IDD4TConfiguration dd4tConfiguration) : base(pageFactory, componentPresentationFactory, logger, dd4tConfiguration)
 {
 }
Пример #42
0
 public AppNavigation(INavigationService navi, IPageFactory pages, ILoginService login)
 {
     _navi = navi;
     _pages = pages;
     _login = login;
 }
Пример #43
0
 public MenuHelper(IPageFactory pageFactory, IComponentFactory componentFactory, IPageLinkProvider pageLinkProvider)
 {
     this.pageFactory = pageFactory;
     this.componentFactory = componentFactory;
     this.pageLinkProvider = pageLinkProvider;
 }
Пример #44
0
 public TridionSiteMap(IPageFactory pageFactory, ICacheAgent cache)
 {
     this._pageFactory = pageFactory;
     this._cache = cache;
 }
Пример #45
0
 public HomeController(IPageFactory pageFactory)
 {
     _pageFactory = pageFactory;
 }