public XapDownloadOperation(string xapUri, MefCompositionProvider compositionProvider)
 {
     _compositionProvider = compositionProvider;
     _tcs = new TaskCompletionSource<bool>();
     _xap = new DynamicXap(new Uri(xapUri, UriKind.Relative));
     _xap.Loaded += (s, args) => XapDownloadCompleted(args);
 }
 public XapDownloadOperation(string xapUri, MefCompositionProvider compositionProvider)
 {
     _compositionProvider = compositionProvider;
     _tcs         = new TaskCompletionSource <bool>();
     _xap         = new DynamicXap(new Uri(xapUri, UriKind.Relative));
     _xap.Loaded += (s, args) => XapDownloadCompleted(args);
 }
Exemplo n.º 3
0
        /// <summary>
        ///   Configures the framework and sets up the IoC container.
        /// </summary>
        protected override void Configure()
        {
            base.Configure();

            EnsureBootstrapperHasNoExports();

            _compositionProvider = new MefCompositionProvider();
            _compositionProvider.Configure(catalog: PrepareCompositionCatalog());
            var batch = new CompositionBatch();

            PrepareCompositionContainer(batch);
            _compositionProvider.Compose(batch);
            Composition.SetProvider(_compositionProvider);
            OnCatalogRecomposed();
            _compositionProvider.Recomposed += (s, args) => OnCatalogRecomposed();
        }
Exemplo n.º 4
0
        /// <summary>
        ///   Configures the framework and sets up the IoC container.
        /// </summary>
        protected override void Configure()
        {
            base.Configure();

            EnsureBootstrapperHasNoExports();

            _compositionProvider = new MefCompositionProvider();
            _compositionProvider.Configure(catalog: PrepareCompositionCatalog());
            var batch = new CompositionBatch();
            PrepareCompositionContainer(batch);
            _compositionProvider.Compose(batch);
            Composition.SetProvider(_compositionProvider);
            OnCatalogRecomposed();
            _compositionProvider.Recomposed += (s, args) => OnCatalogRecomposed();
        }
 /// <summary>
 ///   Initializes the application object.
 /// </summary>
 /// <param name="rootViewModelType"> The type of the root view. </param>
 protected CocktailMefWindowsStoreApplication(Type rootViewModelType) : base(rootViewModelType)
 {
     _compositionProvider = new MefCompositionProvider();
 }