示例#1
0
        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);
            }
        }
示例#2
0
        public PsaParameterData GetParameterOfType(PsaParameterType type)
        {
            PsaParameterData rpmData = null;

            if (Parameters.Any(p => p.Type == type))
            {
                rpmData = Parameters.
                          FirstOrDefault(p => p.Type == type);
            }
            return(rpmData);
        }