コード例 #1
0
		public DefaultRole(string id, string name, string description, DefaultRole subrole = null)
		{
			Id = Verify.ArgumentNotNull(id, "id");
			Name = Verify.ArgumentNotNull(name, "name");
			Description = Verify.ArgumentNotNull(description, "description");
			Subrole = subrole;
		}
コード例 #2
0
		public Permission(string id, string description, params DefaultRole[] defaultRoles)
		{
			Id = Verify.ArgumentNotNull(id, "id");
			Description = Verify.ArgumentNotNull(description, "description");
			var copy = new DefaultRole[defaultRoles.Length];
			Array.Copy(defaultRoles, copy, defaultRoles.Length);
			DefaultRoles = new ReadOnlyCollection<DefaultRole>(copy);
		}