Exemplo n.º 1
0
        /// <summary>
        /// Transfers ownership of a DESResource item to another <see cref="DesTask"/>.
        /// </summary>
        /// <param name="activator">
        /// The current owner of the DESResource item.
        /// </param>
        /// <param name="data">Not used.</param>
        protected override void ExecuteTask(object activator, object data)
        {
            DesTask owner = activator as DesTask;

            if (owner == null)
            {
                throw new ArgumentException("'activator' not a DesTask instance.");
            }
            Blocker.TransferResource(owner, _receiver, _itemToTransfer);
            ResumeAll(Blocker, null);
        }