public AlignedAxes GetAlignedAxes(AlignmentDirection alignmentDirection, int position, int span) { var axes = alignedAxesList.Where(t => t.AlignmentDirection == alignmentDirection && t.Position == position && t.Span == span).DefaultIfEmpty(null).First(); if (axes == null) { var newAxes = new AlignedAxes() { Axes = new List<Axis2D>(), AlignmentDirection = alignmentDirection, Position = position, Span = span }; alignedAxesList.Add(newAxes); return newAxes; } else return axes; }
public AlignedAxes GetAlignedAxes(AlignmentDirection alignmentDirection, int position, int span) { var axes = alignedAxesList.Where(t => t.AlignmentDirection == alignmentDirection && t.Position == position && t.Span == span).DefaultIfEmpty(null).First(); if (axes == null) { var newAxes = new AlignedAxes() { Axes = new List <Axis2D>(), AlignmentDirection = alignmentDirection, Position = position, Span = span }; alignedAxesList.Add(newAxes); return(newAxes); } else { return(axes); } }