Compartilhar via


OperationMode Constructor (CacheUsage, TimeSpan, Boolean, Boolean)

Creates a new operation mode with specified cache usage, freshness criterion, and optionally accepting partial data and ignoring conflicts.

Namespace:  Microsoft.BusinessData.Runtime
Assembly:  Microsoft.BusinessData (in Microsoft.BusinessData.dll)

Syntax

'Declaration
Public Sub New ( _
    cacheUsage As CacheUsage, _
    freshness As TimeSpan, _
    allowPartialData As Boolean, _
    doNotDetectConflicts As Boolean _
)
'Usage
Dim cacheUsage As CacheUsage
Dim freshness As TimeSpan
Dim allowPartialData As Boolean
Dim doNotDetectConflicts As Boolean

Dim instance As New OperationMode(cacheUsage, _
    freshness, allowPartialData, doNotDetectConflicts)
public OperationMode(
    CacheUsage cacheUsage,
    TimeSpan freshness,
    bool allowPartialData,
    bool doNotDetectConflicts
)

Parameters

  • freshness
    Type: System.TimeSpan

    The attempted freshness. This value is ignored if CacheUsage is set to Online.

  • allowPartialData
    Type: System.Boolean

    Whether to allow partial data or not. This value is ignored if CacheUsage is set to Online.

  • doNotDetectConflicts
    Type: System.Boolean

    Whether to ignore conflicts or not.

Remarks

Conflicts are detected by invoking SpecificFinder before an update operation to check if the external item has been modified since it was last read. The following example illustrates the use of allowPartialData. A Finder populates the cache with some of the fields of the external item. A SpecificFinder is then called, which requires more fields. If allowPartialData is set to true, the entry is returned directly from the cache. If allowPartialData is set to false, this data will be considered incomplete as it does not contain all field values, and a call is made to the external system instance to retrieve the remaining field values in Cached mode, and no data will be returned in Offline mode.

See Also

Reference

OperationMode Class

OperationMode Members

OperationMode Overload

Microsoft.BusinessData.Runtime Namespace