コード例 #1
0
ファイル: ClassHandlersStore.cs プロジェクト: JianwenSun/cc
        // Creates reference to given handlers and RoutedEvent
        // Returns the index at which the new reference was added
        // NOTE: There should not exist a set of handlers for the 
        // given routedEvent
        internal int CreateHandlersLink(RoutedEvent routedEvent, RoutedEventHandlerInfoList handlers)
        {
            Debug.Assert(GetHandlersIndex(routedEvent) == -1, "There should not exist a set of handlers for the given routedEvent");

            ClassHandlers classHandlers = new ClassHandlers();
            classHandlers.RoutedEvent = routedEvent;
            classHandlers.Handlers = handlers;
            classHandlers.HasSelfHandlers = false;
            _eventHandlersList.Add(classHandlers);

            return _eventHandlersList.Count - 1;
        }        
コード例 #2
0
        // Creates reference to given handlers and RoutedEvent
        // Returns the index at which the new reference was added
        // NOTE: There should not exist a set of handlers for the
        // given routedEvent
        internal int CreateHandlersLink(RoutedEvent routedEvent, RoutedEventHandlerInfoList handlers)
        {
            Debug.Assert(GetHandlersIndex(routedEvent) == -1, "There should not exist a set of handlers for the given routedEvent");

            ClassHandlers classHandlers = new ClassHandlers();

            classHandlers.RoutedEvent     = routedEvent;
            classHandlers.Handlers        = handlers;
            classHandlers.HasSelfHandlers = false;
            _eventHandlersList.Add(classHandlers);

            return(_eventHandlersList.Count - 1);
        }
コード例 #3
0
 /// <summary>
 ///     Is the given ClassHandlers struct equals the current
 /// </summary>
 public bool Equals(ClassHandlers classHandlers)
 {
     return(
         classHandlers.RoutedEvent == this.RoutedEvent &&
         classHandlers.Handlers == this.Handlers);
 }
コード例 #4
0
ファイル: ClassHandlersStore.cs プロジェクト: JianwenSun/cc
 /// <summary>
 ///     Is the given ClassHandlers struct equals the current
 /// </summary>
 public bool Equals(ClassHandlers classHandlers)
 {
     return (
         classHandlers.RoutedEvent == this.RoutedEvent &&
         classHandlers.Handlers == this.Handlers);
 }