Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f697eba

Browse files
committedApr 23, 2017
Array.Copy
1 parent 5539be7 commit f697eba

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed
 

‎TableML/TableML/TableFileGeneric.cs

+3-2
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,12 @@ protected bool ParseReader(TextReader oReader)
144144
return false;
145145
}
146146

147-
147+
//NOTE 如果第一行为null则会exception
148148
string[] firstLineSplitString = headLine.Split(_config.Separators, StringSplitOptions.None); // don't remove RemoveEmptyEntries!
149-
string[] firstLineDef = new string[firstLineSplitString.Length];
150149

151150
var metaLineArr = metaLine.Split(_config.Separators, StringSplitOptions.None);
151+
string[] firstLineDef = new string[metaLineArr.Length];
152+
Console.WriteLine("headLine.length={0},headMeta.length={1}", firstLineSplitString.Length, metaLineArr.Length);
152153
Array.Copy(metaLineArr, 0, firstLineDef, 0, metaLineArr.Length); // 拷贝,确保不会超出表头的
153154

154155
for (int i = 0; i < firstLineSplitString.Length; i++)

‎TableML/TableML/TableFileRow.cs

-12
Original file line numberDiff line numberDiff line change
@@ -87,18 +87,6 @@ private void Ctor(int rowNumber, Dictionary<string, HeaderInfo> headerInfos)
8787
/// </summary>
8888

8989

90-
//private string[] values;
91-
//public string[] Values
92-
//{
93-
// get
94-
// {
95-
// var newVal = new List<string>(values);
96-
// //newVal.Insert(0, "temp");
97-
// return newVal.ToArray();
98-
// }
99-
// internal set { values = value; }
100-
//}
101-
10290
public string[] Values { get; internal set; }
10391

10492
/// <summary>

‎TableML/TableMLCompilerConsole/LocalDebug.cs

+19-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public static void Main(string[] args)
1818
{
1919
//CompileOne();
2020

21+
//CopyTo();
2122
CompileAll();
2223

2324
//LoadTest();
@@ -69,10 +70,10 @@ public static void CompileAll()
6970
string templateString = DefaultTemplate.GenSingleClassCodeTemplate;
7071

7172
var results = batchCompiler.CompileTableMLAllInSingleFile(srcDirectory, OutputDirectory, CodeFilePath,
72-
templateString, "AppSettings", ".tml",settingCodeIgnorePattern,true);
73+
templateString, "AppSettings", ".tml", settingCodeIgnorePattern, true);
7374

7475
Console.WriteLine("Done!");
75-
76+
7677
}
7778

7879
public static void LoadTest()
@@ -83,5 +84,21 @@ public static void LoadTest()
8384
var aa = tab;
8485
}
8586

87+
public static void CopyToH()
88+
{
89+
//home pc
90+
string srcDir = @"d:\Git\TableML\TableML\TableMLCompilerConsole\bin\Debug\";
91+
string dstDir = @"d:\Git\KSFramework_xLua\KSFramework\Assets\Plugins\KEngine\KEngine.Lib\TableML\";
92+
string dstTCDir = @"d:\Git\KSFramework_xLua\KSFramework\Assets\Plugins\KEngine\Editor\KEngineEditor\KEngine.Editor\TableMLCompiler\";
93+
94+
string srcTDll = srcDir + "TableML.dll";
95+
string dstTDLL = dstDir + "TableML.dll";
96+
File.Copy(srcTDll, dstTDLL, true);
97+
98+
string srcTCDLL = srcDir + "TableMLCompiler.dll";
99+
string dstTCDLL = dstTCDir + "TableMLCompiler.dll";
100+
File.Copy(srcTCDLL, dstTCDLL, true);
101+
}
102+
86103
}
87104
}

0 commit comments

Comments
 (0)
Please sign in to comment.