1
0
mirror of https://github.com/oliverbooth/X10D synced 2024-11-22 19:28:48 +00:00

(#27) Move exception messages to resource file

This commit is contained in:
Oliver Booth 2021-03-01 13:41:08 +00:00
parent 8e763667d0
commit afaacb13e5
3 changed files with 161 additions and 11 deletions

117
X10D/src/ExceptionMessages.Designer.cs generated Normal file
View File

@ -0,0 +1,117 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace X10D {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// 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", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class ExceptionMessages {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal ExceptionMessages() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[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("X10D.src.ExceptionMessages", typeof(ExceptionMessages).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to HashAlgorithm&apos;s Create method returned null referenece..
/// </summary>
internal static string HashAlgorithmCreateReturnedNull {
get {
return ResourceManager.GetString("HashAlgorithmCreateReturnedNull", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to HashAlgorithm does not offer Create method..
/// </summary>
internal static string HashAlgorithmNoCreateMethod {
get {
return ResourceManager.GetString("HashAlgorithmNoCreateMethod", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Length must be a positive value..
/// </summary>
internal static string LengthMustBePositiveValue {
get {
return ResourceManager.GetString("LengthMustBePositiveValue", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {{0}} does not inherit {typeof(Attribute)}.
/// </summary>
internal static string TypeDoesNotInheritAttribute {
get {
return ResourceManager.GetString("TypeDoesNotInheritAttribute", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {{0}} is not a class.
/// </summary>
internal static string TypeIsNotClass {
get {
return ResourceManager.GetString("TypeIsNotClass", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {{0}} is not an interface.
/// </summary>
internal static string TypeIsNotInterface {
get {
return ResourceManager.GetString("TypeIsNotInterface", resourceCulture);
}
}
}
}

View File

@ -1,11 +0,0 @@
using System;
namespace X10D
{
internal static class ExceptionMessages
{
public static readonly string TypeDoesNotInheritAttribute = $"{{0}} does not inherit {typeof(Attribute)}";
public static readonly string TypeIsNotClass = $"{{0}} is not a class";
public static readonly string TypeIsNotInterface = $"{{0}} is not an interface";
}
}

View File

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>1.3</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<data name="TypeIsNotClass" xml:space="preserve">
<value>{{0}} is not a class</value>
</data>
<data name="TypeIsNotInterface" xml:space="preserve">
<value>{{0}} is not an interface</value>
</data>
<data name="TypeDoesNotInheritAttribute" xml:space="preserve">
<value>{{0}} does not inherit {typeof(Attribute)}</value>
</data>
<data name="HashAlgorithmNoCreateMethod" xml:space="preserve">
<value>HashAlgorithm does not offer Create method.</value>
</data>
<data name="HashAlgorithmCreateReturnedNull" xml:space="preserve">
<value>HashAlgorithm's Create method returned null referenece.</value>
</data>
<data name="LengthMustBePositiveValue" xml:space="preserve">
<value>Length must be a positive value.</value>
</data>
</root>