示例#1
0
        public void AddDefinition(AspectDefinition aspect, ILifecycleProvider lifecycleProvider)
        {
            lifecycleProvider.RegisterAdvices(aspect);

            aspects.Add(aspect.Type, aspect);
            lifecycleProviders[aspect.Type] = lifecycleProvider;
        }
示例#2
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);
 }
示例#3
0
 protected virtual INavigationProvider CreateNavigationManager(Window window, IFrameworkTypeResolver typeResolver, 
     ILifecycleProvider lifecycle)
 {
     return new UwpNavigationProvider(window, typeResolver, lifecycle);
 }
 public PerAppPlatformProviders(ILifecycleProvider lifecycle)
 {
     Guard.AgainstNull(lifecycle, "lifecycle");
     _lifecycle = lifecycle;
 }