コード例 #1
0
        internal static object Resolve(this NancyContext context, Type type)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
            if (type == typeof(NancyContext))
            {
                return(context);
            }
            if (type == typeof(IUriResolver))
            {
                return(context.GetUriResolver());
            }

            return(context.GetIocContainerWrapper().GetInstance(type));
        }