Esempio n. 1
0
        //
        // Raise the event on the _returnHandler
        //
        internal void _OnFinish(object returnEventArgs)
        {
            RaiseTypedEventArgs args = new RaiseTypedEventArgs(_returnHandler, returnEventArgs);

            RaiseTypedEvent(this, args);
            //RaiseTypedReturnEvent(_returnHandler, returnEventArgs);
        }
        // Token: 0x06002A7A RID: 10874 RVA: 0x000C2724 File Offset: 0x000C0924
        internal void RaiseTypedReturnEvent(PageFunctionBase b, RaiseTypedEventArgs args)
        {
            Delegate d = args.D;
            object   o = args.O;

            if (d != null)
            {
                ReturnEventArgs <T>    e = o as ReturnEventArgs <T>;
                ReturnEventHandler <T> returnEventHandler = d as ReturnEventHandler <T>;
                returnEventHandler(this, e);
            }
        }
Esempio n. 3
0
        ///<summary>
        /// Used to raise a strongly typed return event. Sealed since nobody should have the need to override as
        /// all derived types of this generic type will automatically get the strongly typed version from this
        /// generic version.
        ///</summary>
        internal void RaiseTypedReturnEvent(PageFunctionBase b, RaiseTypedEventArgs args)
        {
            Delegate d = args.D;
            object   returnEventArgs = args.O;

            if (d != null)
            {
                ReturnEventArgs <T> ra = returnEventArgs as ReturnEventArgs <T>;

                Debug.Assert((returnEventArgs == null) || (ra != null));

                ReturnEventHandler <T> eh = d as ReturnEventHandler <T>;

                Debug.Assert(eh != null);

                eh(this, ra);
            }
        }