Example #1
0
        /// <summary>
        /// ����ڰ� �����ڱ����� ������ �ִ��� Ȯ���Ѵ�.
        /// </summary>
        /// <param name="user">�����</param>
        /// <returns>�����ڱ��� ��������</returns>
        public bool HasModeratorLevel(User user)
        {
            if (user == null)
                throw new ArgumentNullException("user", "������ Ȯ���Ϸ��� ����������� �־����� �մϴ�.");

            return user.Type.HasFlag(UserType.Moderator);
        }
Example #2
0
        /// <summary>
        /// ������
        /// </summary>
        /// <param name="title">����</param>
        /// <param name="content">����</param>
        /// <param name="writer">�ۼ���</param>
        public Post(string title, string content, User writer)
        {
            if (string.IsNullOrEmpty(title))
                throw new ArgumentNullException(title, "���� ������ �ݵ�� �����ؾ� �մϴ�.");

            if (string.IsNullOrEmpty(content))
                throw new ArgumentNullException(content, "���� ������ �ݵ�� �����ؾ� �մϴ�.");

            if (content.Length < 10)
                throw new ArgumentException("���� ������ 10�� �̻��̾�� �մϴ�.");

            // TODO : ORM �����, �����Ǿ�� �մϴ�.
            Id = Guid.NewGuid();

            Title = title;
            Content = content;
            Writer = writer;

            CreateDate = DateTime.Now;
            UpdateDate = DateTime.Now;
        }
Example #3
0
 /// <summary>
 /// �����̿� ������ ���� �����մϴ�.
 /// </summary>
 /// <param name="user">������ �����</param>
 /// <remarks>Logout Process�� �����մϴ�.</remarks>
 public void SignOut(User user)
 {
     throw new NotImplementedException();
 }
Example #4
0
 /// <summary>
 /// ����ڸ� �����մϴ�.
 /// </summary>
 /// <param name="user">�����Ϸ��� �����</param>
 public void RemoveUser(User user)
 {
     throw new NotImplementedException();
 }