コード例 #1
0
ファイル: Device.cs プロジェクト: ratsil/bethe.ingenie
		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() + "]");
		}
コード例 #2
0
 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() + "]");
 }
コード例 #3
0
 static Device()
 {
     _cDevice = null;
     Create();
 }
コード例 #4
0
ファイル: Device.cs プロジェクト: ratsil/bethe.ingenie
		static Device()
		{
			_cDevice = null;
			Create();
		}