using System;
using System.Text;
using System.Collections.Generic;
using MarketData.Utils;

namespace MarketData.MarketDataModel
{
  public class ETFHoldings : List<ETFHolding>
  {
    public List<String> GetETFSymbols()
    {
      Dictionary<String, String> distinctETFSymbols = new Dictionary<String, String>();
      for (int index = 0; index < Count; index++)
      {
        ETFHolding etfHolding = this[index];
        if (!distinctETFSymbols.ContainsKey(etfHolding.ETFSymbol)) distinctETFSymbols.Add(etfHolding.ETFSymbol, etfHolding.ETFSymbol);
      }
      return new List<String>(distinctETFSymbols.Values);
    }
  }
  public class ETFHolding
  {
    private String etfSymbol;
    private String holdingSymbol;
    private String holdingSymbolShareClass;
    private String holdingCompanyName;
    private double percentOfAssets;
    private DateTime modified;

    public ETFHolding()
    {
    }
    public String ETFSymbol
    {
      get { return etfSymbol; }
      set { etfSymbol = value; }
    }
    public String HoldingSymbol
    {
      get { return holdingSymbol; }
      set { holdingSymbol = value; }
    }
    public String HoldingSymbolShareClass
    {
      get { return holdingSymbolShareClass; }
      set { holdingSymbolShareClass = value; }
    }
    public String HoldingCompanyName
    {
      get { return holdingCompanyName; }
      set { holdingCompanyName = value; }
    }
    public double PercentOfAssets
    {
      get { return percentOfAssets; }
      set { percentOfAssets = value; }
    }
    public DateTime Modified
    {
      get { return modified; }
      set { modified = value; }
    }
  }
}