Пример #1
0
        protected virtual Type GetSensorClassType(eSensorType sensorType)
        {
            Assembly asm      = ParentLogger.GetType().Assembly;
            string   fullname = ParentLogger.GetType().Namespace;

            return(asm.GetType(fullname.Substring(0, fullname.IndexOf('.') + 1) + STRUCTURE.SENSORS + "." + sensorType.ToString()));
        }
Пример #2
0
 public T this[eSensorType type]
 {
     get
     {
         return(this.Find(x => (x as ISensor).Type == type));
     }
     set
     {
         throw new NotSupportedException();
     }
 }
Пример #3
0
        public PredefinedSensor Create(eSensorType sensorType)
        {
            Type t = GetSensorClassType(sensorType);

            return(Activator.CreateInstance(t, this) as PredefinedSensor);
        }