Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MunqRegionNavigationContentLoader"/> class.
 /// </summary>
 /// <param name="serviceLocator"><see cref="IServiceLocator"/> used to create the instance of the view from its <see cref="Type"/>.</param>
 /// <param name="container"><see cref="IDependecyRegistrar"/> where the views are registered.</param>
 public MunqRegionNavigationContentLoader(
     IServiceLocator serviceLocator,
     IDependecyRegistrar container)
     : base(serviceLocator)
 {
     _container = container;
 }
        public static IDependecyRegistrar RegisterTypeForNavigation <T>([NotNull] this IDependecyRegistrar container, string name = null)
        {
            var type     = typeof(T);
            var viewName = string.IsNullOrWhiteSpace(name) ? type.Name : name;

            container.Register(viewName, typeof(object), type);

            return(container);
        }
Beispiel #3
0
 public MockServiceLocator(IDependecyRegistrar container)
 {
     _container = container;
 }
Beispiel #4
0
        private static void ConfigureMockServiceLocator(IDependecyRegistrar container)
        {
            var serviceLocator = new MockServiceLocator(container);

            ServiceLocator.SetLocatorProvider(() => serviceLocator);
        }