/// <summary>
        /// Registers the required Prism types that are not already registered in the <see cref="AggregateCatalog"/>.
        /// </summary>
        ///<param name="aggregateCatalog">The <see cref="AggregateCatalog"/> to register the required types in, if they are not already registered.</param>
        public static AggregateCatalog RegisterRequiredPrismServicesIfMissing(AggregateCatalog aggregateCatalog)
        {
            if (aggregateCatalog == null) throw new ArgumentNullException("aggregateCatalog");
            IEnumerable<ComposablePartDefinition> partsToRegister =
                GetRequiredPrismPartsToRegister(aggregateCatalog);

            PrismDefaultsCatalog cat = new PrismDefaultsCatalog(partsToRegister);
            aggregateCatalog.Catalogs.Add(cat);
            return aggregateCatalog;
        }
Exemple #2
0
        /// <summary>
        /// Registers the required Prism types that are not already registered in the <see cref="AggregateCatalog"/>.
        /// </summary>
        ///<param name="aggregateCatalog">The <see cref="AggregateCatalog"/> to register the required types in, if they are not already registered.</param>
        public static AggregateCatalog RegisterRequiredPrismServicesIfMissing(AggregateCatalog aggregateCatalog)
        {
            if (aggregateCatalog == null)
            {
                throw new ArgumentNullException(nameof(aggregateCatalog));
            }
            IEnumerable <ComposablePartDefinition> partsToRegister =
                GetRequiredPrismPartsToRegister(aggregateCatalog);

            PrismDefaultsCatalog cat = new PrismDefaultsCatalog(partsToRegister);

            aggregateCatalog.Catalogs.Add(cat);
            return(aggregateCatalog);
        }