Browse Source

2006-01-20 Chris Toshok <[email protected]>

	* ResourceExpressionBuilder.cs (ParseExpression): implement.

	* ResourceExpressionFields.cs: implement.


svn path=/trunk/mcs/; revision=55874
Chris Toshok 20 năm trước cách đây
mục cha
commit
c80bafcadf

+ 6 - 0
mcs/class/System.Web/System.Web.Compilation/ChangeLog

@@ -1,3 +1,9 @@
+2006-01-20  Chris Toshok  <[email protected]>
+
+	* ResourceExpressionBuilder.cs (ParseExpression): implement.
+
+	* ResourceExpressionFields.cs: implement.
+
 2006-01-20  Chris Toshok  <[email protected]>
 
 	* ClientBuildManagerParameter.cs: implement.

+ 6 - 2
mcs/class/System.Web/System.Web.Compilation/ResourceExpressionBuilder.cs

@@ -61,10 +61,14 @@ namespace System.Web.Compilation {
 			throw new NotImplementedException ();
 		}
 
-		[MonoTODO]
 		public static ResourceExpressionFields ParseExpression (string expression)
 		{
-			throw new NotImplementedException ();
+			int comma = expression.IndexOf (',');
+			if (comma == -1)
+				return new ResourceExpressionFields (expression.Trim ());
+			else
+				return new ResourceExpressionFields (expression.Substring (0, comma).Trim (),
+								     expression.Substring (comma + 1).Trim ());
 		}
 
 		[MonoTODO]

+ 12 - 10
mcs/class/System.Web/System.Web.Compilation/ResourceExpressionFields.cs

@@ -34,24 +34,26 @@ namespace System.Web.Compilation {
 
 	public sealed class ResourceExpressionFields {
 
-		internal ResourceExpressionFields ()
+		internal ResourceExpressionFields (string classKey, string resourceKey)
 		{
+			this.classKey = classKey;
+			this.resourceKey = resourceKey;
 		}
 
-		[MonoTODO]
-		public string ClassKey {
-			get {
-				throw new NotImplementedException ();
-			}
+		internal ResourceExpressionFields (string resourceKey) : this (null, resourceKey)
+		{
 		}
 
+		public string ClassKey {
+			get { return classKey; }
+		}
 
-		[MonoTODO]
 		public string ResourceKey {
-			get {
-				throw new NotImplementedException ();
-			}
+			get { return resourceKey; }
 		}
+
+		string classKey;
+		string resourceKey;
 	}
 
 }