private static FileNodeInfo[] GetThemes(ISharePointCommandContext context) { List <FileNodeInfo> nodeInfos = new List <FileNodeInfo>(); try { context.Logger.WriteLine(Resources.ThemeGallerySharePointCommands_TryingToRetrieveAvailableThemes, LogCategory.Status); SPListItemCollection themes = context.Web.GetCatalog(SPListTemplateType.ThemeCatalog).GetItems( new SPQuery { ViewXml = "<View />" } ); nodeInfos = themes.ToFileNodeInfo(); context.Logger.WriteLine(Resources.ThemeGallerySharePointCommands_RetrievingException, LogCategory.Status); } catch (Exception ex) { context.Logger.WriteLine(String.Format(Resources.ThemeGallerySharePointCommands_RetrievingException, ex.Message, Environment.NewLine, ex.StackTrace), LogCategory.Error); } return(nodeInfos.ToArray()); }