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