MongoDB.Bson.Serialization.IdGenerators.BsonObjectIdGenerator.IsEmpty C# (CSharp) Method

IsEmpty() public method

Tests whether an Id is empty.
public IsEmpty ( object id ) : bool
id object The Id.
return bool
        public bool IsEmpty(object id)
        {
            return id == null || ((BsonValue)id).IsBsonNull || ((BsonObjectId)id).Value == ObjectId.Empty;
        }
    }