Table of Contents

Class TabularObject

Inheritance
TabularObject
Implements
Derived
Inherited Members
Namespace
TabularEditor.TOMWrapper
Assembly
TOMWrapper.dll

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.

public abstract class TabularObject : DynamicPropertyObject, ICustomTypeDescriptor, ITabularObject, INotifyPropertyChanged, INotifyPropertyChanging
Extension Methods

Properties

IsRemoved

[Browsable(false)]
public bool IsRemoved { get; }

Property Value

Type Description
bool

MetadataObject

protected MetadataObject MetadataObject { get; set; }

Property Value

Type Description
MetadataObject

Model

The model this object belongs to.

[Browsable(false)]
public Model Model { get; }

Property Value

Type Description
Model

ObjectType

The type of this object (Folder, Measure, Table, etc.).

[Browsable(false)]
public virtual ObjectType ObjectType { get; }

Property Value

Type Description
ObjectType

ObjectTypeName

The type name of this object ("Folder", "Measure", "Table", etc.).

public virtual string ObjectTypeName { get; }

Property Value

Type Description
string

Methods

Children_CollectionChanged(object, NotifyCollectionChangedEventArgs)

protected virtual void Children_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)

Parameters

Type Name Description
object sender
NotifyCollectionChangedEventArgs e

CustomReinit()

protected virtual void CustomReinit()

Init()

Derived members should override this method to instantiate child objects

protected virtual void Init()

OnPropertyChanged(string, object, object)

Fired after a property is changed

protected virtual void OnPropertyChanged(string propertyName, object oldValue, object newValue)

Parameters

Type Name Description
string propertyName
object oldValue
object newValue

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.

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)

protected void SetValue(object org, object value, Action<object> setter, string propertyName = null)

Parameters

Type Name Description
object org
object value
Action<object> setter
string propertyName

SetValue<T>(T, T, Action<T>, string)

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 Description
bool

Type Parameters

Name Description
T

Events

PropertyChanged

public event PropertyChangedEventHandler PropertyChanged

Event Type

Type Description
PropertyChangedEventHandler

PropertyChanging

public event PropertyChangingEventHandler PropertyChanging

Event Type

Type Description
PropertyChangingEventHandler