Share via


DataCache.GetObjectsByAnyTag Method

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Gets an enumerable list of all cached objects in the specified region that have any of the same tags in common.

Namespace: Microsoft.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)

Syntax

'Declaration
Public Function GetObjectsByAnyTag ( _
    tags As List(Of DataCacheTag), _
    region As String _
) As IEnumerable(Of KeyValuePair(Of String, Object))
'Usage
Dim instance As DataCache
Dim tags As List(Of DataCacheTag)
Dim region As String
Dim returnValue As IEnumerable(Of KeyValuePair(Of String, Object))

returnValue = instance.GetObjectsByAnyTag(tags, region)
public IEnumerable<KeyValuePair<string,Object>> GetObjectsByAnyTag (
    List<DataCacheTag> tags,
    string region
)
public:
IEnumerable<KeyValuePair<String^, Object^>>^ GetObjectsByAnyTag (
    List<DataCacheTag^>^ tags, 
    String^ region
)
public IEnumerable<KeyValuePair<String,Object>> GetObjectsByAnyTag (
    List<DataCacheTag> tags, 
    String region
)
public function GetObjectsByAnyTag (
    tags : List<DataCacheTag>, 
    region : String
) : IEnumerable<KeyValuePair<String,Object>>

Parameters

  • tags
    A list of tags for which to search.
  • region
    The name of the region to search. Tags are not supported outside regions. Therefore, a region name is required.

Return Value

An enumerable list of all cached objects in the specified region that have any of the same tags in common. Null is returned if no objects in the specified region have any of the tags specified.

Remarks

Cached objects returned in the enumerator may only have some of the tags listed in the tags array parameter. If you want an enumerator to list only objects that have all the tags listed in the tags array parameter, use the GetObjectsByAllTags method.

Tags are supported only for objects stored in regions.

See Also

Reference

DataCache Class
DataCache Members
Microsoft.Data.Caching Namespace