Exemple #1
0
        public void removeUnderlyingShare(Share share)
        {
            bool found = false;
            int  i     = 0;

            while (!found && i < UnderlyingShares.Count)
            {
                if (share == UnderlyingShares[i].Share)
                {
                    UnderlyingShares.Remove(UnderlyingShares[i]);
                    AviableShares.Add(share);
                    found = true;
                }
                i++;
            }
        }
Exemple #2
0
        public void addUnderlyingShare(string Id, double weight = 1)
        {
            bool found = false;
            int  i     = 0;

            while (!found && i < AviableShares.Count)
            {
                if ((Id + "    ").Equals(AviableShares[i].Id))
                {
                    UnderlyingShares.Add(new ShareAndWeight(AviableShares[i], weight));
                    AviableShares.Remove(AviableShares[i]);
                    found = true;
                }
                i++;
            }
        }
Exemple #3
0
 public void addUnderlyingShare(Share share, double weight = 1)
 {
     UnderlyingShares.Add(new ShareAndWeight(share, weight));
     AviableShares.Remove(share);
 }