Exemplo n.º 1
0
        /// <summary>
        /// Begins the container scope using <see cref="LifetimeScope"/> specified by <paramref name="scope"/> and optional configuration.
        /// </summary>
        /// <returns>New container scope.</returns>
        public static IDependencyContainer BeginScope(this IDependencyContainer container, LifetimeScope scope, Action <ContainerConfigurator> configuration = null)
        {
            var v2 = (container as IDependencyContainerV2)
                     ?? new WrappingDependencyContainer(container);

            return(v2.BeginScope(scope, configuration));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Determines if <paramref name="other"/> is equal current scope.
 /// </summary>
 public bool Equals(LifetimeScope other)
 {
     return(Name == other?.Name);
 }