+ // TODO: check if it makes sense to cache the providers and, if yes, maybe
+ // we should expire the entries (or just store them in InternalCache?)
+ IResourceProvider rp = null;
+ if (!resource_providers.TryGetValue (virtualPath, out rp)) {
+ if (isLocal)
+ rp = provider_factory.CreateLocalResourceProvider (virtualPath);
+ else
+ rp = provider_factory.CreateGlobalResourceProvider (virtualPath);
+
+ if (rp == null) {
+ if (isLocal)
+ rp = DefaultProviderFactory.CreateLocalResourceProvider (virtualPath);
+ else
+ rp = DefaultProviderFactory.CreateGlobalResourceProvider (virtualPath);
+
+ if (rp == null)
+ return null;
+ }
+
+ resource_providers.Add (virtualPath, rp);
+ }
+
+ return rp;
+ }
+
+ static object GetGlobalObjectFromFactory (string classKey, string resourceKey, CultureInfo culture)
+ {
+ // FIXME: Retention of data
+ IResourceProvider rp = GetResourceProvider (classKey, false);