The container for any types of data. This class implements INotifyPropertyChanged to allow observers to be notified when the underlying fact changes. It also includes a unique identifier (Id) to ensure that each Fact instance can be uniquely identified.
More...
|
| | Fact (T data) |
| | The constructor initializes a new instance of the Fact class with the specified data. It assigns the provided data to the Value property, which in turn sets the underlying fact and raises the PropertyChanged event if necessary.
|
| T | TValue< T > () |
| | A helper method that retrieves the underlying fact value as a specific type T.
|
| override bool | Equals (object? obj) |
| | The Equals method is overridden to provide a way to compare two Fact instances for equality. Two Fact instances are considered equal if they have the same unique identifier (Id). This means that even if two Fact instances contain the same underlying data, they will be treated as distinct unless they share the same Id.
|
| override int | GetHashCode () |
| | Returns a hash code for this instance, which is based on the unique identifier (Id) of the fact.
|
| override string | ToString () |
| | The override of the ToString method provides a string representation of the Fact instance.
|
|
| void | OnPropertyChanged ([CallerMemberName] string? propertyName=null) |
| | When a property value changes, this method is called to raise the PropertyChanged event. The CallerMemberName attribute allows the caller to omit the property name when calling this method, as it will automatically use the name of the calling property.
|
|
| Guid | Id = Guid.NewGuid() [get] |
| | A unique identifier.
|
|
T | Value [get, set] |
| | The templated value of this fact.
|
| object | UnderlyingObject [get] |
| | The data stored as an object type.
|
| Type | DataType [get] |
| | The type of the data stored in this fact. This property returns the Type object representing the generic type parameter T, which indicates the actual type of the data contained in this fact.
|
|
|
PropertyChangedEventHandler | PropertyChanged |
| | The PropertyChanged event is raised whenever a property value changes. Observers can subscribe to this event to be notified of changes to the properties of this class. The event handler receives the name of the property that changed, enabling observers to react.
|
The container for any types of data. This class implements INotifyPropertyChanged to allow observers to be notified when the underlying fact changes. It also includes a unique identifier (Id) to ensure that each Fact instance can be uniquely identified.
◆ Equals()
| override bool ReteCore.Fact< T >.Equals |
( |
object? | obj | ) |
|
The Equals method is overridden to provide a way to compare two Fact instances for equality. Two Fact instances are considered equal if they have the same unique identifier (Id). This means that even if two Fact instances contain the same underlying data, they will be treated as distinct unless they share the same Id.
- Parameters
-
- Returns
◆ Fact()
| ReteCore.Fact< T >.Fact |
( |
T | data | ) |
|
The constructor initializes a new instance of the Fact class with the specified data. It assigns the provided data to the Value property, which in turn sets the underlying fact and raises the PropertyChanged event if necessary.
- Parameters
-
◆ GetHashCode()
| override int ReteCore.Fact< T >.GetHashCode |
( |
| ) |
|
Returns a hash code for this instance, which is based on the unique identifier (Id) of the fact.
- Returns
- The unique hash code
◆ OnPropertyChanged()
| void ReteCore.Fact< T >.OnPropertyChanged |
( |
[CallerMemberName] string? | propertyName = null | ) |
|
|
protected |
When a property value changes, this method is called to raise the PropertyChanged event. The CallerMemberName attribute allows the caller to omit the property name when calling this method, as it will automatically use the name of the calling property.
- Parameters
-
◆ ToString()
| override string ReteCore.Fact< T >.ToString |
( |
| ) |
|
The override of the ToString method provides a string representation of the Fact instance.
- Returns
- The string representation of the contents.
◆ TValue< T >()
| T ReteCore.Fact< T >.TValue< T > |
( |
| ) |
|
A helper method that retrieves the underlying fact value as a specific type T.
- Template Parameters
-
- Returns
- The templated type
◆ DataType
| Type ReteCore.Fact< T >.DataType |
|
get |
The type of the data stored in this fact. This property returns the Type object representing the generic type parameter T, which indicates the actual type of the data contained in this fact.
Implements ReteCore.IFact.
◆ Id
| Guid ReteCore.Fact< T >.Id = Guid.NewGuid() |
|
get |
◆ UnderlyingObject
| object ReteCore.Fact< T >.UnderlyingObject |
|
get |
The documentation for this class was generated from the following file: