// public methods
        public override BulkWriteResult Execute(MongoConnection connection)
        {
            var serverInstance = connection.ServerInstance;
            if (!serverInstance.Supports(FeatureId.WriteCommands))
            {
                var emulator = new BulkInsertOperationEmulator(_args);
                return emulator.Execute(connection);
            }

            return base.Execute(connection);
        }
Пример #2
0
        // public methods
        public override BulkWriteResult Execute(MongoConnection connection)
        {
            var serverInstance = connection.ServerInstance;

            if (!serverInstance.Supports(FeatureId.WriteCommands))
            {
                var emulator = new BulkInsertOperationEmulator(_args);
                return(emulator.Execute(connection));
            }

            return(base.Execute(connection));
        }