TagExtensionsHasTags Method

ScaleOut Software NamedCache API
Determines whether the cachedObject specified has all of the tags specified in tagsSet set while at the same time, none of the tags specified in tagsNotSet are set.

Namespace:  Soss.Client
Assembly:  soss_namedcache (in soss_namedcache.dll) Version: 6.2.0.0
Syntax

public static bool HasTags(
	this ITaggable cachedObject,
	IEnumerable<string> tagsSet,
	IEnumerable<string> tagsNotSet
)

Parameters

cachedObject
Type: Soss.ClientITaggable
The cached object to check.
tagsSet
Type: System.Collections.GenericIEnumerableString
The list of tag names that must be present in cachedObject's tags in order for this method to return true. You may use the value null to indicate an empty list.
tagsNotSet
Type: System.Collections.GenericIEnumerableString
The list of tag names that must not be present in cachedObject's tags in order for this method to return true. You may use the value null to indicate an empty list.

Return Value

Type: Boolean
true if all of the tags given by tagsSet are present in cachedObject's tag list and none of the tags given by tagsNotSet are in cachedObject's tag list.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ITaggable. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks

Specifying overlapping lists of tags in tagsSet and tagsNotSet always returns false.

Specifying empty lists of tags for both tagsSet and tagsNotSet always returns true.

See Support for Tags for an overview of using this method and the use of the ITaggable interface.

This method may also be used in where-clause expressions for evaluation on the server. See Querying Tags for an overview of querying for specific tags within a LINQ where-clause.

See Also

Reference