Exemplo n.º 1
0
        public void DeferInitialization(object source, EventInfo eventInfo, Func <object[], bool> deferringEventCallback = null)
        {
            if (eventInfo == null)
            {
                throw new ArgumentNullException("eventInfo");
            }

            if (!(this.initialized || this.initializationDeferred))
            {
                this.initializationDeferred = true;
                this.deferringEventData     = new Tuple <object, EventInfo>(source, eventInfo);
                this.deferringEventCallback = deferringEventCallback;
                GenericAction.AddGenericEventHandler(source, eventInfo, this.OnDefferingEventOcurred);
            }
        }