Exemplo n.º 1
0
 private void UpdateInstruments(IEnumerable <string> instruments)
 {
     foreach (string instrument in instruments)
     {
         if (!Instruments.Contains(instrument))
         {
             Instruments.Add(instrument);
         }
     }
 }
Exemplo n.º 2
0
 public void Add(Strategy strategy)
 {
     this.list_1.Add(strategy);
     strategy.Portfolio.Parent = Portfolio;
     foreach (Instrument current in strategy.Instruments)
     {
         List <Strategy> list;
         if (this.idArray_3[current.Id] == null)
         {
             list = new List <Strategy>();
             this.idArray_3[current.Id] = list;
         }
         else
         {
             list = this.idArray_3[current.Id];
         }
         list.Add(strategy);
         if (!Instruments.Contains(current))
         {
             Instruments.Add(current);
         }
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Determines if this member plays the given instrument or not.
 /// </summary>
 /// <param name="instrument">The instrument to check for.</param>
 /// <returns>True if this member plays that instrument, false otherwise.</returns>
 public bool DoesPlayInstrument(Marimba.Instrument instrument)
 {
     return(Instruments.Contains(instrument));
 }