/// <summary>
        /// Gets the catalog items.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="recursive">if set to <c>true</c> [recursive].</param>
        /// <returns></returns>
        private static API.CatalogItem[] GetCatalogItems(string path, bool recursive)
        {
            ReportingServicesProvider provider = new ReportingServicesProvider();

            path = provider.GetFolderPath(path);
            var apiClient = provider.GetAPIClient(UserType.Browser);

            API.CatalogItem[] catalog;
            apiClient.ListChildren(null, path, recursive, out catalog);

            return(catalog);
        }
        /// <summary>
        /// Gets the item by path.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <returns></returns>
        public static ReportingServiceItem GetItemByPath(string path)
        {
            ReportingServicesProvider provider = new ReportingServicesProvider();

            path = provider.GetFolderPath(path);

            ReportingServiceItem rsItem = GetItemsFlat(provider.ReportPath, true, true)
                                          .Where(i => i.Path.Equals(path, StringComparison.InvariantCultureIgnoreCase))
                                          .FirstOrDefault();

            return(rsItem);
        }