From 8833b4eb1e65dda51abd24b453b86531b3f5f7a8 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 13 Mar 2020 17:05:03 +0800 Subject: Abstract out data cache helper. --- .../Controllers/UserAvatarController.Designer.cs | 27 ----- .../Controllers/UserAvatarController.resx | 9 -- .../Resources/Helper/DataCacheHelper.Designer.cs | 90 ++++++++++++++ Timeline/Resources/Helper/DataCacheHelper.resx | 129 +++++++++++++++++++++ 4 files changed, 219 insertions(+), 36 deletions(-) create mode 100644 Timeline/Resources/Helper/DataCacheHelper.Designer.cs create mode 100644 Timeline/Resources/Helper/DataCacheHelper.resx (limited to 'Timeline/Resources') diff --git a/Timeline/Resources/Controllers/UserAvatarController.Designer.cs b/Timeline/Resources/Controllers/UserAvatarController.Designer.cs index e6eeb1e8..b0c35ff9 100644 --- a/Timeline/Resources/Controllers/UserAvatarController.Designer.cs +++ b/Timeline/Resources/Controllers/UserAvatarController.Designer.cs @@ -96,33 +96,6 @@ namespace Timeline.Resources.Controllers { } } - /// - /// Looks up a localized string similar to Attempt to get a avatar with If-None-Match in bad format.. - /// - internal static string LogGetBadIfNoneMatch { - get { - return ResourceManager.GetString("LogGetBadIfNoneMatch", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Returned full data for a get avatar attempt.. - /// - internal static string LogGetReturnData { - get { - return ResourceManager.GetString("LogGetReturnData", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Returned NotModify for a get avatar attempt.. - /// - internal static string LogGetReturnNotModify { - get { - return ResourceManager.GetString("LogGetReturnNotModify", resourceCulture); - } - } - /// /// Looks up a localized string similar to Attempt to get a avatar of a non-existent user failed.. /// diff --git a/Timeline/Resources/Controllers/UserAvatarController.resx b/Timeline/Resources/Controllers/UserAvatarController.resx index 58860c83..864d96c0 100644 --- a/Timeline/Resources/Controllers/UserAvatarController.resx +++ b/Timeline/Resources/Controllers/UserAvatarController.resx @@ -129,15 +129,6 @@ Succeed to delete a avatar of a user. - - Attempt to get a avatar with If-None-Match in bad format. - - - Returned full data for a get avatar attempt. - - - Returned NotModify for a get avatar attempt. - Attempt to get a avatar of a non-existent user failed. diff --git a/Timeline/Resources/Helper/DataCacheHelper.Designer.cs b/Timeline/Resources/Helper/DataCacheHelper.Designer.cs new file mode 100644 index 00000000..acf56d13 --- /dev/null +++ b/Timeline/Resources/Helper/DataCacheHelper.Designer.cs @@ -0,0 +1,90 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Timeline.Resources.Helper { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class DataCacheHelper { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal DataCacheHelper() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Timeline.Resources.Helper.DataCacheHelper", typeof(DataCacheHelper).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Header If-None-Match is of bad format.. + /// + internal static string LogBadIfNoneMatch { + get { + return ResourceManager.GetString("LogBadIfNoneMatch", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cache is invalid and data is returned.. + /// + internal static string LogResultData { + get { + return ResourceManager.GetString("LogResultData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cache is valid and 304 Not Modified is returned.. + /// + internal static string LogResultNotModified { + get { + return ResourceManager.GetString("LogResultNotModified", resourceCulture); + } + } + } +} diff --git a/Timeline/Resources/Helper/DataCacheHelper.resx b/Timeline/Resources/Helper/DataCacheHelper.resx new file mode 100644 index 00000000..515cfa9b --- /dev/null +++ b/Timeline/Resources/Helper/DataCacheHelper.resx @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Header If-None-Match is of bad format. + + + Cache is invalid and data is returned. + + + Cache is valid and 304 Not Modified is returned. + + \ No newline at end of file -- cgit v1.2.3