public string GetValueString(object context)
{
string result = Null;
if (context != null && IsScalar)
{
result = scalarType.ToString(field, context);
}
else
{
//Apparently returning "Null" was deemed appropriate if it is null. That is not appropriate for Maps / Lists that cannot be returned as ValueStrings. x`
if (context != null)
{
throw new ArgumentException(string.Format("Cannot GetValueString for field descriptor describing field \"{0}\" which is of type: {1}", this.Name, this.fieldType ?? "OH DEAR THAT VALUE IS NULL."));
}
}
return result;
}