private ParameterType ParamTypeForSconnMapper(sconnConfigMapper mapper) { try { iotConnector connector = new iotConnector(); return(connector.TypeForName(ParameterNameForMapper(mapper))); //ParameterType.TypeForName(ParameterNameForMapper(mapper), cont); } catch (Exception e) { nlogger.ErrorException(e.Message, e); return(new ParameterType()); } }
public iotDomain GetDomainWithName(string name) { try { iotConnector connector = new iotConnector(); return(connector.DomainForDomainName(name)); } catch (Exception e) { nlogger.ErrorException(e.Message, e); return(new iotDomain()); } }
/************** Get by id *****************/ public Site SiteWithId(int id) { try { //iotRepository<Site> repo = new iotRepository<Site>(); //return repo.GetById(id); iotConnector connector = new iotConnector(); return(connector.SiteList().Where(s => { return s.Id == id; }).First()); } catch (Exception e) { nlogger.ErrorException(e.Message, e); return(new Site()); } }
public Device DeviceWithId(int id) { try { /* * iotRepository<Device> repo = new iotRepository<Device>(); * return repo.GetById(id); */ iotConnector connector = new iotConnector(); return(connector.DeviceList().Where(s => { return s.Id == id; }).First()); } catch (Exception e) { nlogger.ErrorException(e.Message, e); return(new Device()); } }
public CommSconnProtocol() { connector = new iotConnector(); site = new sconnSite(); cfgMngr = new sconnCfgMngr(); }