/// <summary>Initializes a new instance of the <see cref="AspNetMvcDependencyResolver"/> class.</summary>
        /// <param name="compositionContext">The composition context.</param>
        public AspNetMvcDependencyResolver(CompositionContext compositionContext)
        {
            _compositionContext = compositionContext;

            var factory = new AspNetMvcControllerFactory(_compositionContext);
            _compositionContext.AddPart<IControllerFactory, AspNetMvcControllerFactory>(factory);
        }
        /// <summary>Initializes a new instance of the <see cref="AspNetMvcDependencyResolver"/> class.</summary>
        /// <param name="compositionContext">The composition context.</param>
        public AspNetMvcDependencyResolver(CompositionContext compositionContext)
        {
            _compositionContext = compositionContext;

            var factory = new AspNetMvcControllerFactory(_compositionContext);

            _compositionContext.AddPart <IControllerFactory, AspNetMvcControllerFactory>(factory);
        }