Example #1
0
        /// <summary>
        /// Attempts to create a StoreItemCollection from the specified metadata file
        /// </summary>
        public bool TryCreateStoreItemCollection(string sourcePath, out StoreItemCollection storeItemCollection)
        {
            storeItemCollection = null;

            if (!ValidateInputPath(sourcePath, _textTransformation))
            {
                return(false);
            }

            ItemCollection             itemCollection    = null;
            StoreItemCollectionBuilder collectionBuilder = new StoreItemCollectionBuilder(_textTransformation);

            if (collectionBuilder.TryCreateItemCollection(_textTransformation.Host.ResolvePath(sourcePath), out itemCollection))
            {
                storeItemCollection = (StoreItemCollection)itemCollection;
            }
            return(storeItemCollection != null);
        }
Example #2
0
        /// <summary>
        ///     Attempts to create a StoreItemCollection from the specified metadata file
        /// </summary>
        public bool TryCreateStoreItemCollection(string sourcePath, out StoreItemCollection storeItemCollection)
        {
            storeItemCollection = null;

            if(String.IsNullOrEmpty(sourcePath))
                throw new ArgumentException("sourcePath");

            ItemCollection itemCollection = null;
            var collectionBuilder = new StoreItemCollectionBuilder(_textTransformation);
            if(collectionBuilder.TryCreateItemCollection(_textTransformation.Host.ResolvePath(sourcePath), out itemCollection))
                storeItemCollection = (StoreItemCollection) itemCollection;
            return storeItemCollection != null;
        }
        /// <summary>
        /// Attempts to create a StoreItemCollection from the specified metadata file
        /// </summary>
        public bool TryCreateStoreItemCollection(string sourcePath, out StoreItemCollection storeItemCollection)
        {
            storeItemCollection = null;

            if (!ValidateInputPath(sourcePath, _textTransformation))
            {
                return false;
            }

            ItemCollection itemCollection = null;
            StoreItemCollectionBuilder collectionBuilder = new StoreItemCollectionBuilder(_textTransformation);
            if (collectionBuilder.TryCreateItemCollection(_textTransformation.Host.ResolvePath(sourcePath), out itemCollection))
            {
                storeItemCollection = (StoreItemCollection)itemCollection;
            }
            return storeItemCollection != null;
        }