DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB

Fixing the pascal casing logic to better preserve the Umbraco-sepecified casing of generated types in linq to umbraco

[TFS Changeset #55792]
This commit is contained in:
slace
2009-07-01 13:19:21 +00:00
parent a68b657a11
commit b30c526bd3
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--Created with Liquid XML Studio 6.1.18.0 - FREE Community Edition (http://www.liquid-technologies.com)-->
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="nodeType">
<xs:sequence>

View File

@@ -14,6 +14,7 @@ using System.Globalization;
using System.Reflection;
using umbraco.Linq.DTMetal.CodeBuilder.DataType;
using VB = Microsoft.VisualBasic;
using System.Text.RegularExpressions;
namespace umbraco.Linq.DTMetal.CodeBuilder
{
@@ -135,7 +136,7 @@ namespace umbraco.Linq.DTMetal.CodeBuilder
using (var sw = new StreamWriter(stream))
{
this.Args.Provider.GenerateCodeFromCompileUnit(this.Code, sw, options);
this.Args.Provider.GenerateCodeFromCompileUnit(this.Code, sw, options);
}
}
@@ -725,6 +726,7 @@ namespace umbraco.Linq.DTMetal.CodeBuilder
var invalids = new string[] { "_", "-", ".", "$", "@", "*" };
input = Regex.Replace(input, "([A-Z])", " $1", RegexOptions.Compiled);
input = input.Trim().ToLower();
foreach (var i in invalids)
@@ -736,7 +738,6 @@ namespace umbraco.Linq.DTMetal.CodeBuilder
var correctCasedAsArray = correctCasedInput.Split(' ').Where(s => !string.IsNullOrEmpty(s));
//var firstItem = correctCasedAsArray[0];
StringBuilder ret = new StringBuilder();
var foundChar = false;
foreach (var item in correctCasedAsArray)