示例#1
0
        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));
        }
示例#2
0
        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);
        }