public object GetObject(object contextObject)
{
try
{
return field.GetValue(contextObject);
}
catch (Exception e)
{
// TODO: CONSIDER AN EXCEPTION HERE INSTEAD OF A NULL.
Debug.WriteLine(String.Format("cannot get value for field {0} due to exception: {1}", field.Name, e.Message));
return null;
}
}