public void CreateShares() { string [] shares = _algorithm.Share(Phrase, Threshold, NumberOfShares); Shares.Clear(); foreach (var sh in shares) { ShareName shareName = new ShareName(sh); Shares.Add(shareName); } }
public void AddShares(IDictionary <string, double> shares) { foreach (var pair in shares) { Shares.Add(pair.Key, pair.Value); } if (Block.Status == BlockStatus.Confirmed) { CalculatePayouts(); } }
public void Sell(Person seller, double summ) { if (seller.Balance >= summ) { for (int i = 0; i < summ / DefaultPrice; i++) { seller.PersonalShares.RemoveAt(0); Shares.Add(new Share(DefaultPrice)); } seller.Balance += summ; } }
public void SaveChanges(Share share) { SaveChanges <Share>(share); for (int i = 0; i < Shares.Count; i++) { if (Shares[i].Identifier == share.Identifier) { Shares.RemoveAt(i); Shares.Insert(i, share); return; } } Shares.Add(share); }
public void Add(Share share) => Shares.Add(share);
public int Add(Share entity) => Shares.Add(entity).ShareId;
public void Add(Share entity) => Shares.Add(entity);