Table of Contents

Class BaseDef

Namespace
Tripous
Assembly
Tripous.dll

Base class for all descriptor classes.

public class BaseDef : IDef, IJsonLoadable, INotifyPropertyChanged
Inheritance
BaseDef
Implements
Derived
Inherited Members
Extension Methods

Constructors

BaseDef()

Constructor.

public BaseDef()

Fields

fName

Field

protected string fName

Field Value

string

fTitleKey

Field

protected string fTitleKey

Field Value

string

Properties

IsSerializable

Gets a value indicating whether this descriptor should be serialized.

[JsonIgnore]
public virtual bool IsSerializable { get; }

Property Value

bool

IsTitleKeyEmpty

Gets a value indicating whether the title key is empty.

[JsonIgnore]
public virtual bool IsTitleKeyEmpty { get; }

Property Value

bool

Name

Gets or sets the descriptor name.

public virtual string Name { get; set; }

Property Value

string

Tag

Gets or sets a user-defined value associated with this descriptor.

[JsonIgnore]
public virtual object Tag { get; set; }

Property Value

object

Title

Gets the localized descriptor title.

[JsonIgnore]
public virtual string Title { get; }

Property Value

string

TitleKey

Gets or sets the localization key used for the descriptor title.

public virtual string TitleKey { get; set; }

Property Value

string

Methods

Assign(IDef)

Assigns property values from a source descriptor.

public virtual void Assign(IDef Source)

Parameters

Source IDef

CheckDescriptor()

Checks whether this descriptor is fully defined. Throws an exception when required values are missing.

public virtual void CheckDescriptor()

Clear()

Clears this descriptor by assigning values from a new empty instance.

public virtual void Clear()

Clone()

Returns a clone of this descriptor.

public virtual IDef Clone()

Returns

IDef

CreateNew()

Creates a new instance of the same descriptor type.

public virtual BaseDef CreateNew()

Returns

BaseDef

GetTitleKey()

Returns the effective title key.

protected virtual string GetTitleKey()

Returns

string

JsonLoaded()

Called after this instance is loaded from JSON.

public virtual void JsonLoaded()

NotifyPropertyChanged(string)

Raises the PropertyChanged event.

protected virtual void NotifyPropertyChanged(string PropertyName)

Parameters

PropertyName string

SplitTitleKeyToWordsWithPluralEnding()

Converts the title key to a plural, word-split form and returns it.

public virtual string SplitTitleKeyToWordsWithPluralEnding()

Returns

string

ToString()

Returns the descriptor name.

public override string ToString()

Returns

string

UpdateReferences()

Updates internal references after loading or assignment.

public virtual void UpdateReferences()

Events

PropertyChanged

Occurs when a property value changes.

public event PropertyChangedEventHandler PropertyChanged

Event Type

PropertyChangedEventHandler