public Contains ( BsonValue value ) : bool | ||
value | BsonValue | The value to test for. |
리턴 | bool |
public override bool Contains(BsonValue value)
{
ThrowIfDisposed();
using (var bsonReader = new BsonBinaryReader(new BsonBuffer(CloneSlice(), false), true, _readerSettings))
{
bsonReader.ReadStartDocument();
while (bsonReader.ReadBsonType() != BsonType.EndOfDocument)
{
bsonReader.SkipName();
if (DeserializeBsonValue(bsonReader).Equals(value))
{
return true;
}
}
bsonReader.ReadEndDocument();
return false;
}
}