diff options
author | 杨宇千 <crupest@outlook.com> | 2020-02-01 00:26:35 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-01 00:26:35 +0800 |
commit | d703269e06d4c9e254fe2d5589ff04cdd6a9b366 (patch) | |
tree | f02f8d57440c777d4732bc4439f82e8b25c6732c /Timeline/Services/PasswordBadFormatException.cs | |
parent | 631731e5c2253116a53fdc435afca184251a34fc (diff) | |
parent | bddf1d6eaac782672071df6527c40c81c3123f3a (diff) | |
download | timeline-d703269e06d4c9e254fe2d5589ff04cdd6a9b366.tar.gz timeline-d703269e06d4c9e254fe2d5589ff04cdd6a9b366.tar.bz2 timeline-d703269e06d4c9e254fe2d5589ff04cdd6a9b366.zip |
Merge pull request #56 from crupest/dev
Refactor API to be RESTful.
Diffstat (limited to 'Timeline/Services/PasswordBadFormatException.cs')
-rw-r--r-- | Timeline/Services/PasswordBadFormatException.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Timeline/Services/PasswordBadFormatException.cs b/Timeline/Services/PasswordBadFormatException.cs new file mode 100644 index 00000000..2029ebb4 --- /dev/null +++ b/Timeline/Services/PasswordBadFormatException.cs @@ -0,0 +1,27 @@ +using System;
+
+namespace Timeline.Services
+{
+
+ [Serializable]
+ public class PasswordBadFormatException : Exception
+ {
+ public PasswordBadFormatException() : base(Resources.Services.Exception.PasswordBadFormatException) { }
+ public PasswordBadFormatException(string message) : base(message) { }
+ public PasswordBadFormatException(string message, Exception inner) : base(message, inner) { }
+
+ public PasswordBadFormatException(string password, string validationMessage) : this()
+ {
+ Password = password;
+ ValidationMessage = validationMessage;
+ }
+
+ protected PasswordBadFormatException(
+ System.Runtime.Serialization.SerializationInfo info,
+ System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
+
+ public string Password { get; set; } = "";
+
+ public string ValidationMessage { get; set; } = "";
+ }
+}
|