This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2023-11-05 03:26:09 +08:00
parent ec4d6a15d7
commit 0014eff5e0
4034 changed files with 623229 additions and 41 deletions

View File

@@ -0,0 +1,8 @@
namespace Luban
{
public abstract class BeanBase : ITypeId
{
public abstract int GetTypeId();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2a1978c3ede87404e99b5429f92b2eb9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 07bfa7e432cf1334ca285411f9c97a9a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
namespace Luban
{
public interface ITypeId
{
int GetTypeId();
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 08eef6b77ab6ede4997166dc812a918f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,52 @@
using System.Collections.Generic;
using System.Text;
namespace Luban
{
public static class StringUtil
{
public static string ToStr(object o)
{
return ToStr(o, new StringBuilder());
}
public static string ToStr(object o, StringBuilder sb)
{
foreach (var p in o.GetType().GetFields())
{
sb.Append($"{p.Name} = {p.GetValue(o)},");
}
foreach (var p in o.GetType().GetProperties())
{
sb.Append($"{p.Name} = {p.GetValue(o)},");
}
return sb.ToString();
}
public static string ArrayToString<T>(T[] arr)
{
return "[" + string.Join(",", arr) + "]";
}
public static string CollectionToString<T>(IEnumerable<T> arr)
{
return "[" + string.Join(",", arr) + "]";
}
public static string CollectionToString<TK, TV>(IDictionary<TK, TV> dic)
{
var sb = new StringBuilder('{');
foreach (var e in dic)
{
sb.Append(e.Key).Append(':');
sb.Append(e.Value).Append(',');
}
sb.Append('}');
return sb.ToString();
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ef82068810e5599439c5346fba3b0f97
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: