using System;
using System.Collections.Generic;
using Microsoft.AnalysisServices.Tabular;
using Tom=Microsoft.AnalysisServices.Tabular;
namespace BismNormalizer.TabularCompare.TabularMetadata
{
///
/// Abstraction of a tabular model DataSource with properties and methods for comparison purposes.
///
public class DataSource : TabularObject
{
private TabularModel _parentTabularModel;
private Microsoft.AnalysisServices.Tabular.DataSource _tomDataSource;
///
/// Initializes a new instance of the DataSource class using multiple parameters.
///
/// TabularModel object that the DataSource object belongs to.
/// Tabular Object Model ProviderDataSource object abtstracted by the DataSource class.
public DataSource(TabularModel parentTabularModel, Microsoft.AnalysisServices.Tabular.DataSource dataSource) : base(dataSource, parentTabularModel)
{
_parentTabularModel = parentTabularModel;
_tomDataSource = dataSource;
}
///
/// TabularModel object that the DataSource object belongs to.
///
public TabularModel ParentTabularModel => _parentTabularModel;
///
/// Tabular Object Model ProviderDataSource object abtstracted by the DataSource class.
///
public Tom.DataSource TomDataSource => _tomDataSource;
public override string ToString() => this.GetType().FullName;
}
}