コード例 #1
0
        public static void Raise <T>(this FastSmartWeakEvent <EventHandler <T> > ev, object sender, T e) where T : EventArgs
        {
            var d = ev.GetRaiseDelegate();

            if (d != null)
            {
                d(sender, e);
            }
        }
コード例 #2
0
        public static void Raise(this FastSmartWeakEvent <NotifyCollectionChangedEventHandler> ev, object sender, NotifyCollectionChangedEventArgs e)
        {
            var d = ev.GetRaiseDelegate();

            if (d != null)
            {
                d(sender, e);
            }
        }
コード例 #3
0
        public static void Raise(this FastSmartWeakEvent <EventHandler> ev, object sender, EventArgs e)
        {
            var d = ev.GetRaiseDelegate();

            if (d != null)
            {
                d(sender, e);
            }
        }
コード例 #4
0
 public HandlerEntry(FastSmartWeakEvent <T> parentEventSource, object targetInstance, MethodInfo targetMethod)
 {
     this.ParentEventSource = parentEventSource;
     this.weakReference     = new WeakReference(targetInstance);
     this.TargetMethod      = targetMethod;
 }