diff options
| Commit | f2732d11fdc2036c85092b59a4a78719260d2aea (patch) | |
|---|---|---|
| Author | 2020-12-08 16:07:32 +0200 | |
| Committer | 2020-12-08 16:10:30 +0200 | |
| Files | 748b36e15810aaf57d8dbfb85406613e9f8a1f79 /Models | |
| DevHive-f2732d11fdc2036c85092b59a4a78719260d2aea.tar DevHive-f2732d11fdc2036c85092b59a4a78719260d2aea.tar.gz DevHive-f2732d11fdc2036c85092b59a4a78719260d2aea.zip | ||
| Parent | e127d34d095b8d77577e647bf330f8dc2a8f5ffc (diff) | |
Added a bit of documentation of User class
1 files changed, 9 insertions, 1 deletions
| -rw-r--r-- | Models/Classes/User.cs | 10 |
diff --git a/Models/Classes/User.cs b/Models/Classes/User.cs index 2549f81..4903679 100644 --- a/Models/Classes/User.cs +++ b/Models/Classes/User.cs @@ -53,7 +53,11 @@ namespace Models.Classes } public List<User<T>> Friends { get; set; } - + + /// <summary> + /// Throws an argument exception if the given value is not composed only of letters, and if specified, also of digits. + /// Does nothing otherwise. + /// </summary> private static void ValidateString(string name, int minLength, int maxLength, string value, bool canBeDigit) { if (value.Length < minLength || value.Length > maxLength) throw new ArgumentException($"{name} length cannot be less than {minLength} and more than {maxLength}."); @@ -64,6 +68,10 @@ namespace Models.Classes } } + /// <summary> + /// Throws an exception if the absolute url isn't valid. + /// Does nothing otherwise. + /// </summary> private static void ValidateURL(string urlValue) { // Throws an error is URL is invalid Uri validatedUri; |
