Ejemplo n.º 1
0
        public void Complete()
        {
            if (!NewInstanceActivated)
            {
                return;
            }

            var beginningHandler = CompletionBeginning;

            beginningHandler?.Invoke(this, new InstanceLookupCompletionBeginningEventArgs(this));

            ComponentRegistration.RaiseActivated(this, Parameters, _newInstance);

            var endingHandler = CompletionEnding;

            endingHandler?.Invoke(this, new InstanceLookupCompletionEndingEventArgs(this));
        }
Ejemplo n.º 2
0
        public void Complete()
        {
            if (!NewInstanceActivated)
            {
                return;
            }

            var beginningHandler = CompletionBeginning;

            beginningHandler?.Invoke(this, new InstanceLookupCompletionBeginningEventArgs(this));

            // _newInstance will definitely have been instantiated by the time
            // this is called.
            ComponentRegistration.RaiseActivated(this, Parameters, _newInstance !);

            var endingHandler = CompletionEnding;

            endingHandler?.Invoke(this, new InstanceLookupCompletionEndingEventArgs(this));
        }