aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline/Services/Exceptions/TimelinePostNotExistException.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-04-25 21:20:04 +0800
committercrupest <crupest@outlook.com>2021-04-25 21:20:04 +0800
commita4a75188bd17e31b39a02511bbd6d628bab5c909 (patch)
treef2f9c63eb5beabb7a1a2f2605c2d5022f6a72c08 /BackEnd/Timeline/Services/Exceptions/TimelinePostNotExistException.cs
parent434be212c77bdade04722046e92c3dac25d0aff3 (diff)
downloadtimeline-a4a75188bd17e31b39a02511bbd6d628bab5c909.tar.gz
timeline-a4a75188bd17e31b39a02511bbd6d628bab5c909.tar.bz2
timeline-a4a75188bd17e31b39a02511bbd6d628bab5c909.zip
...
Diffstat (limited to 'BackEnd/Timeline/Services/Exceptions/TimelinePostNotExistException.cs')
-rw-r--r--BackEnd/Timeline/Services/Exceptions/TimelinePostNotExistException.cs38
1 files changed, 0 insertions, 38 deletions
diff --git a/BackEnd/Timeline/Services/Exceptions/TimelinePostNotExistException.cs b/BackEnd/Timeline/Services/Exceptions/TimelinePostNotExistException.cs
deleted file mode 100644
index 2a7b5b28..00000000
--- a/BackEnd/Timeline/Services/Exceptions/TimelinePostNotExistException.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-using System;
-using System.Globalization;
-
-namespace Timeline.Services.Exceptions
-{
- [Serializable]
- public class TimelinePostNotExistException : EntityNotExistException
- {
- public TimelinePostNotExistException() : this(null, null, false, null, null) { }
- [Obsolete("This has no meaning.")]
- public TimelinePostNotExistException(string? message) : this(message, null) { }
- [Obsolete("This has no meaning.")]
- public TimelinePostNotExistException(string? message, Exception? inner) : this(null, null, false, message, inner) { }
- protected TimelinePostNotExistException(
- System.Runtime.Serialization.SerializationInfo info,
- System.Runtime.Serialization.StreamingContext context) : base(info, context) { }
- public TimelinePostNotExistException(long? timelineId, long? postId, bool isDelete, string? message = null, Exception? inner = null)
- : base(EntityNames.TimelinePost, null, MakeMessage(timelineId, postId, isDelete).AppendAdditionalMessage(message), inner)
- {
- TimelineId = timelineId;
- PostId = postId;
- IsDelete = isDelete;
- }
-
- private static string MakeMessage(long? timelineId, long? postId, bool isDelete)
- {
- return string.Format(CultureInfo.InvariantCulture, isDelete ? Resources.Services.Exceptions.TimelinePostNotExistExceptionDeleted : Resources.Services.Exceptions.TimelinePostNotExistException, timelineId, postId);
- }
-
- public long? TimelineId { get; set; }
- public long? PostId { get; set; }
-
- /// <summary>
- /// True if the post is deleted. False if the post does not exist at all.
- /// </summary>
- public bool IsDelete { get; set; }
- }
-}