public object Clone() { StrikeWeight strikeWeight = (StrikeWeight)MemberwiseClone(); if (Lengths != null) { strikeWeight.Lengths = new List <Length>(); Lengths.ForEach(le => strikeWeight.Lengths.Add((Length)le.Clone())); } if (DayParts != null) { strikeWeight.DayParts = new List <DayPart>(); DayParts.ForEach(dp => strikeWeight.DayParts.Add((DayPart)dp.Clone())); } return(strikeWeight); }
public void PostInitializationSetup() { DayParts?.ForEach((x, i) => x.PostInitializationSetup()); }