bin/Debug/net6.0-windows/Templete.txt
(完整代码) 1KBusing System;
using System.Collections.Generic;
namespace ConfigData
{
// from (from)
public partial class Sub(classname)
{
protected LitJson.JsonData mData;
(protectfields)
public readonly int Count;
public Sub(classname)(LitJson.JsonData data)
{
mData = data;
Count = mData.Count;
}
(fileds)
}
public partial class (classname)
{
protected Dictionary<int, Sub(classname)> mData;
public readonly int Count;
public bool Contains(int key)=> mData.ContainsKey(key);
public void ForEach(Action<int, Sub(classname)> action) {mData.ForEach(action); }
public void ForEach(Func<int, Sub(classname), bool> action) {mData.ForEach(action); }
public (classname)(LitJson.JsonData data)
{
mData = new Dictionary<int, Sub(classname)>();
LitJsonExtensions.Load<Sub(classname)>(mData, data, (d) => new Sub(classname)(d));
Count = mData.Count;
}
public Sub(classname) this[int key]
{
get
{
if(mData.TryGetValue(key, out Sub(classname) result))
return result;
throw new Exception(string.Format("{0} has not value of {1}", typeof((classname)), key));
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
