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
fTitleKey
Field
protected string fTitleKey
Field Value
Properties
IsSerializable
Gets a value indicating whether this descriptor should be serialized.
[JsonIgnore]
public virtual bool IsSerializable { get; }
Property Value
IsTitleKeyEmpty
Gets a value indicating whether the title key is empty.
[JsonIgnore]
public virtual bool IsTitleKeyEmpty { get; }
Property Value
Name
Gets or sets the descriptor name.
public virtual string Name { get; set; }
Property Value
Tag
Gets or sets a user-defined value associated with this descriptor.
[JsonIgnore]
public virtual object Tag { get; set; }
Property Value
Title
Gets the localized descriptor title.
[JsonIgnore]
public virtual string Title { get; }
Property Value
TitleKey
Gets or sets the localization key used for the descriptor title.
public virtual string TitleKey { get; set; }
Property Value
Methods
Assign(IDef)
Assigns property values from a source descriptor.
public virtual void Assign(IDef Source)
Parameters
SourceIDef
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
CreateNew()
Creates a new instance of the same descriptor type.
public virtual BaseDef CreateNew()
Returns
GetTitleKey()
Returns the effective title key.
protected virtual string GetTitleKey()
Returns
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
PropertyNamestring
SplitTitleKeyToWordsWithPluralEnding()
Converts the title key to a plural, word-split form and returns it.
public virtual string SplitTitleKeyToWordsWithPluralEnding()
Returns
ToString()
Returns the descriptor name.
public override string ToString()
Returns
UpdateReferences()
Updates internal references after loading or assignment.
public virtual void UpdateReferences()
Events
PropertyChanged
Occurs when a property value changes.
public event PropertyChangedEventHandler PropertyChanged