温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:LiveBlog v1.0测试版源码
当前文件:
LiveBlog/LiveBlog.Core/Role.cs,打开代码结构图
LiveBlog/LiveBlog.Core/Role.cs,打开代码结构图1using System; 2
using System.Collections.Generic; 3
using System.Collections.ObjectModel; 4
using System.Xml.Serialization; 5
6
namespace LiveBlog.Core 7
{ 8
/// <summary> 9
/// 10
/// </summary> 11
public class Role 12
{ 13
private string _Name; 14
private List<string> _UserNames; 15
16
/// <summary> 17
/// Initializes a new instance of the <see cref="Role"/> class. 18
/// </summary> 19
/// <param name="name">A name.</param> 20
public Role(string name) 21
{ 22
_Name = name; 23
_UserNames = new List<string>(); 24
} 25
26
/// <summary> 27
/// Initializes a new instance of the <see cref="Role"/> class. 28
/// </summary> 29
public Role() 30
{ 31
_UserNames = new List<string>(); 32
} 33
34
/// <summary> 35
/// Initializes a new instance of the <see cref="Role"/> class. 36
/// </summary> 37
/// <param name="name">A name.</param> 38
/// <param name="userNames">A list of users in role.</param> 39
public Role(string name, List<string> userNames) 40
{ 41
_Name = name; 42
_UserNames = userNames; 43
} 44
45
46
/// <summary> 47
/// Gets or sets the name. 48
/// </summary> 49
/// <value>The name.</value> 50
public string Name 51
{ 52
get { return _Name; } 53
set { _Name = value; } 54
} 55
56
/// <summary> 57
/// Gets the users. 58
/// </summary> 59
/// <value>The users.</value> 60
public List<string> Users 61
{ 62
get { return _UserNames; } 63
//set { _UserNames = value; } 64
} 65
} 66
67
68
} 69





}