internal static IMapper getInstance() { if (instance == null) { instance = new ASPCharMapper(); } return(instance); }
public void populate() { mappers.Add(typeof(SimpleSensor), ASPSimpleSensorMapper.getInstance()); mappers.Add(typeof(AdvancedSensor), ASPAdvancedSensorMapper.getInstance()); mappers.Add(typeof(SimpleActuator), ASPActuatorMapper.getInstance()); mappers.Add(typeof(bool), ASPBoolMapper.getInstance()); foreach (Type t in ReflectionExecutor.SignedIntegerTypes()) { mappers.Add(t, ASPSignedIntegerMapper.getInstance()); } foreach (Type t in ReflectionExecutor.UnsignedIntegerTypes()) { mappers.Add(t, ASPUnsignedIntegerMapper.getInstance()); } foreach (Type t in ReflectionExecutor.FloatingPointTypes()) { mappers.Add(t, ASPFloatingPointMapper.getInstance()); } mappers.Add(typeof(string), ASPStringMapper.getInstance()); mappers.Add(typeof(Enum), ASPEnumMapper.getInstance()); mappers.Add(typeof(char), ASPCharMapper.getInstance()); }