예제 #1
0
 public SyncTaskImpl(Feature owner, string name, SyncAction action, SyncActionConnection actionConnection)
 {
     this._owner            = owner;
     this._name             = name;
     this._action           = action;
     this._actionConnection = actionConnection;
 }
예제 #2
0
        /// <summary>
        /// Adds a synchronisation task that will use a connection to ZPUsh.
        /// </summary>
        /// <param name="owner">The feature owning the task.</param>
        /// <param name="name">The task's name, for logging.</param>
        /// <param name="action">The action to execute.</param>
        public SyncTask AddTask(Feature owner, string name, SyncActionConnection action)
        {
            if (_started)
            {
                throw new Exception("Already started, cannot add task");
            }

            SyncTaskImpl task = new SyncTaskImpl(owner, name, null, action);

            _tasks.Add(task);
            return(task);
        }