示例#1
0
 public void WriteFp(IPsdzConnection connection, IPsdzStandardFp standardFp)
 {
     base.CallMethod(delegate(IVcmService m)
     {
         m.WriteFp(connection, standardFp);
     }, true);
 }
        public IVehicleProfile Build(IPsdzStandardFp standardFp)
        {
            if (standardFp == null)
            {
                return(null);
            }
            if (!standardFp.IsValid)
            {
                //Log.Warning("ProgrammingObjectBuilder.Build()", "Vehicle profile 'standardFp' is not valid!", Array.Empty<object>());
                return(null);
            }
            IDictionary <int, IEnumerable <IVehicleProfileCriterion> > dictionary = new Dictionary <int, IEnumerable <IVehicleProfileCriterion> >();

            foreach (int key in standardFp.Category2Criteria.Keys)
            {
                IEnumerable <IVehicleProfileCriterion> value = standardFp.Category2Criteria[key].Select(new Func <IPsdzStandardFpCriterion, IVehicleProfileCriterion>(this.Build));
                dictionary.Add(key, value);
            }
            return(new VehicleProfile(standardFp.AsString, standardFp.CategoryId2CategoryName, dictionary));
        }