Esempio n. 1
0
        protected virtual bool SetAmorphousFieldAsCLR(IAmorphousData amorph, BsonElement bsonElement, string targetName)
        {
            object clrValue;

            if (!TryConvertBSONtoCLR(typeof(object), bsonElement.Value, targetName, out clrValue))
            {
                return(false);
            }
            amorph.AmorphousData[bsonElement.Name] = clrValue;
            return(true);
        }
Esempio n. 2
0
 protected virtual bool SetAmorphousFieldAsCLR(IAmorphousData amorph, BSONElement bsonElement, string targetName, Func<BSONDocument, BSONElement, bool> filter)
 {
   object clrValue;
   if (!TryConvertBSONtoCLR(typeof(object), bsonElement, targetName, out clrValue, filter)) return false;
   amorph.AmorphousData[bsonElement.Name] = clrValue;   
   return true;
 }