public void InitializeExtension(ExtensionContext context)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            this.container = context.Container;
            this.context   = context;
            Initialize();
        }
Beispiel #2
0
 /// <summary>
 /// Create a new <see cref="LifetimeManagerFactory"/> that will
 /// return instances of the given type, creating them by
 /// resolving through the container.
 /// </summary>
 /// <param name="containerContext">Container to resolve with.</param>
 /// <param name="lifetimeType">Type of LifetimeManager to create.</param>
 public LifetimeManagerFactory(ExtensionContext containerContext, Type lifetimeType)
 {
     this.containerContext = containerContext;
     LifetimeType          = lifetimeType;
 }
Beispiel #3
0
 /// <summary>
 /// Construct a new <see cref="ChildContainerCreatedEventArgs"/> object with the
 /// given child container object.
 /// </summary>
 /// <param name="childContext">An <see cref="ExtensionContext"/> for the newly created child
 /// container.</param>
 public ChildContainerCreatedEventArgs(ExtensionContext childContext)
 {
     this.ChildContext = childContext;
 }