Author: mhabersack
Date: 2007-04-03 14:56:09 -0400 (Tue, 03 Apr 2007)
New Revision: 75356
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs
trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
Log:
2007-04-03 Marek Habersack <[EMAIL PROTECTED]>
* AppResourcesCompiler.cs: global resources are put in the
"Resources." namespace while local ones are not. Fixes bug #81174
which was reopened after r75261.
Modified:
trunk/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs
2007-04-03 18:53:09 UTC (rev 75355)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.cs
2007-04-03 18:56:09 UTC (rev 75356)
@@ -192,7 +192,7 @@
List<AppResourceFileInfo> files = this.files.Files;
foreach (AppResourceFileInfo arfi in files)
- GetResourceFile (arfi, cp);
+ GetResourceFile (arfi, cp, true);
CodeDomProvider provider;
provider = ci.CreateProvider ();
@@ -263,11 +263,11 @@
return false;
}
- string GetResourceFile (AppResourceFileInfo arfi,
CompilerParameters cp)
+ string GetResourceFile (AppResourceFileInfo arfi,
CompilerParameters cp, bool local)
{
string resfile;
if (arfi.Kind == AppResourceFileKind.ResX)
- resfile = CompileResource (arfi);
+ resfile = CompileResource (arfi, local);
else
resfile = arfi.Info.FullName;
if (!String.IsNullOrEmpty (resfile))
@@ -321,7 +321,7 @@
}
if (defaultFile != null) {
List<string> al = new List<string> ();
- al.Add (GetResourceFile (arfi, cp));
+ al.Add (GetResourceFile (arfi, cp,
false));
arfi.Seen = true;
groups.Add (al);
@@ -344,7 +344,7 @@
continue;
tmp2 = arfi.Info.Name;
if (tmp2.StartsWith (tmp)) {
- al.Add (GetResourceFile (arfi,
cp));
+ al.Add (GetResourceFile (arfi,
cp, false));
arfi.Seen = true;
}
}
@@ -365,7 +365,7 @@
// A single default file, create a group
List<string> al = new List<string> ();
- al.Add (GetResourceFile (arfi, cp));
+ al.Add (GetResourceFile (arfi, cp, false));
groups.Add (al);
}
groups.Sort (lcList);
@@ -558,11 +558,14 @@
new CodeVariableReferenceExpression
("value")));
}
- string CompileResource (AppResourceFileInfo arfi)
+ string CompileResource (AppResourceFileInfo arfi, bool local)
{
string path = arfi.Info.FullName;
- string resource = Path.Combine (TempDirectory,
- "Resources." +
Path.GetFileNameWithoutExtension (path) + ".resources");
+ string rname = Path.GetFileNameWithoutExtension (path)
+ ".resources";
+ if (!local)
+ rname = "Resources." + rname;
+
+ string resource = Path.Combine (TempDirectory, rname);
FileStream source = null, destination = null;
IResourceReader reader = null;
ResourceWriter writer = null;
Modified: trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2007-04-03
18:53:09 UTC (rev 75355)
+++ trunk/mcs/class/System.Web/System.Web.Compilation/ChangeLog 2007-04-03
18:56:09 UTC (rev 75356)
@@ -1,3 +1,9 @@
+2007-04-03 Marek Habersack <[EMAIL PROTECTED]>
+
+ * AppResourcesCompiler.cs: global resources are put in the
+ "Resources." namespace while local ones are not. Fixes bug #81174
+ which was reopened after r75261.
+
2007-03-26 Marek Habersack <[EMAIL PROTECTED]>
* TemplateControlCompiler.cs: refactor assining properties from
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches