public SerializablePhaseCollection GetPhasesFromModel() { var phasesFromModel = new SerializablePhaseCollection(); var phases = new Model().GetPhases(); foreach (Phase phase in phases) { var serializablePhase = new SerializablePhase(phase); phasesFromModel.Add(serializablePhase); } phasesFromModel.Sort(); return(phasesFromModel); }
public int CompareTo(object obj) { if (obj == null) { return(1); } else { SerializablePhase phase = obj as SerializablePhase; if (this.Number <= phase.Number) { return(-1); } else { return(1); } } }
public void Add(SerializablePhase serializablePhase) => this.List.Add(serializablePhase);