030
This commit is contained in:
@@ -16,6 +16,7 @@ namespace DTLib.Dtsod
|
||||
// парсер теперь не может игнорировать комменты, потом починю
|
||||
// теперь числовые значения конвертируются в правильный тип, а не в int64/uint64 (новый вариант switch из c#9.0 делал какую-то херню)
|
||||
// исправлены некоторые другие баги
|
||||
|
||||
public class DtsodV21 : Dictionary<string, dynamic>
|
||||
{
|
||||
static readonly bool debug = false;
|
||||
@@ -82,15 +83,6 @@ namespace DTLib.Dtsod
|
||||
List,
|
||||
Complex,
|
||||
String,
|
||||
/*Double,
|
||||
Long,
|
||||
Ulong,
|
||||
Short,
|
||||
Ushort,
|
||||
Int,
|
||||
Uint,
|
||||
Null,
|
||||
Bool,*/
|
||||
Default
|
||||
}
|
||||
|
||||
@@ -356,7 +348,6 @@ namespace DTLib.Dtsod
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Debug(params string[] msg)
|
||||
{
|
||||
if(debug)
|
||||
@@ -369,3 +360,4 @@ namespace DTLib.Dtsod
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,23 @@ namespace DTLib.Dtsod
|
||||
}
|
||||
}
|
||||
|
||||
public enum ValueTypes
|
||||
{
|
||||
List,
|
||||
Complex,
|
||||
String,
|
||||
Short,
|
||||
Int,
|
||||
Long,
|
||||
UShort,
|
||||
UInt,
|
||||
ULong,
|
||||
Double,
|
||||
Null,
|
||||
Bool,
|
||||
Unknown
|
||||
}
|
||||
|
||||
public DtsodV22() { }
|
||||
|
||||
public DtsodV22(string text)
|
||||
@@ -51,7 +68,6 @@ namespace DTLib.Dtsod
|
||||
Add(pair.Key, pair.Value);
|
||||
}
|
||||
|
||||
|
||||
public DtsodV22(Dictionary<string, DtsodV22.ValueStruct> dict)
|
||||
{
|
||||
foreach(KeyValuePair<string, ValueStruct> pair in dict)
|
||||
|
||||
14
Dtsod/V30/DtsodSerializableAttribute.cs
Normal file
14
Dtsod/V30/DtsodSerializableAttribute.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTLib.Dtsod
|
||||
{
|
||||
public class DtsodSerializableAttribute : Attribute
|
||||
{
|
||||
public DtsodVersion Version;
|
||||
public DtsodSerializableAttribute(DtsodVersion ver) => Version=ver;
|
||||
}
|
||||
}
|
||||
23
Dtsod/V30/DtsodV30.cs
Normal file
23
Dtsod/V30/DtsodV30.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DTLib.Dtsod
|
||||
{
|
||||
static public class DtsodV30
|
||||
{
|
||||
/*
|
||||
public static DtsodV30 FromObject(object target)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public T ToObject<T>()
|
||||
{
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
9
Dtsod/V30/DtsodVersion.cs
Normal file
9
Dtsod/V30/DtsodVersion.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace DTLib.Dtsod
|
||||
{
|
||||
public enum DtsodVersion : byte
|
||||
{
|
||||
V21 = 21,
|
||||
V22 = 22,
|
||||
V30 = 30
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace DTLib.Dtsod
|
||||
{
|
||||
public enum ValueTypes
|
||||
{
|
||||
List,
|
||||
Complex,
|
||||
String,
|
||||
Short,
|
||||
Int,
|
||||
Long,
|
||||
UShort,
|
||||
UInt,
|
||||
ULong,
|
||||
Double,
|
||||
Null,
|
||||
Bool,
|
||||
Unknown
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user