• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Method Extract

Extract(Object)

This method takes in an Object and contains the logic to extract meaningful information/ attributes from the object like the Mapper does in MapReduce. The returned value may also be null.

Declaration
object Extract(object value)
Parameters
Type Name Description
System.Object value

Value / Object

Returns
Type Description
System.Object

Returns the extracted value, which can also be null.

Examples

Following example demonstrates the implementation of Extract.

public object Extract(object value)
{
   try
   {
      if (value.GetType() == typeof(int))
       {
           return 0;
       }
      if (value.GetType() == typeof(float))
       {
           return 0.0;
       }
   }
   catch (Exception e)
   {
      //handle exception
   }
   return value;
}
Back to top Copyright © 2017 Alachisoft