コード例 #1
0
ファイル: Members.cs プロジェクト: TagsRocks/XzaarScript
        /// <summary>
        /// Pops a reference to a delegate instance off the evaluation stack and call the adder of the event with the given name on the given type
        /// </summary>
        /// <remarks>Will only consider public events, static or instance</remarks>
        /// <typeparam name="T">The type the event is on</typeparam>
        /// <param name="generator"></param>
        /// <param name="eventName">The name of the event</param>

        public static XsILGenerator AddToEvent <T>(this XsILGenerator generator, string eventName)
        => generator.AddToEvent(typeof(T), eventName);
コード例 #2
0
ファイル: Members.cs プロジェクト: TagsRocks/XzaarScript
        /// <summary>
        /// Pops a reference to a delegate instance off the evaluation stack and call the adder of the event with the given name on the given type
        /// </summary>
        /// <remarks>Will only consider public events, static or instance</remarks>
        /// <param name="generator"></param>
        /// <param name="type">The type the event is on</param>
        /// <param name="eventName">The name of the event</param>

        public static XsILGenerator AddToEvent(this XsILGenerator generator, Type type, string eventName)
        => generator.AddToEvent(GetEventInfo(type, eventName));