From c2998e5833da46bbe5539bb4ce49fb3f10867a1d Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 30 Apr 2021 18:09:01 +0800 Subject: refactor: ... --- .../Timeline/Models/Validation/NameValidator.cs | 9 +- .../Models/Validation/NicknameValidator.cs | 3 +- .../Models/Validation/Resource.Designer.cs | 153 +++++++++++++++++++++ BackEnd/Timeline/Models/Validation/Resource.resx | 150 ++++++++++++++++++++ BackEnd/Timeline/Models/Validation/Validator.cs | 11 +- .../Resources/Helper/DataCacheHelper.Designer.cs | 90 ------------ .../Timeline/Resources/Helper/DataCacheHelper.resx | 129 ----------------- .../Models/Validation/NameValidator.Designer.cs | 99 ------------- .../Resources/Models/Validation/NameValidator.resx | 132 ------------------ .../Validation/NicknameValidator.Designer.cs | 72 ---------- .../Models/Validation/NicknameValidator.resx | 123 ----------------- .../Models/Validation/Validator.Designer.cs | 108 --------------- .../Resources/Models/Validation/Validator.resx | 135 ------------------ BackEnd/Timeline/Timeline.csproj | 41 +----- 14 files changed, 320 insertions(+), 935 deletions(-) create mode 100644 BackEnd/Timeline/Models/Validation/Resource.Designer.cs create mode 100644 BackEnd/Timeline/Models/Validation/Resource.resx delete mode 100644 BackEnd/Timeline/Resources/Helper/DataCacheHelper.Designer.cs delete mode 100644 BackEnd/Timeline/Resources/Helper/DataCacheHelper.resx delete mode 100644 BackEnd/Timeline/Resources/Models/Validation/NameValidator.Designer.cs delete mode 100644 BackEnd/Timeline/Resources/Models/Validation/NameValidator.resx delete mode 100644 BackEnd/Timeline/Resources/Models/Validation/NicknameValidator.Designer.cs delete mode 100644 BackEnd/Timeline/Resources/Models/Validation/NicknameValidator.resx delete mode 100644 BackEnd/Timeline/Resources/Models/Validation/Validator.Designer.cs delete mode 100644 BackEnd/Timeline/Resources/Models/Validation/Validator.resx (limited to 'BackEnd/Timeline') diff --git a/BackEnd/Timeline/Models/Validation/NameValidator.cs b/BackEnd/Timeline/Models/Validation/NameValidator.cs index b74c40b7..2220de6f 100644 --- a/BackEnd/Timeline/Models/Validation/NameValidator.cs +++ b/BackEnd/Timeline/Models/Validation/NameValidator.cs @@ -1,6 +1,5 @@ using System.Linq; using System.Text.RegularExpressions; -using static Timeline.Resources.Models.Validation.NameValidator; namespace Timeline.Models.Validation { @@ -14,26 +13,26 @@ namespace Timeline.Models.Validation { if (value.Length == 0) { - return (false, MessageEmptyString); + return (false, Resource.NameCantBeEmpty); } if (value.Length > MaxLength) { - return (false, MessageTooLong); + return (false, string.Format(Resource.NameCantBeLongerThan, MaxLength)); } foreach ((char c, int i) in value.Select((c, i) => (c, i))) { if (!(char.IsLetterOrDigit(c) || c == '-' || c == '_')) { - return (false, MessageInvalidChar); + return (false, Resource.NameInvalidChar); } } // Currently name can't be longer than 26. So this is not needed. But reserve it for future use. if (UniqueIdRegex.IsMatch(value)) { - return (false, MessageUnqiueId); + return (false, Resource.NameCantBeUniqueIdPattern); } return (true, GetSuccessMessage()); diff --git a/BackEnd/Timeline/Models/Validation/NicknameValidator.cs b/BackEnd/Timeline/Models/Validation/NicknameValidator.cs index 1d6ab163..43365dce 100644 --- a/BackEnd/Timeline/Models/Validation/NicknameValidator.cs +++ b/BackEnd/Timeline/Models/Validation/NicknameValidator.cs @@ -1,5 +1,4 @@ using System; -using static Timeline.Resources.Models.Validation.NicknameValidator; namespace Timeline.Models.Validation { @@ -8,7 +7,7 @@ namespace Timeline.Models.Validation protected override (bool, string) DoValidate(string value) { if (value.Length > 25) - return (false, MessageTooLong); + return (false, Resource.NicknameTooLong); return (true, GetSuccessMessage()); } diff --git a/BackEnd/Timeline/Models/Validation/Resource.Designer.cs b/BackEnd/Timeline/Models/Validation/Resource.Designer.cs new file mode 100644 index 00000000..47ad4248 --- /dev/null +++ b/BackEnd/Timeline/Models/Validation/Resource.Designer.cs @@ -0,0 +1,153 @@ +//------------------------------------------------------------------------------ +// +// 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.Models.Validation { + 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 Resource { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resource() { + } + + /// + /// 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.Models.Validation.Resource", typeof(Resource).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 it can't be null. + /// + internal static string CantBeNull { + get { + return ResourceManager.GetString("CantBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to name can't be empty. + /// + internal static string NameCantBeEmpty { + get { + return ResourceManager.GetString("NameCantBeEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to name can't be longer than {0}. + /// + internal static string NameCantBeLongerThan { + get { + return ResourceManager.GetString("NameCantBeLongerThan", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to name can't has the same pattern of unique id. + /// + internal static string NameCantBeUniqueIdPattern { + get { + return ResourceManager.GetString("NameCantBeUniqueIdPattern", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to name can only consists of alphabet, number, '_' and '-' . + /// + internal static string NameInvalidChar { + get { + return ResourceManager.GetString("NameInvalidChar", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nickname can't be longer than 25. + /// + internal static string NicknameTooLong { + get { + return ResourceManager.GetString("NicknameTooLong", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to it is not of type {0}. + /// + internal static string NotOfType { + get { + return ResourceManager.GetString("NotOfType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Failed to create validator instance.. + /// + internal static string ValidateWithAttributeExceptionCreateFail { + get { + return ResourceManager.GetString("ValidateWithAttributeExceptionCreateFail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Given type is not a IValidator instance.. + /// + internal static string ValidateWithAttributeExceptionNotValidator { + get { + return ResourceManager.GetString("ValidateWithAttributeExceptionNotValidator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to validation passed. + /// + internal static string ValidationPassed { + get { + return ResourceManager.GetString("ValidationPassed", resourceCulture); + } + } + } +} diff --git a/BackEnd/Timeline/Models/Validation/Resource.resx b/BackEnd/Timeline/Models/Validation/Resource.resx new file mode 100644 index 00000000..68ba3810 --- /dev/null +++ b/BackEnd/Timeline/Models/Validation/Resource.resx @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + it can't be null + + + name can't be empty + + + name can't be longer than {0} + + + name can't has the same pattern of unique id + + + name can only consists of alphabet, number, '_' and '-' + + + nickname can't be longer than 25 + + + it is not of type {0} + + + Failed to create validator instance. + + + Given type is not a IValidator instance. + + + validation passed + + \ No newline at end of file diff --git a/BackEnd/Timeline/Models/Validation/Validator.cs b/BackEnd/Timeline/Models/Validation/Validator.cs index ec6cc0af..d334960e 100644 --- a/BackEnd/Timeline/Models/Validation/Validator.cs +++ b/BackEnd/Timeline/Models/Validation/Validator.cs @@ -1,6 +1,5 @@ using System; using System.ComponentModel.DataAnnotations; -using static Timeline.Resources.Models.Validation.Validator; namespace Timeline.Models.Validation { @@ -56,7 +55,7 @@ namespace Timeline.Models.Validation if (PermitNull) return (true, GetSuccessMessage()); else - return (false, ValidatorMessageNull); + return (false, Resource.CantBeNull); } if (value is T v) @@ -65,11 +64,11 @@ namespace Timeline.Models.Validation } else { - return (false, ValidatorMessageBadType); + return (false, string.Format(Resource.NotOfType, typeof(T).Name)); } } - protected static string GetSuccessMessage() => ValidatorMessageSuccess; + protected static string GetSuccessMessage() => Resource.ValidationPassed; protected abstract (bool, string) DoValidate(T value); } @@ -99,7 +98,7 @@ namespace Timeline.Models.Validation throw new ArgumentNullException(nameof(validatorType)); if (!typeof(IValidator).IsAssignableFrom(validatorType)) - throw new ArgumentException(ValidateWithAttributeExceptionNotValidator, nameof(validatorType)); + throw new ArgumentException(Resource.ValidateWithAttributeExceptionNotValidator, nameof(validatorType)); try { @@ -107,7 +106,7 @@ namespace Timeline.Models.Validation } catch (Exception e) { - throw new ArgumentException(ValidateWithAttributeExceptionCreateFail, e); + throw new ArgumentException(Resource.ValidateWithAttributeExceptionCreateFail, e); } } diff --git a/BackEnd/Timeline/Resources/Helper/DataCacheHelper.Designer.cs b/BackEnd/Timeline/Resources/Helper/DataCacheHelper.Designer.cs deleted file mode 100644 index acf56d13..00000000 --- a/BackEnd/Timeline/Resources/Helper/DataCacheHelper.Designer.cs +++ /dev/null @@ -1,90 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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/BackEnd/Timeline/Resources/Helper/DataCacheHelper.resx b/BackEnd/Timeline/Resources/Helper/DataCacheHelper.resx deleted file mode 100644 index 515cfa9b..00000000 --- a/BackEnd/Timeline/Resources/Helper/DataCacheHelper.resx +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 diff --git a/BackEnd/Timeline/Resources/Models/Validation/NameValidator.Designer.cs b/BackEnd/Timeline/Resources/Models/Validation/NameValidator.Designer.cs deleted file mode 100644 index 3050049e..00000000 --- a/BackEnd/Timeline/Resources/Models/Validation/NameValidator.Designer.cs +++ /dev/null @@ -1,99 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.Models.Validation { - 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 NameValidator { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal NameValidator() { - } - - /// - /// 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.Models.Validation.NameValidator", typeof(NameValidator).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 An empty string is not allowed.. - /// - internal static string MessageEmptyString { - get { - return ResourceManager.GetString("MessageEmptyString", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Invalid character, only alphabet, digit, underscore and hyphen are allowed.. - /// - internal static string MessageInvalidChar { - get { - return ResourceManager.GetString("MessageInvalidChar", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Too long, more than 26 characters is not premitted.. - /// - internal static string MessageTooLong { - get { - return ResourceManager.GetString("MessageTooLong", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Name can't be of the same format of unique id.. - /// - internal static string MessageUnqiueId { - get { - return ResourceManager.GetString("MessageUnqiueId", resourceCulture); - } - } - } -} diff --git a/BackEnd/Timeline/Resources/Models/Validation/NameValidator.resx b/BackEnd/Timeline/Resources/Models/Validation/NameValidator.resx deleted file mode 100644 index 5e7e1745..00000000 --- a/BackEnd/Timeline/Resources/Models/Validation/NameValidator.resx +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - An empty string is not allowed. - - - Invalid character, only alphabet, digit, underscore and hyphen are allowed. - - - Too long, more than 26 characters is not premitted. - - - Name can't be of the same format of unique id. - - \ No newline at end of file diff --git a/BackEnd/Timeline/Resources/Models/Validation/NicknameValidator.Designer.cs b/BackEnd/Timeline/Resources/Models/Validation/NicknameValidator.Designer.cs deleted file mode 100644 index 522f305a..00000000 --- a/BackEnd/Timeline/Resources/Models/Validation/NicknameValidator.Designer.cs +++ /dev/null @@ -1,72 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.Models.Validation { - 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 NicknameValidator { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal NicknameValidator() { - } - - /// - /// 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.Models.Validation.NicknameValidator", typeof(NicknameValidator).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 Nickname is too long.. - /// - internal static string MessageTooLong { - get { - return ResourceManager.GetString("MessageTooLong", resourceCulture); - } - } - } -} diff --git a/BackEnd/Timeline/Resources/Models/Validation/NicknameValidator.resx b/BackEnd/Timeline/Resources/Models/Validation/NicknameValidator.resx deleted file mode 100644 index b191b505..00000000 --- a/BackEnd/Timeline/Resources/Models/Validation/NicknameValidator.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - Nickname is too long. - - \ No newline at end of file diff --git a/BackEnd/Timeline/Resources/Models/Validation/Validator.Designer.cs b/BackEnd/Timeline/Resources/Models/Validation/Validator.Designer.cs deleted file mode 100644 index 74d4c169..00000000 --- a/BackEnd/Timeline/Resources/Models/Validation/Validator.Designer.cs +++ /dev/null @@ -1,108 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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.Models.Validation { - 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 Validator { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Validator() { - } - - /// - /// 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.Models.Validation.Validator", typeof(Validator).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 Failed to create a validator instance from default constructor. See inner exception.. - /// - internal static string ValidateWithAttributeExceptionCreateFail { - get { - return ResourceManager.GetString("ValidateWithAttributeExceptionCreateFail", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Given type is not assignable to IValidator.. - /// - internal static string ValidateWithAttributeExceptionNotValidator { - get { - return ResourceManager.GetString("ValidateWithAttributeExceptionNotValidator", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Value is not of type {0}.. - /// - internal static string ValidatorMessageBadType { - get { - return ResourceManager.GetString("ValidatorMessageBadType", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Value can't be null.. - /// - internal static string ValidatorMessageNull { - get { - return ResourceManager.GetString("ValidatorMessageNull", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to Validation succeeded.. - /// - internal static string ValidatorMessageSuccess { - get { - return ResourceManager.GetString("ValidatorMessageSuccess", resourceCulture); - } - } - } -} diff --git a/BackEnd/Timeline/Resources/Models/Validation/Validator.resx b/BackEnd/Timeline/Resources/Models/Validation/Validator.resx deleted file mode 100644 index 8317e3eb..00000000 --- a/BackEnd/Timeline/Resources/Models/Validation/Validator.resx +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 - - - Failed to create a validator instance from default constructor. See inner exception. - - - Given type is not assignable to IValidator. - - - Value is not of type {0}. - - - Value can't be null. - - - Validation succeeded. - - \ No newline at end of file diff --git a/BackEnd/Timeline/Timeline.csproj b/BackEnd/Timeline/Timeline.csproj index 96f65301..b9653b25 100644 --- a/BackEnd/Timeline/Timeline.csproj +++ b/BackEnd/Timeline/Timeline.csproj @@ -63,30 +63,15 @@ True Resource.resx - - True - True - DataCacheHelper.resx - True True Resource.resx - - True - True - NicknameValidator.resx - - - True - True - NameValidator.resx - - - True - True - Validator.resx + + True + True + Resource.resx True @@ -153,25 +138,13 @@ ResXFileCodeGenerator Resource.Designer.cs - - ResXFileCodeGenerator - DataCacheHelper.Designer.cs - ResXFileCodeGenerator Resource.Designer.cs - - ResXFileCodeGenerator - NicknameValidator.Designer.cs - - - ResXFileCodeGenerator - NameValidator.Designer.cs - - - ResXFileCodeGenerator - Validator.Designer.cs + + ResXFileCodeGenerator + Resource.Designer.cs ResXFileCodeGenerator -- cgit v1.2.3