protected virtual BsonElement GetFieldAsBSON(Row row, Schema.FieldDef field, string targetName) { var name = field.GetBackendNameForTarget(targetName); var fvalue = row.GetFieldValue(field); var value = ConvertCLRtoBSON(fvalue, targetName); return(new BsonElement(name, value)); }
protected virtual BSONElement GetFieldAsBSON(Doc doc, Schema.FieldDef field, string targetName) { var name = field.GetBackendNameForTarget(targetName); var fvalue = doc.GetFieldValue(field); var el = ConvertCLRtoBSON(name, fvalue, targetName); return(el); }