diff options
author | crupest <crupest@outlook.com> | 2020-08-21 22:52:20 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-21 22:52:20 +0800 |
commit | 96fe96b87abb9cdefd83cd26732bb251f90b4aa3 (patch) | |
tree | 885ac3af4f3e004d9ba919d4f3a5cdcc8037a86f | |
parent | b5a99a32ee46a045231a9bd5224b945667bc5033 (diff) | |
download | timeline-96fe96b87abb9cdefd83cd26732bb251f90b4aa3.tar.gz timeline-96fe96b87abb9cdefd83cd26732bb251f90b4aa3.tar.bz2 timeline-96fe96b87abb9cdefd83cd26732bb251f90b4aa3.zip |
...
-rw-r--r-- | Timeline.ErrorCodes/ErrorCodes.cs | 5 | ||||
-rw-r--r-- | Timeline/Models/Http/ErrorResponse.cs | 50 |
2 files changed, 0 insertions, 55 deletions
diff --git a/Timeline.ErrorCodes/ErrorCodes.cs b/Timeline.ErrorCodes/ErrorCodes.cs index 4637242a..91e0c1fd 100644 --- a/Timeline.ErrorCodes/ErrorCodes.cs +++ b/Timeline.ErrorCodes/ErrorCodes.cs @@ -17,16 +17,11 @@ public static class Header
{
public const int IfNonMatch_BadFormat = 1_000_01_01;
- public const int ContentType_Missing = 1_000_02_01;
- public const int ContentLength_Missing = 1_000_03_01;
- public const int ContentLength_Zero = 1_000_03_02;
}
public static class Content
{
public const int TooBig = 1_000_11_01;
- public const int UnmatchedLength_Smaller = 1_000_11_02;
- public const int UnmatchedLength_Bigger = 1_000_11_03;
}
}
diff --git a/Timeline/Models/Http/ErrorResponse.cs b/Timeline/Models/Http/ErrorResponse.cs index 9a4d190a..7ba536f9 100644 --- a/Timeline/Models/Http/ErrorResponse.cs +++ b/Timeline/Models/Http/ErrorResponse.cs @@ -53,36 +53,6 @@ namespace Timeline.Models.Http return new CommonResponse(ErrorCodes.Common.Header.IfNonMatch_BadFormat, string.Format(message, formatArgs));
}
- public static CommonResponse ContentType_Missing(params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Header.ContentType_Missing, string.Format(Common_Header_ContentType_Missing, formatArgs));
- }
-
- public static CommonResponse CustomMessage_ContentType_Missing(string message, params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Header.ContentType_Missing, string.Format(message, formatArgs));
- }
-
- public static CommonResponse ContentLength_Missing(params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Header.ContentLength_Missing, string.Format(Common_Header_ContentLength_Missing, formatArgs));
- }
-
- public static CommonResponse CustomMessage_ContentLength_Missing(string message, params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Header.ContentLength_Missing, string.Format(message, formatArgs));
- }
-
- public static CommonResponse ContentLength_Zero(params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Header.ContentLength_Zero, string.Format(Common_Header_ContentLength_Zero, formatArgs));
- }
-
- public static CommonResponse CustomMessage_ContentLength_Zero(string message, params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Header.ContentLength_Zero, string.Format(message, formatArgs));
- }
-
}
public static class Content
@@ -98,26 +68,6 @@ namespace Timeline.Models.Http return new CommonResponse(ErrorCodes.Common.Content.TooBig, string.Format(message, formatArgs));
}
- public static CommonResponse UnmatchedLength_Smaller(params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Content.UnmatchedLength_Smaller, string.Format(Common_Content_UnmatchedLength_Smaller, formatArgs));
- }
-
- public static CommonResponse CustomMessage_UnmatchedLength_Smaller(string message, params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Content.UnmatchedLength_Smaller, string.Format(message, formatArgs));
- }
-
- public static CommonResponse UnmatchedLength_Bigger(params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Content.UnmatchedLength_Bigger, string.Format(Common_Content_UnmatchedLength_Bigger, formatArgs));
- }
-
- public static CommonResponse CustomMessage_UnmatchedLength_Bigger(string message, params object?[] formatArgs)
- {
- return new CommonResponse(ErrorCodes.Common.Content.UnmatchedLength_Bigger, string.Format(message, formatArgs));
- }
-
}
}
|