예제 #1
0
        public ElementEventListener(
            XElement element,
            EventListenerAttributes attributes,
            IInvoker invoker)
            : base(element)
        {
            Contract.Requires<ArgumentNullException>(element != null);
            Contract.Requires<ArgumentNullException>(attributes != null);
            Contract.Requires<ArgumentNullException>(invoker != null);

            this.invoker = invoker;
            this.attributes = attributes;
            this.handler = new Lazy<IEventHandler>(() => GetHandler());
            this.observer = new Lazy<EventTarget>(() => GetObserver());
        }
예제 #2
0
        public ElementEventListener(
            XElement element,
            EventListenerAttributes attributes,
            IInvoker invoker)
            : base(element)
        {
            Contract.Requires <ArgumentNullException>(element != null);
            Contract.Requires <ArgumentNullException>(attributes != null);
            Contract.Requires <ArgumentNullException>(invoker != null);

            this.invoker    = invoker;
            this.attributes = attributes;
            this.handler    = new Lazy <IEventHandler>(() => GetHandler());
            this.observer   = new Lazy <EventTarget>(() => GetObserver());
        }