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);
 }
Exemple #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();
        }
        /// <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();
 }