dWorld.Foundation.Utility.Threading.dLightWeightProcessThread.AddService C# (CSharp) Method

AddService() public static method

public static AddService ( dLightWeightProcessBase _Process ) : void
_Process dLightWeightProcessBase
return void
		public static void AddService (dLightWeightProcessBase _Process)
		{
			if (m_Processes != null) {
				if (_Process != null) {
					m_Processes.Add (_Process);
					_Process.internal_IncrementRegister ();
					Command command = new Command (eCommandType.Register, _Process);
					ThreadProcess.EnqueueCommand (command);
					command.Event.WaitOne ();
				}
			} else {
				throw new Exception ("dLightWeightProcessThread has not been initialised, please initialise it through the Foundation Initialisation System.");
			}
		}