Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HiroServiceLocator"/> class.
 /// </summary>
 /// <param name="builder">The builder.</param>
 public HiroServiceLocator(DependencyMap builder)
 {
     if (builder == null)
     {
         throw new ArgumentNullException("builder");
     }
     Builder    = builder;
     _registrar = new HiroServiceRegistrar(this, builder, out _containerBuilder);
 }
Beispiel #2
0
        //public HiroServiceLocator(IMicroContainer container)
        //{
        //    if (container == null)
        //        throw new ArgumentNullException("container");
        //    Container = container;
        //}

        /// <summary>
        /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
        /// </summary>
        public void Dispose()
        {
            if (_container != null)
            {
                _container        = null;
                _registrar        = null;
                _containerBuilder = null;
            }
        }