📄 accountmanager.cs
字号:
#region Using Directives
using System;
using System.Collections.Generic;
using System.Text;
using Org.InteliIM.Configurations.Services;
#endregion
namespace Org.InteliIM.Applications.Tourism.ServiceDesk
{
/// <summary>
/// Represents the manager for accounts.
/// </summary>
public class AccountManager: BasicManager
{
/// <summary>
/// Initializes a new instance of the AccountManager class.
/// </summary>
public AccountManager()
{
}
private Collection<AccountInfo> accounts;
/// <summary>
/// Gets or sets the accounts collection.
/// </summary>
/// <value></value>
public Collection<AccountInfo> Accounts
{
get
{
if (this.accounts == null)
this.accounts = new Collection<AccountInfo>();
return this.accounts;
}
}
/// <summary>
/// Gets the specified user's account info is exists.
/// </summary>
public AccountInfo this[string userId]
{
get
{
foreach(AccountInfo info in this.Accounts)
{
if(info.UserId == userId)
return info;
}
return null;
}
}
/// <summary>
/// Determines whether the account info
/// for the specified user id exists or not.
/// </summary>
public bool Exists(string userId)
{
return (this[userId] != null);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -