public override void CopyTo(DomainObject target) { base.CopyTo(target); PsaParameterData tgt = target as PsaParameterData; if (tgt == null) { throw new ArgumentException("Wrong type!"); } tgt.HasTimestamps = HasTimestamps; tgt.PsaParametersSetId = PsaParametersSetId; foreach (int ts in Timestamps) { tgt.Timestamps.Add(ts); } tgt.OriginalTypeId = OriginalTypeId; tgt.OriginalName = OriginalName; tgt.Type = Type; tgt.Units = Units; tgt.AdditionalSourceInfo = AdditionalSourceInfo; foreach (string val in Values) { tgt.Values.Add(val); } }
public PsaParameterData GetParameterOfType(PsaParameterType type) { PsaParameterData rpmData = null; if (Parameters.Any(p => p.Type == type)) { rpmData = Parameters. FirstOrDefault(p => p.Type == type); } return(rpmData); }