示例#1
0
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="handler"></param>
        /// <param name="interfaceType"></param>
        /// <param name="methodInfo"></param>
        InterfaceEventListener(XObject handler, Type interfaceType, MethodInfo methodInfo)
        {
            Contract.Requires<ArgumentNullException>(handler != null);
            Contract.Requires<ArgumentNullException>(interfaceType != null);
            Contract.Requires<ArgumentNullException>(methodInfo != null);
            Contract.Requires<ArgumentException>(IsValidMethodInfo(methodInfo));

            this.handlerId = handler.GetObjectId();
            this.interfaceType = interfaceType;
            this.methodInfo = methodInfo;
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance.
        /// </summary>
        /// <param name="handler"></param>
        /// <param name="interfaceType"></param>
        /// <param name="methodInfo"></param>
        InterfaceEventListener(XObject handler, Type interfaceType, MethodInfo methodInfo)
        {
            Contract.Requires <ArgumentNullException>(handler != null);
            Contract.Requires <ArgumentNullException>(interfaceType != null);
            Contract.Requires <ArgumentNullException>(methodInfo != null);
            Contract.Requires <ArgumentException>(IsValidMethodInfo(methodInfo));

            this.handlerId     = handler.GetObjectId();
            this.interfaceType = interfaceType;
            this.methodInfo    = methodInfo;
        }