From 52acf41e331ddbd66befed4692c804b754ba7d5c Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 30 Jan 2020 20:26:52 +0800 Subject: ... --- .../TimelineMemberOperationUserException.cs | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100644 Timeline/Services/TimelineMemberOperationUserException.cs (limited to 'Timeline/Services/TimelineMemberOperationUserException.cs') diff --git a/Timeline/Services/TimelineMemberOperationUserException.cs b/Timeline/Services/TimelineMemberOperationUserException.cs deleted file mode 100644 index 543ee160..00000000 --- a/Timeline/Services/TimelineMemberOperationUserException.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Globalization; - -namespace Timeline.Services -{ - [Serializable] - public class TimelineMemberOperationUserException : Exception - { - public enum MemberOperation - { - Add, - Remove - } - - public TimelineMemberOperationUserException() : base(Resources.Services.Exception.TimelineMemberOperationException) { } - public TimelineMemberOperationUserException(string message) : base(message) { } - public TimelineMemberOperationUserException(string message, Exception inner) : base(message, inner) { } - protected TimelineMemberOperationUserException( - System.Runtime.Serialization.SerializationInfo info, - System.Runtime.Serialization.StreamingContext context) : base(info, context) { } - - public TimelineMemberOperationUserException(int index, MemberOperation operation, string username, Exception inner) - : base(MakeMessage(operation, index), inner) { Operation = operation; Index = index; Username = username; } - - private static string MakeMessage(MemberOperation operation, int index) => string.Format(CultureInfo.CurrentCulture, - Resources.Services.Exception.TimelineMemberOperationExceptionDetail, operation, index); - - public MemberOperation? Operation { get; set; } - - /// - /// The index of the member on which the operation failed. - /// - public int? Index { get; set; } - - public string? Username { get; set; } - } -} -- cgit v1.2.3