static public void Create() { if (null != _cDevice) return; Helper.InitializeTCPChannel(); _cDevice = (shared.Device)Activator.CreateInstance(typeof(shared.Device), null, new object[] { Preferences.cUrlAttribute }); if (null == _cDevice) throw new Exception("невозможно создать удаленное устройство"); //TODO LANG (new Logger()).WriteDebug3("device:create: [hc:" + _cDevice.GetHashCode() + "]"); }
static public void Create() { if (null != _cDevice) { return; } Helper.InitializeTCPChannel(); _cDevice = (shared.Device)Activator.CreateInstance(typeof(shared.Device), null, new object[] { Preferences.cUrlAttribute }); if (null == _cDevice) { throw new Exception("невозможно создать удаленное устройство"); //TODO LANG } (new Logger()).WriteDebug3("device:create: [hc:" + _cDevice.GetHashCode() + "]"); }
static Device() { _cDevice = null; Create(); }