Beispiel #1
0
        private void SendMessageToAllSubscribers(VSEvents e, object state)
        {
            bool shouldCallNextProcedure = true;

            foreach (KeyValuePair <String, IEventModel> pair in this.subscriperMap)
            {
                IEventModel model = pair.Value;
                model.EventMessageProcedure(e, state, out shouldCallNextProcedure);
                if (!shouldCallNextProcedure)
                {
                    break;
                }
            }
        }
        public void SendMessageToAllWindows(VSEvents e, object state)
        {
            bool shouldCallNextProcedure = true;

            foreach (KeyValuePair <string, VSWindowHandle> pair in this._vsHandleCollection)
            {
                VSWindowHandle handle = pair.Value;

                if (handle.ControlHandle != IntPtr.Zero && handle.Control is IEventModel)
                {
                    ((IEventModel)handle.Control).EventMessageProcedure(e, state, out shouldCallNextProcedure);
                    if (!shouldCallNextProcedure)
                    {
                        break;
                    }
                }
            }
        }