Method StoreUnion
StoreUnion(String, String)
Take union of current set with the specified set and store the result in a new destination set.
Declaration
IDistributedHashSet<T> StoreUnion(string destination, string other)
Parameters
Type | Name | Description |
---|---|---|
System.String | destination | Name of destination set. |
System.String | other | Name of set to compare with. |
Returns
Type | Description |
---|---|
IDistributedHashSet<T> | Interface of destination set handler. |
Examples
The following code sample shows how to get union of a set with another set and store the result in cache.
ICache cache = CacheManager.GetCache("myCache");
string MondayUsersKey = "MondayUsers";
string TuesdayUsersKey = "TuesdayUsers";
IDistributedHashSet<int> set = cache.DataTypeManager.GetHashSet<int>(TuesdayUsersKey);
string unionSet = "UnionSet";
// Set of MondayUsers already exists in cache.
IDistributedHashSet<int> result = set.StoreUnion(unionSet, MondayUsersKey);