You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ibatis.apache.org by rg...@apache.org on 2005/10/14 23:49:27 UTC

svn commit: r321223 - /ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs

Author: rgrabowski
Date: Fri Oct 14 14:49:16 2005
New Revision: 321223

URL: http://svn.apache.org/viewcvs?rev=321223&view=rev
Log:
Fix for IBATISNET-122: Allow Resources.cs to process non-fullly-qualified-types. IsAssemblyQualified will return false if the type name is not fully qualified (i.e. the type name does not contain a comma).

Modified:
    ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs

Modified: ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs
URL: http://svn.apache.org/viewcvs/ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs?rev=321223&r1=321222&r2=321223&view=diff
==============================================================================
--- ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs (original)
+++ ibatis/trunk/cs/mapper/IBatisNet.Common/Utilities/Resources.cs Fri Oct 14 14:49:16 2005
@@ -617,20 +617,18 @@
 			private void SplitFileAndAssemblyNames (string originalFileName) 
 			{
 				_originalFileName = originalFileName;
-				int separatorIndex = originalFileName.IndexOf (
-					FileAssemblyInfo.FileAssemblySeparator);
+
+				int separatorIndex = originalFileName.IndexOf(FileAssemblyInfo.FileAssemblySeparator);
+				
 				if (separatorIndex < 0)
 				{
-					throw new ConfigurationException(
-						string.Format("Unable to find assembly part to load embedded resource in string \"{0}\".",
-						originalFileName));
+					_unresolvedFileName = originalFileName.Trim();
+					_unresolvedAssemblyName = null; // IsAssemblyQualified will return false
 				} 
 				else
 				{
-					_unresolvedFileName = originalFileName.Substring (
-						0, separatorIndex).Trim ();
-					_unresolvedAssemblyName = originalFileName.Substring (
-						separatorIndex + 1).Trim ();
+					_unresolvedFileName = originalFileName.Substring(0, separatorIndex).Trim();
+					_unresolvedAssemblyName = originalFileName.Substring(separatorIndex + 1).Trim();
 				}
 			}
 			#endregion