A Child model for demonstrating SuperModel and associations (with Parent). Not a human child.
More...
|
|
| Child () |
| | Child Constructor.
|
| Child | withChanges (double? tally=null, double? power=null, int? level=null, long? updatedAtMs=null) |
| | Creates a new instance with modified properties, leaving unspecified properties unchanged.
|
| | 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.
|
|
|
string | id [get, set] |
| | The unique identifier.
|
|
int? | parentId [get, set] |
| | The identifier of the Parent entity to which this Child belongs.
|
|
Parent? | Parent [get, set] |
| | The Parent association model property.
|
|
ChildDetail? | Detail [get, set] |
| | The Detail association model property.
|
|
double? | tally [get, set] |
| | The tally attribute of the Child model.
|
|
double? | power [get, set] |
| | The power attribute of the Child model.
|
|
int | level [get, set] |
| | The level attribute of the Child model.
|
|
long | updatedAtMs [get, set] |
| | A timestamp representing when this model was last updated, in milliseconds since 1970.
|
|
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 |
A Child model for demonstrating SuperModel and associations (with Parent). Not a human child.
◆ withChanges()
| Child Buzzware.Cascade.Testing.Child.withChanges |
( |
double? | tally = null, |
|
|
double? | power = null, |
|
|
int? | level = null, |
|
|
long? | updatedAtMs = null ) |
|
inline |
Creates a new instance with modified properties, leaving unspecified properties unchanged.
- Parameters
-
| tally | tally |
| power | power |
| level | level |
| updatedAtMs | updatedAtMs |
- Returns
- A new instance with updated properties
The documentation for this class was generated from the following file:
- Buzzware.Cascade/Testing/Child.cs