/// <summary>
        /// Resolve the service.
        /// </summary>
        /// <param name="resolver">resolver</param>
        /// <param name="type">type of service to resolve</param>
        /// <returns></returns>
        public static object Resolve(this IServiceResolver resolver, Type type)
        {
            var resolveMethod = resolver.GetType().GetMethod("Resolve") ?? throw new MissingMemberException(nameof(resolver));
            var method        = resolveMethod.MakeGenericMethod(type);

            return(method.Invoke(resolver, null));
        }