using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MarketData.MarketDataModel
{
  public class GainLossSummaryItemCollection : List<GainLossSummaryItem>
  {
    public GainLossSummaryItemCollection()
    {
    }
    public GainLossSummaryItemCollection(List<GainLossSummaryItem> gainLossSummaryItemCollection)
    {
      foreach(GainLossSummaryItem gainLossSummaryItem in gainLossSummaryItemCollection)Add(gainLossSummaryItem);
    }
    public GainLossSummaryItemCollection SortByChange()
    {
      GainLossSummaryItemCollection gainLossSummaryCollection=new GainLossSummaryItemCollection((from GainLossSummaryItem gainLossSummaryItem in this orderby gainLossSummaryItem.Date descending,gainLossSummaryItem.Change descending, gainLossSummaryItem.Symbol descending select gainLossSummaryItem).ToList());
      return gainLossSummaryCollection;
    }
  }                                                                                                     
  public class GainLossSummaryItem
  {
    public GainLossSummaryItem()
    {
    }
    public DateTime Date{get;set;}
    public String Symbol{get;set;}
    public String CompanyName{get;set;}
    public double CurrentGainLoss{get;set;}
    public double PreviousGainLoss{get;set;}
    public double Change{get;set;}
    public double ChangePercent{get;set;}
    public bool HasStopLimit{get;set;}
  }
}
