DeltaType> Class

Namespace:
Weavy.Web.Api.Models
Assembly:
Weavy.Web.dll

A class the tracks changes (i.e. the Delta) for a particular TEntityType.

public class Delta : DynamicObject where TEntityType : class
Inheritance:
System.Object → Delta

Constructors

Delta() Initializes a new instance of Weavy.Web.Api.Models.Delta%601.
Delta(Type) Initializes a new instance of Weavy.Web.Api.Models.Delta%601.

Properties

EntityType The actual type of the entity for which the changes are tracked.

Methods

Clear() Clears the Delta and resets the underlying Entity.
CopyChangedValues(TEntityType) Copies the changed property values from the underlying entity (accessible via Weavy.Web.Api.Models.Delta%601.GetEntity) to the original entity.
CopyUnchangedValues(TEntityType) Copies the unchanged property values from the underlying entity (accessible via Weavy.Web.Api.Models.Delta%601.GetEntity) to the original entity.
GetChangedProperties(TEntityType) Returns a PropertyDictionary with the Expando properties for this delta.
GetChangedPropertyNames() Returns the Properties that have been modified through this Delta as an enumeration of Property Names
GetEntity() Returns the Weavy.Web.Api.Models.Delta%601.EntityType instance that holds all the changes (and original values) being tracked by this Delta.
GetUnchangedPropertyNames() Returns the Properties that have not been modified through this Delta as an enumeration of Property Names
IsNullable(Type)
Patch(TEntityType) Overwrites the original entity with the changes tracked by this Delta.
Put(TEntityType) Overwrites the original entity with the values stored in this Delta.
TryGetMember(GetMemberBinder, out Object) Overrides the DynamicObject TryGetMember method, so that only the properties of Weavy.Web.Api.Models.Delta%601.EntityType can be got.
TryGetPropertyType(String, out Type) Attempts to get the System.Type of the Property called name from the underlying Entity.
TryGetPropertyValue(String, out Object) Attempts to get the value of the Property called name from the underlying Entity.
TrySetMember(SetMemberBinder, Object) Overrides the DynamicObject TrySetMember method, so that only the properties of Weavy.Web.Api.Models.Delta%601.EntityType can be set.
TrySetPropertyValue(String, Object) Attempts to set the Property called name to the value specified.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(Object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(Object, Nullable, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.