Ejemplo n.º 1
0
			public Callbacks(Atom cAtom)
			{
				_cAtom = cAtom;
			}
Ejemplo n.º 2
0
			public void Dispose()
			{
				(new Logger()).WriteDebug3("Callbacks:Dispose:" + (null == _cAtom ? "no" : "yes:" + _cAtom.GetHashCode()));
				_cAtom = null;
			}
Ejemplo n.º 3
0
		private void OnAtomDone(Atom cSender)
		{

			(new Logger()).WriteDebug3("OnAtomDone: Template=" + (null != cSender && null != cSender.cTemplate && null != cSender.cTemplate.sFile ? cSender.cTemplate.sFile : "???") + " cTag=" + (null != cSender && null != cSender.oTag ? cSender.oTag.ToString() : "???"));
			if (null != cSender)
				cSender.Stopped -= OnAtomDone;
			if (null == _aAtoms && (Status.Disposing != eStatus || Status.Disposed != eStatus))
				(new Logger()).WriteError(new Exception("template: отсутствует массив эффектов [file:" + sFile + "]"));

			if (null != _aAtoms)
			{
				foreach (Atom cAtom in _aAtoms)
				{
					if (!cAtom._bDone)       // (cAtom.eStatus == Atom.Status.Prepared || cAtom.eStatus == Atom.Status.Started)
						return;
				}
			}
			if (Status.Stopped == eStatus)
				return;
			eStatus = Status.Stopped;
			if (null != Done)
				ThreadPool.QueueUserWorkItem(DoneWorker);
		}