示例#1
0
 internal static EntityEquipmentSensorCBRNAP2Ce Convert(AP2Ce input)
 {
     EntityEquipmentSensorCBRNAP2Ce output = new EntityEquipmentSensorCBRNAP2Ce();
     output.ExternalId  = input.Id;
     output.Name        = input.Name;
     output.Description = input.Description;
     //output.SensorData = Convert(input.Data);
     return output;
 }
示例#2
0
        internal static AP2Ce Convert(EntityEquipmentSensorCBRNAP2Ce input)
        {
            AP2Ce output = new AP2Ce();
            output.Id = input.ExternalId;
            output.Name = input.Name;
            output.Description = input.Description;
            output.Position = null; // TODO: Get from parent (input.Parent)
            //output.Data = Convert(input.SensorData);
            //output.DetectionMode = (LCDDetectionMode)Enum.Parse(typeof(LCDDetectionMode), input.DetectionMode.ToString());
            //output.State = Convert(input.SensorState);

            return output;
        }
示例#3
0
文件: Service.cs 项目: GULPF/SAAB-CM
        public AP2Ce GetAP2CeById(string id)
        {
            ObjectHandle hObject = ObjectHandle.Invalid;

            // Find WISE object in db.
            _sink.GetObjectHandle(_hDatabase, id, ref hObject);
            EntityEquipmentSensorCBRNAP2Ce wap2ce = new EntityEquipmentSensorCBRNAP2Ce(_sink, _hDatabase, hObject);

            // If it wasn't found then 404
            if (hObject == ObjectHandle.Invalid)
            {
                throw new WebFaultException(System.Net.HttpStatusCode.NotFound);
            }

            return Converter.Convert(wap2ce);
        }