Skip to main content

Definition

Assembly: Microsoft.Restier.Core.dll Namespace: Microsoft.Restier.Core.Submit Inheritance: Microsoft.Restier.Core.Submit.DataModificationItem

Syntax

Microsoft.Restier.Core.Submit.DataModificationItem<T>

Summary

Represents a data modification item in a change set.

Type Parameters

  • T - The resource type.

Constructors

.ctor

Initializes a new instance of the DataModificationItem`1 class.

Syntax

public DataModificationItem(string resourceSetName, System.Type expectedResourceType, System.Type actualResourceType, Microsoft.Restier.Core.RestierEntitySetOperation action, System.Collections.Generic.IReadOnlyDictionary<string, object> resourceKey, System.Collections.Generic.IReadOnlyDictionary<string, object> originalValues, System.Collections.Generic.IReadOnlyDictionary<string, object> localValues)

Parameters

NameTypeDescription
resourceSetNamestringThe name of the resource set in question.
expectedResourceTypeSystem.TypeThe type of the expected resource type in question.
actualResourceTypeSystem.TypeThe type of the actual resource type in question.
actionMicrosoft.Restier.Core.RestierEntitySetOperationThe RestierEntitySetOperations for the request.
resourceKeySystem.Collections.Generic.IReadOnlyDictionary<string, object>The key of the resource being modified.
originalValuesSystem.Collections.Generic.IReadOnlyDictionary<string, object>Any original values of the resource that are known.
localValuesSystem.Collections.Generic.IReadOnlyDictionary<string, object>The local values of the entity.

.ctor Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Initializes a new instance of the DataModificationItem class.

Syntax

public DataModificationItem(string resourceSetName, System.Type expectedResourceType, System.Type actualResourceType, Microsoft.Restier.Core.RestierEntitySetOperation action, System.Collections.Generic.IReadOnlyDictionary<string, object> resourceKey, System.Collections.Generic.IReadOnlyDictionary<string, object> originalValues, System.Collections.Generic.IReadOnlyDictionary<string, object> localValues)

Parameters

NameTypeDescription
resourceSetNamestringThe name of the resource set in question.
expectedResourceTypeSystem.TypeThe type of the expected resource type in question.
actualResourceTypeSystem.TypeThe type of the actual resource type in question.
actionMicrosoft.Restier.Core.RestierEntitySetOperationThe RestierEntitySetOperations for the request.
resourceKeySystem.Collections.Generic.IReadOnlyDictionary<string, object>The key of the resource being modified.
originalValuesSystem.Collections.Generic.IReadOnlyDictionary<string, object>Any original values of the resource that are known.
localValuesSystem.Collections.Generic.IReadOnlyDictionary<string, object>The local values of the resource.

.ctor Inherited

Inherited from Microsoft.Restier.Core.Submit.ChangeSetItem

Syntax

internal ChangeSetItem(Microsoft.Restier.Core.Submit.ChangeSetItemType type)

Parameters

NameTypeDescription
typeMicrosoft.Restier.Core.Submit.ChangeSetItemType-

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

ActualResourceType Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets the name of the actual resource type in question. In type inheritance case, this is different from expectedResourceType

Syntax

public System.Type ActualResourceType { get; private set; }

Property Value

Type: System.Type

ChangeSetItemProcessingStage Inherited

Inherited from Microsoft.Restier.Core.Submit.ChangeSetItem
Gets or sets the dynamic state of this change set item.

Syntax

internal Microsoft.Restier.Core.Submit.ChangeSetItemProcessingStage ChangeSetItemProcessingStage { get; set; }

Property Value

Type: Microsoft.Restier.Core.Submit.ChangeSetItemProcessingStage

EntitySetOperation Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets or sets the action to be taken.

Syntax

public Microsoft.Restier.Core.RestierEntitySetOperation EntitySetOperation { get; set; }

Property Value

Type: Microsoft.Restier.Core.RestierEntitySetOperation

ExpectedResourceType Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets the name of the expected resource type in question.

Syntax

public System.Type ExpectedResourceType { get; private set; }

Property Value

Type: System.Type

IsFullReplaceUpdateRequest Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets or sets a value indicating whether the resource should be fully replaced by the modification.

Syntax

public bool IsFullReplaceUpdateRequest { get; set; }

Property Value

Type: bool

Remarks

If true, all properties will be updated, even if the property isn’t in LocalValues. If false, only properties identified in LocalValues will be updated on the resource.

LocalValues Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets the local values for properties that have changed.

Syntax

public System.Collections.Generic.IReadOnlyDictionary<string, object> LocalValues { get; private set; }

Property Value

Type: System.Collections.Generic.IReadOnlyDictionary<string, object>

Remarks

For entities pending deletion, this property is null.

OriginalValues Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets the original values for properties that have changed.

Syntax

public System.Collections.Generic.IReadOnlyDictionary<string, object> OriginalValues { get; private set; }

Property Value

Type: System.Collections.Generic.IReadOnlyDictionary<string, object>

Remarks

For new entities, this property is null.

Resource

Gets or sets the resource object in question.

Syntax

public T Resource { get; set; }

Property Value

Type: T

Remarks

Initially this will be null, however after the change set has been prepared it will represent the pending resource.

Resource Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets or sets the resource object in question.

Syntax

public object Resource { get; set; }

Property Value

Type: object

Remarks

Initially this will be null, however after the change set has been prepared it will represent the pending resource.

ResourceKey Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets the key of the resource being modified.

Syntax

public System.Collections.Generic.IReadOnlyDictionary<string, object> ResourceKey { get; private set; }

Property Value

Type: System.Collections.Generic.IReadOnlyDictionary<string, object>

ResourceSetName Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets the name of the resource set in question.

Syntax

public string ResourceSetName { get; private set; }

Property Value

Type: string

ServerValues Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Gets the current server values for properties that have changed.

Syntax

public System.Collections.Generic.IReadOnlyDictionary<string, object> ServerValues { get; private set; }

Property Value

Type: System.Collections.Generic.IReadOnlyDictionary<string, object>

Remarks

For new entities, this property is null. For updated entities, it is null until the change set is prepared.

Type Inherited

Inherited from Microsoft.Restier.Core.Submit.ChangeSetItem
Gets the type of this change set item.

Syntax

internal Microsoft.Restier.Core.Submit.ChangeSetItemType Type { get; private set; }

Property Value

Type: Microsoft.Restier.Core.Submit.ChangeSetItemType

Methods

ApplyTo Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Applies the current DataModificationItem’s KeyValues and OriginalValues to the specified query and returns the new query.

Syntax

public System.Linq.IQueryable ApplyTo(System.Linq.IQueryable query)

Parameters

NameTypeDescription
querySystem.Linq.IQueryableThe IQueryable to apply the property values to.

Returns

Type: System.Linq.IQueryable The new IQueryable with the property values applied to it in a Where condition.

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

HasChanged Inherited

Inherited from Microsoft.Restier.Core.Submit.ChangeSetItem
Indicates whether this change set item is in a changed state.

Syntax

public bool HasChanged()

Returns

Type: bool Whether this change set item is in a changed state.

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?

ValidateEtag Inherited

Inherited from Microsoft.Restier.Core.Submit.DataModificationItem
Validate the e-tag via applies the current DataModificationItem’s OriginalValues to the specified query and returns result.

Syntax

public object ValidateEtag(System.Linq.IQueryable query)

Parameters

NameTypeDescription
querySystem.Linq.IQueryableThe IQueryable to apply the property values to.

Returns

Type: object The object is e-tag checked passed.