/// <summary>
        /// Returns a collection of Table objects filtered by the parent DataSource's name.
        /// </summary>
        /// <param name="dataSourceName"></param>
        /// <returns>TableCollection</returns>
        public TableCollection FilterByDataSource(Microsoft.AnalysisServices.Tabular.DataSource dataSource)
        {
            TableCollection returnTables = new TableCollection();

            foreach (Table table in this)
            {
                if (table.DataSourceName == dataSource.Name)
                {
                    returnTables.Add(table);
                }
            }
            return(returnTables);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the DataSource class using multiple parameters.
 /// </summary>
 /// <param name="parentTabularModel">TabularModel object that the DataSource object belongs to.</param>
 /// <param name="datasource">Tabular Object Model ProviderDataSource object abtstracted by the DataSource class.</param>
 public DataSource(TabularModel parentTabularModel, Microsoft.AnalysisServices.Tabular.DataSource dataSource) : base(dataSource, parentTabularModel)
 {
     _parentTabularModel = parentTabularModel;
     _tomDataSource      = dataSource;
 }