|
using System;
using System.Web.Compilation;
using System.Threading;
using System.Diagnostics;
using System.Globalization;
namespace CustomResourceProviders
{
/// <summary>
/// Provider factory implementation for external resources. Only supports
/// global resources.
/// </summary>
public class ExternalResourceProviderFactory : ResourceProviderFactory
{
public override IResourceProvider CreateGlobalResourceProvider(string classKey)
{
Debug.WriteLine(String.Format(CultureInfo.InvariantCulture, "ExternalResourceProviderFactory.CreateGlobalResourceProvider({0})", classKey));
return new GlobalExternalResourceProvider(classKey);
}
public override IResourceProvider CreateLocalResourceProvider(string virtualPath)
{
throw new NotSupportedException(String.Format(Thread.CurrentThread.CurrentUICulture, Properties.Resources.Provider_LocalResourcesNotSupported, "ExternalResourceProviderFactory"));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
B.E. in Information Technology
MCTS(.NET 2.0 )