using Microsoft.Reporting.WebForms; using System; using System.Collections.Generic; namespace Vrh.Web.OneReport.ReportViewerForMvc { /// /// ReportDataSourceCollectionExtensions helpers for ReportViewerForMvc /// public static class ReportDataSourceCollectionExtensions { /// /// Adds the elements of the specified collection to the end of the ReportDataSourceCollection. /// /// The ReportDataSourceCollection that this method extends. /// The collection whose elements should be added to the end of the ReportDataSourceCollection. public static void Add(this ReportDataSourceCollection reportDataSourceCollection, IEnumerable collection) { if (reportDataSourceCollection == null) { throw new ArgumentNullException("reportDataSourceCollection", "Value cannot be null."); } if (collection == null) { throw new ArgumentNullException("collection", "Value cannot be null."); } foreach (ReportDataSource reportDataSource in collection) { reportDataSourceCollection.Add(reportDataSource); } } } }