Share via


Delta<T> Class

Definition

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

[Microsoft.AspNetCore.OData.Abstracts.NonValidatingParameterBinding]
public class Delta<T> : Microsoft.AspNetCore.OData.Deltas.Delta, Microsoft.AspNetCore.OData.Deltas.ITypedDelta where T : class
[<Microsoft.AspNetCore.OData.Abstracts.NonValidatingParameterBinding>]
type Delta<'T (requires 'T : null)> = class
    inherit Delta
    interface IDelta
    interface IDeltaSetItem
    interface ITypedDelta
Public Class Delta(Of T)
Inherits Delta
Implements ITypedDelta

Type Parameters

T

T is the type of the instance this delta tracks changes for.

Inheritance
Delta<T>
Derived
Attributes
Implements

Constructors

Delta<T>()

Initializes a new instance of Delta<T>.

Delta<T>(Type, IEnumerable<String>, PropertyInfo)

Initializes a new instance of Delta<T>.

Delta<T>(Type, IEnumerable<String>)

Initializes a new instance of Delta<T>.

Delta<T>(Type)

Initializes a new instance of Delta<T>.

Properties

ExpectedClrType

Gets the expected type of the entity for which the changes are tracked.

Kind

Gets the delta item kind.

StructuredType

Gets the actual type of the structural object for which the changes are tracked.

Methods

Clear()

Clears the IDelta.

CopyChangedValues(T)

Copies the changed property values from the underlying entity (accessible via GetInstance()) to the original entity recursively.

CopyUnchangedValues(T)

Copies the unchanged property values from the underlying entity (accessible via GetInstance()) to the original entity.

GetChangedPropertyNames()

Returns the known properties that have been modified through this Delta as an IEnumerable<T> of property Names. Includes the structural properties at current level. Does not include the names of the changed dynamic properties.

GetInstance()

Returns the instance that holds all the changes (and original values) being tracked by this Delta.

GetUnchangedPropertyNames()

Returns the known properties that have not been modified through this Delta as an IEnumerable<T> of property Names. Does not include the names of the changed dynamic properties.

Patch(T)

Overwrites the original entity with the changes tracked by this Delta. The semantics of this operation are equivalent to a HTTP PATCH operation, hence the name.

Put(T)

Overwrites the original entity with the values stored in this Delta. The semantics of this operation are equivalent to a HTTP PUT operation, hence the name.

TryGetMember(GetMemberBinder, Object)

Overrides the DynamicObject TryGetMember method, so that only the properties of Entity can be got.

(Inherited from Delta)
TryGetPropertyType(String, Type)

Attempts to get the Type of the Property called name from the underlying Entity.

TryGetPropertyValue(String, 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 Entity can be set.

(Inherited from Delta)
TrySetPropertyValue(String, Object)

Attempts to set the Property called name to the value specified.

Applies to