Method FilterKey
FilterKey(Object)
Map will be executed on specified key if true is returned.
Declaration
bool FilterKey(object key)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | Key for filtering |
Returns
Type | Description |
---|---|
System.Boolean | Returns if map has to be applied or not. |
Examples
Following example illustrate the usage of FilterKey.
public class MapReduceKeyFilter : IKeyFilter
{
public bool FilterKey(object key)
{
try
{
if (key.ToString().Contains("hungry"))
{
return true;
}
}
catch (Exception exp)
{
//handle exception
}
return false;
}
}