public static ToObject ( BsonValue value ) : object | ||
value | BsonValue | |
return | object |
public object this[int index] { get { return(Actor.ToObject(_array[index])); } set { _array[index] = Actor.ToBsonValue(value); } }
public bool TryGetValue(string key, out object value) { if (_document.TryGetValue(key, out BsonValue value2)) { value = Actor.ToObject(value2); return(true); } else { value = null; return(false); } }
public object this[string key] { get { if (key == null) { throw new ArgumentNullException(nameof(key)); } return(_document.TryGetValue(key, out BsonValue value) ? Actor.ToObject(value) : null); } set { if (key == null) { throw new ArgumentNullException(nameof(key)); } _document.Set(key, Actor.ToBsonValue(value)); } }
object IDictionary.this[object key] { get { if (key == null) { throw new ArgumentNullException(nameof(key)); } return(_document.TryGetValue(key.ToString(), out BsonValue value) ? Actor.ToObject(value) : null); } set { if (key == null) { throw new ArgumentNullException(nameof(key)); } _document.Set(key.ToString(), Actor.ToBsonValue(value)); } }
public object this[object key] { get { if (key == null) { throw new ArgumentNullException("key"); } BsonValue value; return(_document.TryGetValue(key.ToString(), out value) ? Actor.ToObject(value) : null); } set { if (key == null) { throw new ArgumentNullException("key"); } _document.Set(key.ToString(), Actor.ToBsonValue(value)); } }
static Expression ExistsExpression(Expression field, BsonValue args) { return(Expression.Equal( Expression.Call(Data, typeof(BsonDocument).GetMethod("Contains"), field), Expression.Constant(LanguagePrimitives.IsTrue(Actor.ToObject(args)), typeof(bool)))); }