Represents a Thing entity in the application, inheriting from SuperModel.
More...
|
| | Thing (Thing? proxyFor=null) |
| | Thing Constructor. Initializes a new Thing instance with an optional proxyFor parameter. Allows the entity to proxy for another Thing instance.
|
|
| Thing () |
| | Thing Constructor. Initializes a new Thing instance when deserializing from JSON.
|
| | SuperModel (SuperModel? proxyFor=null) |
| | Initializes a new instance of the SuperModel with an optional proxy model.
|
| void | __SetProxyFor (SuperModel? value, bool keepChanges, bool raiseIncoming) |
| | Sets a new proxy model and optionally retains changes or raises property change events.
|
| IDictionary< string, object?> | __GetChanges () |
| | When acting as a proxy to another object, this method returns changes that have been made on this object vs the proxied object.
|
| void | __ApplyChanges (IDictionary< string, object?> changes) |
| | Applies a set of changes to the properties of the model.
|
|
void | __ClearChanges () |
| | Clears all changes made to the model, resetting the property state to the proxy model values.
|
| void | __mutateWith (Action< SuperModel > action) |
| | Executes an action that mutates the model, restoring the original mutation state afterwards.
|
| void | RaisePropertyChanged ([CallerMemberName] string propertyName=null) |
| | Raises a property changed notification for the specified property name.
|
| SuperModel | Clone (IDictionary< string, object?>? changes=null) |
| | Creates a shallow copy of the current SuperModel, optionally applying additional property changes.
|
|
|
int | id [get, set] |
| | A unique identifier for the Thing instance, marked with a CascadeId for internal referencing.
|
|
string? | name [get, set] |
| | The name property represents the name of the Thing.
|
|
string? | colour [get, set] |
| | The colour property indicates the color attribute of the Thing.
|
|
bool | __mutable [get, set] |
| | Gets or sets the mutable state of the model. When false, attempting to modify properties will throw a MutationAttemptException.
|
|
SuperModel? | __ProxyFor [get] |
| | The proxy model that this model is currently proxying for, if any.
|
|
bool | __HasChanges [get] |
| | True if there are any uncommitted property changes in this model.
|
|
| bool | SetProperty< T > (ref T backingStore, T value, [CallerMemberName] string propertyName="", Action onChanged=null) |
| | Sets a property value and raises property change notifications if the value has changed.
|
| T | GetProperty< T > (ref T backingStore, [CallerMemberName] string propertyName="", Action onChanged=null) |
| | Gets a property value, taking into account whether it's overridden by a proxy.
|
| virtual void | OnPropertyChanged (PropertyChangedEventArgs args) |
| | Raises the PropertyChanged event with the provided arguments.
|
| void | OnProxyForOnPropertyChanged (object sender, PropertyChangedEventArgs e) |
| | Handles property change events from the proxy model and re-raises them for this model.
|
|
SuperModel? | _proxyFor |
|
readonly ConcurrentDictionary< string, bool > | _propertySet = new ConcurrentDictionary<string, bool>() |
|
PropertyChangedEventHandler? | PropertyChanged |
Represents a Thing entity in the application, inheriting from SuperModel.
◆ Thing()
| Buzzware.Cascade.Testing.Thing.Thing |
( |
Thing? | proxyFor = null | ) |
|
|
inline |
Thing Constructor. Initializes a new Thing instance with an optional proxyFor parameter. Allows the entity to proxy for another Thing instance.
- Parameters
-
| proxyFor | An optional Thing instance that this Thing can act as a proxy for. Default is null for non-proxy instances. |
The documentation for this class was generated from the following file:
- Buzzware.Cascade/Testing/Thing.cs