예제 #1
0
        // ReSharper disable InconsistentNaming

        /// <summary>
        /// Connects the host event source to the specified script handler function.
        /// </summary>
        /// <param name="scriptFunc">The script function that will handle the event.</param>
        /// <returns>An <see cref="EventConnection{T}"/> that represents the connection.</returns>
        public EventConnection <T> connect(object scriptFunc)
        {
            MiscHelpers.VerifyNonNullArgument(scriptFunc, "scriptFunc");
            return(engine.CreateEventConnection <T>(Source, EventInfo, DelegateFactory.CreateDelegate(engine, scriptFunc, typeof(T))));
        }