Example #1
0
        /// <summary>
        /// Registers this instance.
        /// </summary>
        /// <typeparam name="TService">The type of the service.</typeparam>
        /// <typeparam name="TImplementation">The type of the implementation.</typeparam>
        /// <returns></returns>
        public IoCRegistrationBuilder <TImplementation> Register <TService, TImplementation>()
        {
            var result = new IoCRegistrationBuilder <TImplementation>();

            result.Register(Builder.RegisterType <TImplementation>().As <TService>());
            return(result);
        }
Example #2
0
        /// <summary>
        /// Registers the specified implementation type.
        /// </summary>
        /// <param name="implementationType">Type of the implementation.</param>
        public IoCRegistrationBuilder <object> Register(Type implementationType)
        {
            var result = new IoCRegistrationBuilder <object>();

            result.Register(Builder.RegisterType(implementationType));
            return(result);
        }