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