From 3dc9460798798e5ba155fae7b6afe84522c2c619 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 17 Jun 2020 17:10:40 +0800 Subject: refactor(back): Refactor timeline service. --- Timeline/Resources/Services/Exception.Designer.cs | 45 ----------------- Timeline/Resources/Services/Exception.resx | 15 ------ Timeline/Resources/Services/Exceptions.Designer.cs | 56 +++++++++++++++++++++- Timeline/Resources/Services/Exceptions.resx | 24 ++++++++-- .../Resources/Services/TimelineService.Designer.cs | 2 +- Timeline/Resources/Services/TimelineService.resx | 2 +- 6 files changed, 78 insertions(+), 66 deletions(-) (limited to 'Timeline/Resources') diff --git a/Timeline/Resources/Services/Exception.Designer.cs b/Timeline/Resources/Services/Exception.Designer.cs index 889aa1a7..21ca7b86 100644 --- a/Timeline/Resources/Services/Exception.Designer.cs +++ b/Timeline/Resources/Services/Exception.Designer.cs @@ -132,51 +132,6 @@ namespace Timeline.Resources.Services { } } - /// - /// Looks up a localized string similar to Image is in valid because {0}.. - /// - internal static string ImageException { - get { - return ResourceManager.GetString("ImageException", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to image is not a square, aka, width is not equal to height. - /// - internal static string ImageExceptionBadSize { - get { - return ResourceManager.GetString("ImageExceptionBadSize", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to failed to decode image, see inner exception. - /// - internal static string ImageExceptionCantDecode { - get { - return ResourceManager.GetString("ImageExceptionCantDecode", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to unknown error. - /// - internal static string ImageExceptionUnknownError { - get { - return ResourceManager.GetString("ImageExceptionUnknownError", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to image's actual mime type is not the specified one. - /// - internal static string ImageExceptionUnmatchedFormat { - get { - return ResourceManager.GetString("ImageExceptionUnmatchedFormat", resourceCulture); - } - } - /// /// Looks up a localized string similar to The token didn't pass verification because {0}.. /// diff --git a/Timeline/Resources/Services/Exception.resx b/Timeline/Resources/Services/Exception.resx index d455f0fc..c31ed7c7 100644 --- a/Timeline/Resources/Services/Exception.resx +++ b/Timeline/Resources/Services/Exception.resx @@ -141,21 +141,6 @@ Unknown format marker. - - Image is in valid because {0}. - - - image is not a square, aka, width is not equal to height - - - failed to decode image, see inner exception - - - unknown error - - - image's actual mime type is not the specified one - The token didn't pass verification because {0}. diff --git a/Timeline/Resources/Services/Exceptions.Designer.cs b/Timeline/Resources/Services/Exceptions.Designer.cs index 84439716..1dbe11c9 100644 --- a/Timeline/Resources/Services/Exceptions.Designer.cs +++ b/Timeline/Resources/Services/Exceptions.Designer.cs @@ -96,6 +96,60 @@ namespace Timeline.Resources.Services { } } + /// + /// Looks up a localized string similar to Image is in valid because {0}.. + /// + internal static string ImageException { + get { + return ResourceManager.GetString("ImageException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to image is not of required size. + /// + internal static string ImageExceptionBadSize { + get { + return ResourceManager.GetString("ImageExceptionBadSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to failed to decode image, see inner exception. + /// + internal static string ImageExceptionCantDecode { + get { + return ResourceManager.GetString("ImageExceptionCantDecode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to unknown error. + /// + internal static string ImageExceptionUnknownError { + get { + return ResourceManager.GetString("ImageExceptionUnknownError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to image's actual mime type is not the specified one. + /// + internal static string ImageExceptionUnmatchedFormat { + get { + return ResourceManager.GetString("ImageExceptionUnmatchedFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The timeline has no data.. + /// + internal static string TimelineNoDataException { + get { + return ResourceManager.GetString("TimelineNoDataException", resourceCulture); + } + } + /// /// Looks up a localized string similar to Request timeline name is "{0}". If this is a personal timeline whose name starts with '@', it means the user does not exist and inner exception should be a UserNotExistException.. /// @@ -115,7 +169,7 @@ namespace Timeline.Resources.Services { } /// - /// Looks up a localized string similar to Request timeline name is "{0}". Request timeline post id is "{1}". The post does not exist because it has been deleted.. + /// Looks up a localized string similar to Request timeline name is "{0}". Request timeline post id is "{1}". The post does not exist because it is deleted.. /// internal static string TimelinePostNotExistExceptionDeleted { get { diff --git a/Timeline/Resources/Services/Exceptions.resx b/Timeline/Resources/Services/Exceptions.resx index b064fd44..e9595caa 100644 --- a/Timeline/Resources/Services/Exceptions.resx +++ b/Timeline/Resources/Services/Exceptions.resx @@ -112,13 +112,31 @@ Request timeline name is "{0}". If this is a personal timeline whose name starts with '@', it means the user does not exist and inner exception should be a UserNotExistException. - - Request timeline name is "{0}". Request timeline post id is "{1}". The post does not exist because it has been deleted. - Request timeline name is "{0}". Request timeline post id is "{1}". Request username is "{0}". Request id is "{1}". + + The timeline has no data. + + + Image is in valid because {0}. + + + image is not of required size + + + failed to decode image, see inner exception + + + unknown error + + + image's actual mime type is not the specified one + + + Request timeline name is "{0}". Request timeline post id is "{1}". The post does not exist because it is deleted. + \ No newline at end of file diff --git a/Timeline/Resources/Services/TimelineService.Designer.cs b/Timeline/Resources/Services/TimelineService.Designer.cs index 4c3de1cd..cfc381f9 100644 --- a/Timeline/Resources/Services/TimelineService.Designer.cs +++ b/Timeline/Resources/Services/TimelineService.Designer.cs @@ -106,7 +106,7 @@ namespace Timeline.Resources.Services { } /// - /// Looks up a localized string similar to The timeline name is of bad format because {0}.. + /// Looks up a localized string similar to The timeline name is of bad format.. /// internal static string ExceptionTimelineNameBadFormat { get { diff --git a/Timeline/Resources/Services/TimelineService.resx b/Timeline/Resources/Services/TimelineService.resx index 97269943..c4f49b30 100644 --- a/Timeline/Resources/Services/TimelineService.resx +++ b/Timeline/Resources/Services/TimelineService.resx @@ -133,7 +133,7 @@ Can't get data of a non-image post. - The timeline name is of bad format because {0}. + The timeline name is of bad format. The timeline with given name already exists. -- cgit v1.2.3