示例#1
0
        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);
        }
示例#2
0
 public void PostInitializationSetup()
 {
     DayParts?.ForEach((x, i) => x.PostInitializationSetup());
 }