Exemplo n.º 1
0
 protected virtual void OnInitialize()
 {
     _typeResolver = new iOSFrameworkTypeResolver();
     _loggingProvider = new DefaultLoggingProvider();
     _resourcesProvider = new iOSResourcesProvider();
     _synchronizationProvider = new iOSSynchronizationProvider(this);
     _navigationProvider = new iOSNavigationProvider(NavigationController, _typeResolver, new PlatformProviders(GetNavigationProvider, _synchronizationProvider, _resourcesProvider));
 }
 public PerWindowPlatformProviders(INavigationProvider navigation, ISynchronizationProvider synchronization, IResourcesProvider resources)
 {
     Guard.AgainstNull(navigation, "navigation");
     _navigation = navigation;
     Guard.AgainstNull(synchronization, "synchronization");
     _synchronization = synchronization;
     Guard.AgainstNull(resources, "resources");
     _resources = resources;
 }
Exemplo n.º 3
0
 public PageService(IEKProvider provider)
 {
     _dal = provider;
     _navigationProvider = provider.NavigationProvider;
     _dataProvider = provider.DataProvider;
     _siteProvider = provider.SiteProvider;
     _imageProvider = provider.ImageProvider;
     _roleProvider = provider.RoleProvider;
 }
Exemplo n.º 4
0
        public PlayersViewModel(Context context, INavigationProvider navigationProvider)
        {
            _context = context;
            _navigationProvider = navigationProvider;

            _detailsCommand = new RelayCommand(delegate
            {
                _navigationProvider.GoForward(new PlayerViewModel(_context.GetPlayer(_selectedPlayer)));
            });
            _detailsCommand.SetCanExecute(false);
        }
Exemplo n.º 5
0
		public FlightEnabledNavigator(
			INavigationProvider innerNavigator,
			IFlightEnabledPlayerMover playerMover,
			IFlightNavigationArgs flightNavigationArgs)
		{
			logger = new Logger(this);
			this.innerNavigator = innerNavigator;
			this.playerMover = playerMover;
			this.flightNavigationArgs = flightNavigationArgs;
			Navigator.NavigationProvider = this;
			CurrentPath = new FlightPath(Vector3.Zero, Vector3.Zero, flightNavigationArgs);

			logger.Verbose(Localization.Localization.FlightEnabledNavigator_Enabled);
		}
Exemplo n.º 6
0
		public FlightEnabledNavigator(
			INavigationProvider innerNavigator,
			IFlightEnabledPlayerMover playerMover,
			IFlightNavigationArgs flightNavigationArgs)
		{
			this.logger = new Logger(this);
			this.innerNavigator = innerNavigator;
			this.playerMover = playerMover;
			this.flightNavigationArgs = flightNavigationArgs;
			Navigator.NavigationProvider = this;
			CurrentPath = new FlightPath(Vector3.Zero, Vector3.Zero, flightNavigationArgs);

			logger.Verbose("Replacing Navigator with Flight Navigator.");
		}
Exemplo n.º 7
0
        public ProductResetResult(INavigationProvider navigationProvider)
        {
            NavigationProvider = navigationProvider;

            InitializeComponent();
        }
Exemplo n.º 8
0
        public static IPageGenerator Create(this IPageGenerator ignore, String contentPageTemplate, String postPageTemplate, String stylePageTemplate, INavigationProvider navProvider)
        {
            var contentTemplate = new Template()
            {
                Content = contentPageTemplate, TemplateType = Enumerations.TemplateType.ContentPage
            };
            var postTemplate = new Template()
            {
                Content = postPageTemplate, TemplateType = Enumerations.TemplateType.PostPage
            };
            var styleTemplate = new Template()
            {
                Content = stylePageTemplate, TemplateType = Enumerations.TemplateType.Style
            };

            var templates = new List <Template>()
            {
                contentTemplate, postTemplate, styleTemplate
            };

            return(ignore.Create(templates, navProvider));
        }
 public CloseCommandWrapper(ICommand nestedCommand, INavigationProvider provider)
 {
     NestedCommand = nestedCommand;
     _provider     = provider;
 }
Exemplo n.º 10
0
		public FlightEnabledNavigator(INavigationProvider innerNavigator)
			: this(innerNavigator, new FlightEnabledSlideMover(Navigator.PlayerMover), new FlightNavigationArgs()) {}
Exemplo n.º 11
0
        public static IServiceCollection Create(this IServiceCollection _1, IContentRepository contentRepo, IArchiveProvider archiveProvider, IContactProvider contactProvider, ISearchProvider searchProvider, IPageGenerator pageGen, IHomePageGenerator homePageGen, INavigationProvider navProvider, IRedirectProvider redirectProvider, ISyndicationProvider syndicationProvider, IEnumerable <Category> categories, IContentEncoder contentEncoder, IContentItemPageGenerator contentItemPageGen)
        {
            IServiceCollection container = new ServiceCollection();

            container.AddSingleton <IPageGenerator>(pageGen);
            container.AddSingleton <IHomePageGenerator>(homePageGen);
            container.AddSingleton <INavigationProvider>(navProvider);
            container.AddSingleton <IArchiveProvider>(archiveProvider);
            container.AddSingleton <IContactProvider>(contactProvider);
            container.AddSingleton <ISearchProvider>(searchProvider);
            container.AddSingleton <ISyndicationProvider>(syndicationProvider);
            container.AddSingleton <IEnumerable <Category> >(categories);
            container.AddSingleton <IRedirectProvider>(redirectProvider);
            container.AddSingleton <IContentEncoder>(contentEncoder);
            container.AddSingleton <IContentItemPageGenerator>(contentItemPageGen);

            container.AddSingleton <IContentRepository>(contentRepo);

            return(container);
        }
Exemplo n.º 12
0
        public static IPageGenerator Create(this IPageGenerator ignore, string contentPageTemplate, string postPageTemplate, string stylePageTemplate, string dateTimeFormatSpecifier, INavigationProvider navProvider)
        {
            var contentTemplate = new Template()
            {
                Content = contentPageTemplate, TemplateType = Enumerations.TemplateType.ContentPage
            };
            var postTemplate = new Template()
            {
                Content = postPageTemplate, TemplateType = Enumerations.TemplateType.PostPage
            };
            var styleTemplate = new Template()
            {
                Content = stylePageTemplate, TemplateType = Enumerations.TemplateType.Style
            };

            var templates = new List <Template>()
            {
                contentTemplate, postTemplate, styleTemplate
            };

            var settings = (null as Settings).CreateDefault(dateTimeFormatSpecifier);

            return(ignore.Create(templates, settings, navProvider, new List <Category>()));
        }
Exemplo n.º 13
0
        public static IServiceCollection Create(this IServiceCollection ignore, IEnumerable <Template> templates, ISettings settings, INavigationProvider navProvider, IEnumerable <Category> categories)
        {
            var container = new ServiceCollection();

            container.AddSingleton <IEnumerable <Template> >(templates);
            container.AddSingleton <ISettings>(settings);
            container.AddSingleton <ITagCloudStyler>(c => new Generator.TagCloudStyler.DeviationStyler(c));
            container.AddSingleton <INavigationProvider>(navProvider);
            container.AddSingleton <IEnumerable <Category> >(categories);
            container.AddSingleton <ILinkProvider>(Mock.Of <ILinkProvider>());
            container.AddSingleton <ITemplateProcessor>(Mock.Of <ITemplateProcessor>());
            container.AddSingleton <IContentEncoder>(Mock.Of <IContentEncoder>());

            //container.AddSingleton<SiteSettings>(new SiteSettings()
            //{
            //    Title = string.Empty.GetRandom(),
            //    Description = string.Empty.GetRandom(),
            //    PostsPerPage = 10.GetRandom(5),
            //    PostsPerFeed = 20.GetRandom(10)
            //});

            return(container);
        }
Exemplo n.º 14
0
 protected virtual void OnInitialize()
 {
     _loggingProvider = new DefaultLoggingProvider();
     _typeResolver = new WpfFrameworkTypeResolver();
     _navigationProvider = new WpfNavigationProvider(RootNavigationService, _typeResolver, _synchronization, _resources);
 }
Exemplo n.º 15
0
 public BlogController(IDeliveryClient deliveryClient, IMemoryCache memoryCache, INavigationProvider navigationProvider, IMenuItemGenerator menuItemGenerator) : base(deliveryClient, memoryCache)
 {
     _navigationProvider = navigationProvider ?? throw new ArgumentNullException(nameof(navigationProvider));
     _menuItemGenerator  = menuItemGenerator ?? throw new ArgumentNullException(nameof(menuItemGenerator));
 }
Exemplo n.º 16
0
 public MainViewModel(IChatManager chatManager, ICharacterManager characterManager, INavigationProvider navigationProvider, IMvxMessenger messenger) : base(navigationProvider)
 {
     this.chatManager        = chatManager;
     this.characterManager   = characterManager;
     this.messenger          = messenger;
     Character               = Mvx.GetSingleton <CharacterViewModels>().GetCharacterViewModel(characterManager.OwnCharacter);
     ViewConversationCommand = new MvxCommand <string>(ShowCharacterTab);
     ChangeStatusCommand     = new MvxCommand <Tuple <StatusEnum, string> >(tuple => chatManager.SetStatus(tuple.Item1, tuple.Item2));
     ViewHomeTabCommand      = new MvxCommand(() => {
         if (messenger.HasSubscriptionsFor <ChatViewModel.ShowTabMessage>())
         {
             messenger.Publish(new ChatViewModel.ShowTabMessage(this));
         }
         else
         {
             Navigator.Navigate <ChatViewModel>();
         }
     });
 }
Exemplo n.º 17
0
        public static IHomePageGenerator Create(this IHomePageGenerator ignore, IEnumerable <Template> templates, INavigationProvider navProvider, IEnumerable <Category> categories, ILinkProvider linkProvider)
        {
            var container = new ServiceCollection();

            var templateRepo = new Mock <ITemplateRepository>();

            templateRepo.Setup(r => r.GetAllTemplates())
            .Returns(templates);
            container.AddSingleton <ITemplateRepository>(templateRepo.Object);

            container.AddSingleton <ITagCloudStyler>(c => new Generator.TagCloudStyler.DeviationStyler(c));
            container.AddSingleton <INavigationProvider>(navProvider);
            container.AddSingleton <IEnumerable <Category> >(categories);
            container.AddSingleton <IContentRepository>(Mock.Of <IContentRepository>());
            container.AddSingleton <ILinkProvider>(linkProvider);
            container.AddSingleton <ITemplateProcessor>(Mock.Of <ITemplateProcessor>());
            return(ignore.Create(container));
        }
Exemplo n.º 18
0
 public static IHomePageGenerator Create(this IHomePageGenerator ignore, IEnumerable <Template> templates, INavigationProvider navProvider, IEnumerable <Category> categories)
 {
     return(ignore.Create(templates, navProvider, categories, Mock.Of <ILinkProvider>()));
 }
Exemplo n.º 19
0
 public void Initialize(INavigationProvider navigationProvider)
 {
     _navigationProvider = navigationProvider;
 }
Exemplo n.º 20
0
 public static NavigationServiceBuilder AddProvider <TNavigationItem>(this NavigationServiceBuilder builder,
                                                                      INavigationProvider <TNavigationItem> provider,
                                                                      Action <NavigationOptions <TNavigationItem> > configure = null)
     where TNavigationItem : NavigationItem <TNavigationItem>, new()
 => AddProvider(builder, provider, (_, options) => configure?.Invoke(options));
Exemplo n.º 21
0
        public static IPageGenerator Create(this IPageGenerator ignore, IEnumerable <Template> templates, ISettings settings, INavigationProvider navProvider, IEnumerable <Category> categories)
        {
            var container = (null as IServiceCollection).Create(templates, settings, navProvider, categories);

            return(ignore.Create(container));
        }
Exemplo n.º 22
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ToastPresenter" /> class.
 /// </summary>
 public ToastPresenter([NotNull] INavigationProvider navigationProvider,
     [NotNull] IThreadManager threadManager)
 {
     Should.NotBeNull(navigationProvider, "navigationProvider");
     Should.NotBeNull(threadManager, "threadManager");
     _navigationProvider = navigationProvider;
     _threadManager = threadManager;
 }
Exemplo n.º 23
0
 public static IPageGenerator Create(this IPageGenerator ignore, string contentPageTemplate, string postPageTemplate, string stylePageTemplate, INavigationProvider navProvider)
 {
     return(ignore.Create(contentPageTemplate, postPageTemplate, stylePageTemplate, _defaultDateTimeFormatSpecifier, navProvider));
 }
 public NavbarController(INavigationProvider navigationProvider) {
     _navigationProvider = navigationProvider;
 }
Exemplo n.º 25
0
 protected virtual void OnInitialize(IActivatedEventArgs args)
 {
     _loggingProvider = new DefaultLoggingProvider();
     _synchronization = new SynchronizationProvider();
     _resources = new WindowsRuntimeResourcesProvider(ResourceLoader.GetForViewIndependentUse(Constants.StoreAppsInfrastructureResourceMapId));
     _typeResolver = new DefaultMvvmTypeResolver();
     _lifecycleProvider = new UwpLifecycleProvider(_typeResolver, _synchronization, _resources);
     _navigationProvider = CreateNavigationManager(Window.Current, _typeResolver, _synchronization, _resources);
 }
Exemplo n.º 26
0
 public MarsExplorer(Plateau plateau,List<Rover> rovers)
 {
     NavigationProvider = new DefaultNavigationProvider();
     Plateau = plateau;
     Rovers = rovers;
 }
Exemplo n.º 27
0
 public FlightEnabledNavigator(INavigationProvider innerNavigator)
     : this(innerNavigator, new FlightEnabledSlideMover(Navigator.PlayerMover), new FlightNavigationArgs())
 {
 }
Exemplo n.º 28
0
        public static IServiceCollection Create(this IServiceCollection ignore, IEnumerable <Template> templates, INavigationProvider navProvider, ITemplateProcessor templateProcessor)
        {
            var container = new ServiceCollection();

            var templateRepo = new Mock <ITemplateRepository>();

            templateRepo.Setup(r => r.GetAllTemplates())
            .Returns(templates);

            var siteSettings = new SiteSettings();

            var contentRepo = new Mock <IContentRepository>();

            contentRepo.Setup(r => r.GetSiteSettings())
            .Returns(siteSettings);

            container.AddSingleton <ITemplateRepository>(templateRepo.Object);
            container.AddSingleton <IContentRepository>(contentRepo.Object);

            container.AddSingleton <INavigationProvider>(navProvider);
            container.AddSingleton <ITemplateProcessor>(templateProcessor);

            container.AddSingleton <ILinkProvider>(Mock.Of <ILinkProvider>());
            container.AddSingleton <IContentEncoder>(Mock.Of <IContentEncoder>());
            container.AddSingleton <ITagCloudStyler>(c => new Generator.TagCloudStyler.DeviationStyler(c));

            return(container);
        }
Exemplo n.º 29
0
 public SportController(INavigationProvider navigationProvider)
 {
     this.navigationProvider = navigationProvider;
 }
Exemplo n.º 30
0
 /// <summary>
 /// Register the provider that contains current view
 /// </summary>
 /// <param name="provider"></param>
 public void RegisterProvider(INavigationProvider provider)
 {
     this.Provider = provider;
 }
Exemplo n.º 31
0
 public MarsExplorer(INavigationProvider navigationProvider, Plateau plateau, List<Rover> rovers)
 {
     NavigationProvider = navigationProvider;
     Plateau = plateau;
     Rovers = rovers;
 }
Exemplo n.º 32
0
 public MainMenuViewModel(Context context, INavigationProvider navigationProvider)
 {
     _context = context;
     _navigationProvider = navigationProvider;
 }
Exemplo n.º 33
0
        public SitemapItemModelBinder(INavigationProvider navigationProvider)
        {
            navigationProvider.ThrowIfNull(nameof(navigationProvider));

            _navigationProvider = navigationProvider;
        }
Exemplo n.º 34
0
 public static IServiceCollection Create(this IServiceCollection ignore, IEnumerable <Template> templates, INavigationProvider navProvider)
 {
     return(ignore.Create(templates, navProvider, Mock.Of <ITemplateProcessor>()));
 }