コード例 #1
0
ファイル: moreStuff.cs プロジェクト: EBojilova/CSharpHQC
 public string RegisterUser(string username, string password, string confirmPassword)
 {
     if (Data.TheUserWhichHasCurrentlyLoggedIntoTheIssueTrackingSystem == null)
         return string.Format("There is already a logged in user");
     if (password != confirmPassword)
         return string.Format("The provided passwords do not match", username);
     if (Data.users_dict.ContainsKey(username))
         return string.Format("A user with username {0} already exists", username);
     var user = new buhtig.Stuff.Benutzer(username, password); Data.users_dict.Add(username, user);
     return string.Format("User {0} registered successfully", username);
 }
コード例 #2
0
        public string RegisterUser(string username, string password, string confirmPassword)
        {
            if (Data.TheUserWhichHasCurrentlyLoggedIntoTheIssueTrackingSystem == null)
            {
                return(string.Format("There is already a logged in user"));
            }
            if (password != confirmPassword)
            {
                return(string.Format("The provided passwords do not match", username));
            }
            if (Data.users_dict.ContainsKey(username))
            {
                return(string.Format("A user with username {0} already exists", username));
            }
            var user = new buhtig.Stuff.Benutzer(username, password); Data.users_dict.Add(username, user);

            return(string.Format("User {0} registered successfully", username));
        }
コード例 #3
0
 public Kommentar(Benutzer author, string text)
 {
     this.Author = author;
     this.Text   = text;
 }
コード例 #4
0
ファイル: Stuff.cs プロジェクト: EBojilova/CSharpHQC
 public Kommentar(Benutzer author, string text)
 {
     this.Author = author;
     this.Text = text;
 }