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 the cache.
ICache cache = CacheManager.GetCache("demoClusteredCache");
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);