internal override object CloneInternals(object copy) { copy = base.CloneInternals(copy); ((CalculatedValue)copy).provider = null; ((CalculatedValue)copy).refreshRate = refreshRate.Clone(); ((CalculatedValue)copy).timerData = (TimerData)timerData.Clone(); ((CalculatedValue)copy).InitTimer(); ((CalculatedValue)copy).aggregateDuration = (GaugeDuration)aggregateDuration.Clone(); return(copy); }
internal override object CloneInternals(object copy) { ValueBase valueBase = (ValueBase)base.CloneInternals(copy); valueBase.historyDept = (GaugeDuration)historyDept.Clone(); valueBase.queryDept = (GaugeDuration)queryDept.Clone(); valueBase.history = (HistoryCollection)history.Clone(); valueBase.ValueChanged = null; valueBase.ValueLimitOverflow = null; valueBase.consumers = new ArrayList(); foreach (IValueConsumer consumer in consumers) { if (!(consumer is ValueBase)) { ((IValueProvider)valueBase).AttachConsumer(consumer); } } return(valueBase); }