Workaround unclosed tag issue, update .gitignore
This commit is contained in:
parent
d9c717de6f
commit
001a410cc5
2
GC-local-server-rewrite/.gitignore
vendored
2
GC-local-server-rewrite/.gitignore
vendored
@ -435,3 +435,5 @@ MigrationBackup/
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
# Ignore card db since we should start from scratch
|
||||
/db/card.db3
|
||||
|
@ -440,20 +440,21 @@ public class CardServiceController : WebApiController
|
||||
{
|
||||
var stringBuilder = new StringBuilder();
|
||||
|
||||
for (var i = 0; i < list.Count; i++)
|
||||
{
|
||||
var obj = list[i];
|
||||
obj.RecordId = i + 1;
|
||||
}
|
||||
|
||||
using (var writer = new ChoXmlWriter<T>(stringBuilder))
|
||||
{
|
||||
writer.Configuration.OmitXmlDeclaration = false;
|
||||
writer.Configuration.UseXmlSerialization = true;
|
||||
writer.WithXPath(xpath);
|
||||
|
||||
for (var i = 0; i < list.Count; i++)
|
||||
{
|
||||
var obj = list[i];
|
||||
obj.RecordId = i + 1;
|
||||
writer.Write(obj);
|
||||
}
|
||||
writer.Write(list);
|
||||
}
|
||||
|
||||
stringBuilder.Insert(stringBuilder.Length - 5, "/");
|
||||
return stringBuilder.ToString();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user