Class TabularObject
Base class for all TOM objects that are wrapped in the TOMWrapper. Supports INotifyPropertyChanged and INotifyPropertyChanging
and undo/redo functionality via the TabularModelHandler. Every TabularObject holds a reference to the corresponding TOM MetadataObject.
A TabularObject cannot exist without a corresponding TOM MetadataObject.
Protected constructor that takes a TOM MetadataObject as argument.
Inheritance
TabularObject
Assembly: TOMWrapper.dll
Syntax
public abstract class TabularObject : DynamicPropertyObject, ICustomTypeDescriptor, ITabularObject, INotifyPropertyChanged, INotifyPropertyChanging
Properties
IsRemoved
Declaration
[Browsable(false)]
public bool IsRemoved { get; }
Property Value
Declaration
protected MetadataObject MetadataObject { get; set; }
Property Value
Type |
Description |
MetadataObject |
|
Model
The model this object belongs to.
Declaration
[Browsable(false)]
public Model Model { get; }
Property Value
ObjectType
The type of this object (Folder, Measure, Table, etc.).
Declaration
[Browsable(false)]
public virtual ObjectType ObjectType { get; }
Property Value
ObjectTypeName
The type name of this object ("Folder", "Measure", "Table", etc.).
Declaration
public virtual string ObjectTypeName { get; }
Property Value
Methods
Children_CollectionChanged(object, NotifyCollectionChangedEventArgs)
Declaration
protected virtual void Children_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
Parameters
CustomReinit()
Declaration
protected virtual void CustomReinit()
Init()
Derived members should override this method to instantiate child objects
Declaration
protected virtual void Init()
OnPropertyChanged(string, object, object)
Fired after a property is changed
Declaration
protected virtual void OnPropertyChanged(string propertyName, object oldValue, object newValue)
Parameters
OnPropertyChanging(string, object, ref bool, ref bool)
Called before a property is changed on an object. Derived classes can control how the change is handled.
Throw ArgumentException within this method, to display an error message in the UI.
Declaration
protected virtual void OnPropertyChanging(string propertyName, object newValue, ref bool undoable, ref bool cancel)
Parameters
Type |
Name |
Description |
string |
propertyName |
Name of the changed property.
|
object |
newValue |
New value assigned to the property.
|
bool |
undoable |
Return false if automatic undo of the property change is not needed.
|
bool |
cancel |
Return true if the property change should not apply.
|
SetValue(object, object, Action<object>, string)
Declaration
protected void SetValue(object org, object value, Action<object> setter, string propertyName = null)
Parameters
SetValue<T>(T, T, Action<T>, string)
Declaration
protected bool SetValue<T>(T org, T value, Action<T> setter, string propertyName = null)
Parameters
Type |
Name |
Description |
T |
org |
|
T |
value |
|
Action<T> |
setter |
|
string |
propertyName |
|
Returns
Type Parameters
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
PropertyChanging
Declaration
public event PropertyChangingEventHandler PropertyChanging
Event Type
Implements
Extension Methods