예제 #1
0
            /// <summary>
            ///     Adds an Active Event for given type
            /// </summary>
            /// <param name="type">Type with Active Event handlers</param>
            /// <param name="atr">Attribute describing Active Event handler</param>
            /// <param name="method">Method that implements handler</param>
            public void AddActiveEvent(Type type, ActiveEventAttribute atr, MethodInfo method)
            {
                // Making sure there exists an entry for type
                if (!Types.ContainsKey(type))
                {
                    Types[type] = new ActiveEventType();
                }

                // Adding Active Event and its associated method
                Types[type].AddActiveEvent(atr, method);
            }
예제 #2
0
 /// <summary>
 ///     Initializes a new instance of the
 /// <see cref="p5.core.Loader+ActiveEventTypes+ActiveEventType+ActiveEvent"/> class
 /// </summary>
 /// <param name="atr">Atr</param>
 /// <param name="method">Method</param>
 public ActiveEvent(ActiveEventAttribute atr, MethodInfo method)
 {
     Attribute = atr;
     Method    = method;
 }
예제 #3
0
 /// <summary>
 ///     Adds an Active Event for given type
 /// </summary>
 /// <param name="atr">Atr</param>
 /// <param name="method">Method</param>
 public void AddActiveEvent(ActiveEventAttribute atr, MethodInfo method)
 {
     Events.Add(new ActiveEvent(atr, method));
 }