示例#1
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            SuggestionList otherSuggestionList = obj as SuggestionList;

            if (otherSuggestionList != null)
            {
                return(this.TotalSum.CompareTo(otherSuggestionList.TotalSum));
            }
            else
            {
                throw new ArgumentException("Object is not a SuggestionList");
            }
        }
示例#2
0
 public SuggestionList(SuggestionList suggestionList, SuggestionList suggestionList2)
 {
     this.AddRange(suggestionList);
     this.AddRange(suggestionList2);
     TotalSum = suggestionList.TotalSum + suggestionList2.TotalSum;
 }
示例#3
0
 public SuggestionList(SuggestionList suggestionList, Connector connectorToAdd)
 {
     this.AddRange(suggestionList);
     this.Add(new Suggestion(connectorToAdd.ChargeStationId, connectorToAdd.Id.Value, connectorToAdd.MaxCurrentAmp));
     TotalSum = suggestionList.TotalSum + connectorToAdd.MaxCurrentAmp;
 }