Commons/AccountSubjectList.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static VoucherGridCtl.Commons.Consts;
namespace VoucherGridCtl.Commons
{
/// <summary>
/// 缓存基础数据,由VoucherGrid对外暴露接口写入
/// </summary>
public class AccountSubjectList
{
//用event 关键字声明事件对象
public event GetAccountSubjectListEventHandler GetAccountSubjectListEvent;
static AccountSubjectList cache = null;
public static AccountSubjectList Instance
{
get
{
if (cache == null)
{
cache = new AccountSubjectList();
}
return cache;
}
}
public static List<AccountSubjectObj> Get()
{
var list = Instance.AccountSubjectObjects;
return list;
}
public static AccountSubjectObj Find(long accountSubjectId)
{
var accountSubjectObj = Instance.AccountSubjectObjects.FirstOrDefault(item => item.id == accountSubjectId);
if (accountSubjectObj == null)
{
accountSubjectObj = new AccountSubjectObj();
}
return accountSubjectObj;
}
public static AccountSubjectObj FindByNo(string no)
{
var accountSubjectObj = Instance.AccountSubjectObjects.FirstOrDefault(item => item.no == no);
if (accountSubjectObj == null)
{
accountSubjectObj = new AccountSubjectObj();
}
return accountSubjectObj;
}
List<AccountSubjectObj> AccountSubjectObjects
{
后面还有 12 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。