コード例 #1
0
        /* ---- InternalWrapperContext --- */

        /// <summary>  returns the user data context that
        /// we are wrapping
        /// </summary>

        /// <summary>  Returns the base context that we are
        /// wrapping. Here, its this, but for other thing
        /// like VM related context contortions, it can
        /// be something else
        /// </summary>

        /* -----  InternalEventContext ---- */

        public EventCartridge AttachEventCartridge(EventCartridge ec)
        {
            if (iec != null)
            {
                return(iec.AttachEventCartridge(ec));
            }

            return(null);
        }
コード例 #2
0
        /// <summary>  Attached the EventCartridge to the context
        /// *
        /// Final because not something one should mess with lightly :)
        /// *
        /// </summary>
        /// <param name="context">context to attach to
        /// </param>
        /// <returns>true if successful, false otherwise
        ///
        /// </returns>
        public bool attachToContext(IContext context)
        {
            if (context is InternalEventContext)
            {
                InternalEventContext iec = (InternalEventContext)context;

                iec.AttachEventCartridge(this);

                return(true);
            }
            else
            {
                return(false);
            }
        }