Partilhar via


OperationMode Constructor (CacheUsage, TimeSpan, Boolean)

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

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 _
)
'Usage
Dim cacheUsage As CacheUsage
Dim freshness As TimeSpan
Dim allowPartialData As Boolean

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

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.

Remarks

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