コード例 #1
0
        private static string GetConnectionString()
        {
            var configuration = WebConfiguration.Load(new HttpServerUtilityWrapper(HttpContext.Current.Server));

            if (string.IsNullOrEmpty(configuration.DependencyGraphConnectionString))
            {
                throw new ArgumentException("Must have DependencyGraphConnectionString in web.config");
            }
            return(configuration.DependencyGraphConnectionString);
        }
コード例 #2
0
        private WebConfiguration GetWebConfiguration(IContext context)
        {
            var configuration = WebConfiguration.Load(new HttpServerUtilityWrapper(HttpContext.Current.Server));

            return(configuration);
        }