public override void PublishReports(string srcFolder, string destFolder)
        {
            var di    = new DirectoryInfo(srcFolder);
            var files = di.GetFiles("*.rdl")
                        .Concat(di.GetFiles("*.rsmobile"))
                        .Concat(di.GetFiles("*.kpi"))
                        .Concat(di.GetFiles("*.pbix"));

            foreach (FileInfo fi in files)
            {
                var displayName = fi.Name.Substring(0, fi.Name.IndexOf(fi.Extension));
                var reportPath  = PublishReport(fi.FullName, displayName, destFolder);
                switch (fi.Extension)
                {
                case ".rdl":
                    ExistingReports.Add(reportPath);
                    break;

                case ".rsmobile":
                    ExistingMobileReports.Add(reportPath);
                    break;

                case ".kpi":
                    ExistingKpis.Add(reportPath);
                    break;

                case ".pbix":
                    ExistingPowerBIReports.Add(reportPath);
                    isPbiPublished = true;
                    break;
                }
            }
            ;
        }
        private void GetExistingKpis()
        {
            var kpis = GetFolderContent(this.WorkingFolder).Where(x => x.Type == CatalogItemType.Kpi);

            foreach (var kpi in kpis)
            {
                ExistingKpis.Add(kpi.Path);
            }
        }
        public override void PublishReports(string srcFolder, string destFolder)
        {
            var di    = new DirectoryInfo(srcFolder);
            var files = di.GetFiles("*.rdl")
                        .Concat(di.GetFiles("*.rsmobile"))
                        .Concat(di.GetFiles("*.kpi"))
                        .Concat(di.GetFiles("*.pbix"));

            foreach (FileInfo fi in files)
            {
                var displayName = fi.Name.Substring(0, fi.Name.IndexOf(fi.Extension));
                var reportPath  = PublishReport(fi.FullName, displayName, destFolder);
                switch (fi.Extension)
                {
                case ".rdl":
                    ExistingReports.Add(reportPath);
                    break;

                case ".rsmobile":
                    ExistingMobileReports.Add(reportPath);
                    break;

                case ".kpi":
                    ExistingKpis.Add(reportPath);
                    break;

                case ".pbix":
                    if (reportPath.ToLowerInvariant().Contains("embedded"))
                    {
                        SetPbiReportCredentialsForEmbedded(reportPath);
                        ExistingEmbeddedPowerBIReports.Add(reportPath);
                    }
                    else if (reportPath.ToLowerInvariant().Contains("directquery"))
                    {
                        SetPbiReportCredentialsForEmbedded(reportPath);
                        ExistingDirectQueryPowerBIReports.Add(reportPath);
                    }
                    else
                    {
                        SetPbiReportCredentials(reportPath);
                        ExistingPowerBIReports.Add(reportPath);
                    }
                    break;
                }
            }
            ;
        }