コード例 #1
0
    public MySqlClientSqlCommandSet(int batchSize) {
      instance = Activator.CreateInstance(sqlCmdSetType, true);
      doInitialise = (InitialiseCommand)Delegate.CreateDelegate(typeof(InitialiseCommand), instance, "InitializeBatching");
      batchSizeSetter = (PropSetter<int>)Delegate.CreateDelegate(typeof(PropSetter<int>), instance, "set_UpdateBatchSize");
      doAppend = (AppendCommand)Delegate.CreateDelegate(typeof(AppendCommand), instance, "AddToBatch");
      doExecuteNonQuery = (ExecuteNonQueryCommand)Delegate.CreateDelegate(typeof(ExecuteNonQueryCommand), instance, "ExecuteBatch");
      doDispose = (DisposeCommand)Delegate.CreateDelegate(typeof(DisposeCommand), instance, "Dispose");

      Initialise(batchSize);
    }
コード例 #2
0
        public MySqlClientSqlCommandSet(int batchSize)
        {
            instance          = Activator.CreateInstance(sqlCmdSetType, true);
            doInitialise      = (InitialiseCommand)Delegate.CreateDelegate(typeof(InitialiseCommand), instance, "InitializeBatching");
            batchSizeSetter   = (PropSetter <int>)Delegate.CreateDelegate(typeof(PropSetter <int>), instance, "set_UpdateBatchSize");
            doAppend          = (AppendCommand)Delegate.CreateDelegate(typeof(AppendCommand), instance, "AddToBatch");
            doExecuteNonQuery = (ExecuteNonQueryCommand)Delegate.CreateDelegate(typeof(ExecuteNonQueryCommand), instance, "ExecuteBatch");
            doDispose         = (DisposeCommand)Delegate.CreateDelegate(typeof(DisposeCommand), instance, "Dispose");

            Initialise(batchSize);
        }
コード例 #3
0
 public void BeforeEach()
 {
     _initialiseCommand = new InitialiseCommand(10, 15, Direction.North);
     _robot             = new Mock <IRobot>();
     _arena             = new Mock <IArena>();
 }