System.Web.Caching.OutputCache.LoadProvider C# (CSharp) Method

LoadProvider() static private method

static private LoadProvider ( ProviderSettings ps ) : System.Web.Caching.OutputCacheProvider
ps ProviderSettings
return System.Web.Caching.OutputCacheProvider
		static OutputCacheProvider LoadProvider (ProviderSettings ps)
		{
			Type type = HttpApplication.LoadType (ps.Type, false);
			if (type == null)
				throw new ConfigurationErrorsException (String.Format ("Could not load type '{0}'.", ps.Type));
			
			var ret = Activator.CreateInstance (type) as OutputCacheProvider;
			ret.Initialize (ps.Name, ps.Parameters);

			return ret;
		}