Class SingleColumnRelationship
SingleColumnRelationship object.
Inheritance
SingleColumnRelationship
Assembly: TOMWrapper.dll
Syntax
public sealed class SingleColumnRelationship : Relationship, ICustomTypeDescriptor, INotifyPropertyChanging, ITabularNamedObject, INamedObject, IComparable, IAnnotationObject, IExtendedPropertyObject, ITabularObject, INotifyPropertyChanged, ITomErrorMessageObject, IClonableObject
Properties
FromCardinality
Indicates whether the "From" end of the relationship has a cardinality of One (1) or Many (2).
Declaration
public RelationshipEndCardinality FromCardinality { get; set; }
Property Value
FromColumn
Gets or sets the starting column in a single column relationship.
Declaration
[TypeConverter(typeof(ColumnConverter))]
public Column FromColumn { get; set; }
Property Value
ID
Declaration
public string ID { get; }
Property Value
Name
The name of this object. Warning: Changing the name can break formula logic, if Automatic Formula Fix-up is disabled.
Declaration
public override string Name { get; set; }
Property Value
Overrides
Parent
The parent Model of the current Single Column Relationship.
Declaration
public Model Parent { get; }
Property Value
ToCardinality
Indicates whether the "To" end of the relationship has a cardinality of One (1) or Many (2).
Declaration
public RelationshipEndCardinality ToCardinality { get; set; }
Property Value
ToColumn
Gets or sets the destination column in a single column relationship.
Declaration
[TypeConverter(typeof(ColumnConverter))]
public Column ToColumn { get; set; }
Property Value
Methods
Clone(string)
Creates an exact copy of this SingleColumnRelationship object.
Declaration
public SingleColumnRelationship Clone(string newName = null)
Parameters
Type |
Name |
Description |
string |
newName |
|
Returns
CreateNew(Model, string)
Creates a new SingleColumnRelationship and adds it to the parent Model.
Also creates the underlying metadataobject and adds it to the TOM tree.
Declaration
public static SingleColumnRelationship CreateNew(Model parent, string name = null)
Parameters
Returns
GetArrow()
Declaration
Returns
GetCardinalitySymbol(RelationshipEndCardinality)
Declaration
public static string GetCardinalitySymbol(RelationshipEndCardinality cardinality)
Parameters
Returns
GetMessages()
Declaration
public IEnumerable<DocumentMessage> GetMessages()
Returns
OnPropertyChanged(string, object, object)
Fired after a property is changed
Declaration
protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue)
Parameters
Overrides
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 override 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.
|
Overrides
ToString()
Declaration
public override string ToString()
Returns
Overrides
Implements
Extension Methods