public IBsonSerializationOptions GetSerializationOptions(MemberInfo memberInfo)
{
var propertyInfo = memberInfo as PropertyInfo;
if (propertyInfo != null && propertyInfo.PropertyType == _type)
{
return new RepresentationSerializationOptions(_representation);
}
var fieldInfo = memberInfo as FieldInfo;
if (fieldInfo != null && fieldInfo.FieldType == _type)
{
return new RepresentationSerializationOptions(_representation);
}
return null;
}
}