예제 #1
0
        public Task <TransactionReceipt> PullRequestAndWaitForReceiptAsync(string src, BigInteger wad, CancellationTokenSource cancellationToken = null)
        {
            var pullFunction = new PullFunction();

            pullFunction.Src = src;
            pullFunction.Wad = wad;

            return(ContractHandler.SendRequestAndWaitForReceiptAsync(pullFunction, cancellationToken));
        }
예제 #2
0
        public Task <string> PullRequestAsync(string src, BigInteger wad)
        {
            var pullFunction = new PullFunction();

            pullFunction.Src = src;
            pullFunction.Wad = wad;

            return(ContractHandler.SendRequestAsync(pullFunction));
        }
예제 #3
0
        internal void PutXIntoCodex(List <Skill> codex, int count)
        {
            PullFunction puller = GetPullFunction();

            for (int i = 0; i < count && !IsEmpty; ++i)
            {
                Skill skill = puller();
                if (skill != null)
                {
                    codex.Add(skill);
                }
            }
        }
예제 #4
0
        /// <summary>
        /// Will pull up to the specified number of items from the bag. Can't pull more than that, obviously.
        /// </summary>
        /// <param name="count">The number of items to pull.</param>
        /// <returns>A sorted list of pulled items.</returns>
        internal List <Skill> PullXFromBag(int count)
        {
            PullFunction puller = GetPullFunction();
            List <Skill> pulls  = new List <Skill>();

            for (int i = 0; i < count && !IsEmpty; ++i)
            {
                pulls.Add(puller());
            }

            if (pulls.Count > 1)
            {
                pulls.SkillSort();
            }
            return(pulls);
        }
예제 #5
0
 public Task <TransactionReceipt> PullRequestAndWaitForReceiptAsync(PullFunction pullFunction, CancellationTokenSource cancellationToken = null)
 {
     return(ContractHandler.SendRequestAndWaitForReceiptAsync(pullFunction, cancellationToken));
 }
예제 #6
0
 public Task <string> PullRequestAsync(PullFunction pullFunction)
 {
     return(ContractHandler.SendRequestAsync(pullFunction));
 }