Ejemplo n.º 1
0
        public void Notify(FFIExecutionSession session)
        {
            Type[] appTypes = session.ExtensionAppTypes;
            foreach (var item in appTypes)
            {
                //If the specified key is not found then the HashTable returns null.
                IExtensionApplication app = mExtensionApps[item] as IExtensionApplication;
                if (null == app)
                {
                    continue;
                }

                switch (session.State)
                {
                case ProtoCore.ExecutionStateEventArgs.State.ExecutionBegin:
                    app.OnBeginExecution(session);
                    break;

                case ProtoCore.ExecutionStateEventArgs.State.ExecutionEnd:
                    app.OnEndExecution(session);
                    break;

                case ProtoCore.ExecutionStateEventArgs.State.ExecutionBreak:
                    app.OnSuspendExecution(session);
                    break;

                case ProtoCore.ExecutionStateEventArgs.State.ExecutionResume:
                    app.OnResumeExecution(session);
                    break;

                default:
                    break;
                }
            }
        }
Ejemplo n.º 2
0
 public void ShutDownHostFactory()
 {
     application.OnEndExecution(session);
     HostFactory.Instance.ShutDown();
 }