iBatis for .NET
  1. iBatis for .NET
  2. IBATISNET-158

TypeAssemblyInfo.SplitTypeAndAssemblyNames

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: DataMapper 1.3
    • Fix Version/s: DataMapper 1.5
    • Component/s: DataMapper
    • Labels:
      None

      Description

      Hi All:

      I'd like to propose a change to the TypeAssemblyInfo internal class within TypeResolver.cs. Please see the proposed code change below.

      private void SplitTypeAndAssemblyNames (string originalTypeName)

      {

      int typeAssemblyIndex

      // Original Code = originalTypeName.IndexOf (

      = originalTypeName.LastIndexOf (

      TypeAssemblyInfo.TypeAssemblySeparator);

      if (typeAssemblyIndex < 0)

      { unresolvedTypeName = originalTypeName; }

      else

      { unresolvedTypeName = originalTypeName.Substring ( 0, typeAssemblyIndex).Trim (); unresolvedAssemblyName = originalTypeName.Substring ( typeAssemblyIndex + 1).Trim (); }

      }

      Changing the call from IndexOf to LastIndexOf allows me to define a .Net 2.0 generic in the listClass attribute of a statement definition. You can see an example below. This syntax is impropertly parsed for a comma without this proposed change.

      <select id="LoadCodesByCategory" parameterMap="CodeData.CodeDataByCategoryParams" resultMap="LoadStateCode" listClass="System.Collections.Generic.List`1[[NFS.Data.Core.DataObjects.Impl.StateCode, NFS.Data.Impl]], mscorlib">

        Activity

          People

          • Assignee:
            Gilles Bayon
            Reporter:
            Chris Potter
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development