diff options
author | 杨宇千 <crupest@outlook.com> | 2019-10-24 20:15:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-24 20:15:58 +0800 |
commit | 7305358a88ffc87f51f7b78deb4f07ef99120beb (patch) | |
tree | 7ca5010a06829cc5fadea1ea17ae72d082fc344c /Timeline/Services/UsernameBadFormatException.cs | |
parent | 297d0c9029360f1d5334ed843b9b299356740ec1 (diff) | |
parent | a0f3cd7599a48c14fb5492fb1c6e2dbd0a82fb45 (diff) | |
download | timeline-7305358a88ffc87f51f7b78deb4f07ef99120beb.tar.gz timeline-7305358a88ffc87f51f7b78deb4f07ef99120beb.tar.bz2 timeline-7305358a88ffc87f51f7b78deb4f07ef99120beb.zip |
Merge pull request #50 from crupest/refactor
Refactor : A Huge Step
Diffstat (limited to 'Timeline/Services/UsernameBadFormatException.cs')
-rw-r--r-- | Timeline/Services/UsernameBadFormatException.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Timeline/Services/UsernameBadFormatException.cs b/Timeline/Services/UsernameBadFormatException.cs new file mode 100644 index 00000000..04354d22 --- /dev/null +++ b/Timeline/Services/UsernameBadFormatException.cs @@ -0,0 +1,27 @@ +using System;
+
+namespace Timeline.Services
+{
+ /// <summary>
+ /// Thrown when username is of bad format.
+ /// </summary>
+ [Serializable]
+ public class UsernameBadFormatException : Exception
+ {
+ public UsernameBadFormatException() : base(Resources.Services.Exception.UsernameBadFormatException) { }
+ public UsernameBadFormatException(string message) : base(message) { }
+ public UsernameBadFormatException(string message, Exception inner) : base(message, inner) { }
+
+ public UsernameBadFormatException(string username, string message) : base(message) { Username = username; }
+ public UsernameBadFormatException(string username, string message, Exception inner) : base(message, inner) { Username = username; }
+
+ protected UsernameBadFormatException(
+ System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
+
+ /// <summary>
+ /// Username of bad format.
+ /// </summary>
+ public string? Username { get; private set; }
+ }
+}
|