85 lines
2.0 KiB
C#
85 lines
2.0 KiB
C#
using System;
|
|
using Fantasy;
|
|
using System.Linq;
|
|
using System.Reflection;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Concurrent;
|
|
using NBC;
|
|
using Fantasy.Serialize;
|
|
using LightProto;
|
|
|
|
namespace NBF
|
|
{
|
|
[ProtoContract]
|
|
public sealed partial class RodRingConfig : ASerialize, IConfigTable
|
|
{
|
|
|
|
[ProtoMember(1)]
|
|
public uint Id { get; set; } // Id
|
|
[ProtoMember(2)]
|
|
public string Model { get; set; } // 模型
|
|
[ProtoMember(3)]
|
|
public uint Strength { get; set; } // 强度
|
|
[ProtoIgnore]
|
|
public uint Key => Id;
|
|
|
|
#region Static
|
|
|
|
private static ConfigContext<RodRingConfig> Context => ConfigTableHelper.Table<RodRingConfig>();
|
|
|
|
public static RodRingConfig Get(uint key)
|
|
{
|
|
return Context.Get(key);
|
|
}
|
|
|
|
public static RodRingConfig Get(Predicate<RodRingConfig> match)
|
|
{
|
|
return Context.Get(match);
|
|
}
|
|
|
|
public static RodRingConfig Fist()
|
|
{
|
|
return Context.Fist();
|
|
}
|
|
|
|
public static RodRingConfig Last()
|
|
{
|
|
return Context.Last();
|
|
}
|
|
|
|
public static RodRingConfig Fist(Predicate<RodRingConfig> match)
|
|
{
|
|
return Context.Fist(match);
|
|
}
|
|
|
|
public static RodRingConfig Last(Predicate<RodRingConfig> match)
|
|
{
|
|
return Context.Last(match);
|
|
}
|
|
|
|
public static int Count()
|
|
{
|
|
return Context.Count();
|
|
}
|
|
|
|
public static int Count(Func<RodRingConfig, bool> predicate)
|
|
{
|
|
return Context.Count(predicate);
|
|
}
|
|
|
|
public static List<RodRingConfig> GetList()
|
|
{
|
|
return Context.GetList();
|
|
}
|
|
|
|
public static List<RodRingConfig> GetList(Predicate<RodRingConfig> match)
|
|
{
|
|
return Context.GetList(match);
|
|
}
|
|
public static void ParseJson(Newtonsoft.Json.Linq.JArray arr)
|
|
{
|
|
ConfigTableHelper.ParseLine<RodRingConfig>(arr);
|
|
}
|
|
#endregion
|
|
}
|
|
} |