resolved SPRNET-1085

This commit is contained in:
eeichinger
2008-11-05 21:47:49 +00:00
parent 739068ba81
commit 954a457448
2 changed files with 13 additions and 12 deletions

View File

@@ -371,15 +371,16 @@ namespace Spring.Web.UI
/// <returns>Local ResourceManager instance.</returns>
private ResourceManager GetLocalResourceManager()
{
object resourceProvider = Page.GetLocalResourceProvider.Invoke(typeof(ResourceExpressionBuilder), new object[] {this});
MethodInfo GetLocalResourceAssembly =
resourceProvider.GetType().GetMethod("GetLocalResourceAssembly", BindingFlags.NonPublic | BindingFlags.Instance);
Assembly localResourceAssembly = (Assembly) GetLocalResourceAssembly.Invoke(resourceProvider, null);
if (localResourceAssembly != null)
{
return new ResourceManager(VirtualPathUtility.GetFileName(this.AppRelativeVirtualPath), localResourceAssembly);
}
return null;
// object resourceProvider = Page.GetLocalResourceProvider.Invoke(typeof(ResourceExpressionBuilder), new object[] {this});
// MethodInfo GetLocalResourceAssembly =
// resourceProvider.GetType().GetMethod("GetLocalResourceAssembly", BindingFlags.NonPublic | BindingFlags.Instance);
// Assembly localResourceAssembly = (Assembly) GetLocalResourceAssembly.Invoke(resourceProvider, null);
// if (localResourceAssembly != null)
// {
// return new ResourceManager(VirtualPathUtility.GetFileName(this.AppRelativeVirtualPath), localResourceAssembly);
// }
// return null;
return new LocalResourceManager( this.AppRelativeVirtualPath );
}
/// <summary>

View File

@@ -90,9 +90,9 @@ namespace Spring.Web.UI
private static readonly object EventPreInit = new object();
private static readonly object EventInitComplete = new object();
#else
internal static readonly MethodInfo GetLocalResourceProvider =
typeof( ResourceExpressionBuilder ).GetMethod( "GetLocalResourceProvider", BindingFlags.NonPublic | BindingFlags.Static, null,
new Type[] { typeof( TemplateControl ) }, null );
// internal static readonly MethodInfo GetLocalResourceProvider =
// typeof( ResourceExpressionBuilder ).GetMethod( "GetLocalResourceProvider", BindingFlags.NonPublic | BindingFlags.Static, null,
// new Type[] { typeof( TemplateControl ) }, null );
#endif
#endregion