diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ba12e..f5dd419 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# 2.1.2 +- Fixed issue #31 # 2.1.1 - Updated FontAwesome v5.15.3 - Updated UWP Min Target to: 10.0.10240.0 diff --git a/bin/FontAwesome5.Generator/FontAwesome5.Generator.exe b/bin/FontAwesome5.Generator/FontAwesome5.Generator.exe index 054ba77..cb4138b 100644 Binary files a/bin/FontAwesome5.Generator/FontAwesome5.Generator.exe and b/bin/FontAwesome5.Generator/FontAwesome5.Generator.exe differ diff --git a/bin/FontAwesome5.Generator/Newtonsoft.Json.dll b/bin/FontAwesome5.Generator/Newtonsoft.Json.dll index 8069902..4395f61 100644 Binary files a/bin/FontAwesome5.Generator/Newtonsoft.Json.dll and b/bin/FontAwesome5.Generator/Newtonsoft.Json.dll differ diff --git a/bin/FontAwesome5.Generator/Newtonsoft.Json.xml b/bin/FontAwesome5.Generator/Newtonsoft.Json.xml index 2ef7a77..c1c32cd 100644 --- a/bin/FontAwesome5.Generator/Newtonsoft.Json.xml +++ b/bin/FontAwesome5.Generator/Newtonsoft.Json.xml @@ -771,12 +771,18 @@ true if the written enum text will be camel case; otherwise, false. + + + Gets or sets the naming strategy used to resolve how enum text is written. + + The naming strategy used to resolve how enum text is written. + - Gets or sets a value indicating whether integer values are allowed when deserializing. + Gets or sets a value indicating whether integer values are allowed when serializing and deserializing. The default value is true. - true if integers are allowed when deserializing; otherwise, false. + true if integers are allowed when serializing and deserializing; otherwise, false. @@ -789,6 +795,44 @@ true if the written enum text will be camel case; otherwise, false. + + + Initializes a new instance of the class. + + The naming strategy used to resolve how enum text is written. + true if integers are allowed when serializing and deserializing; otherwise, false. + + + + Initializes a new instance of the class. + + The of the used to write enum text. + + + + Initializes a new instance of the class. + + The of the used to write enum text. + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + When non-null, there must be a constructor defined in the that exactly matches the number, + order, and type of these parameters. + + + + + Initializes a new instance of the class. + + The of the used to write enum text. + + The parameter list to use when constructing the described by . + If null, the default constructor is used. + When non-null, there must be a constructor defined in the that exactly matches the number, + order, and type of these parameters. + + true if integers are allowed when serializing and deserializing; otherwise, false. + Writes the JSON representation of the object. @@ -884,7 +928,7 @@ - Gets or sets a flag to indicate whether to write the Json.NET array attribute. + Gets or sets a value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. true if the array attribute is written to the XML; otherwise, false. @@ -895,6 +939,15 @@ true if the JSON root object is omitted; otherwise, false. + + + Gets or sets a value indicating whether to encode special characters when converting JSON to XML. + If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify + XML namespaces, attributes or processing directives. Instead special characters are encoded and written + as part of the XML element name. + + true if special characters are encoded; otherwise, false. + Writes the JSON representation of the object. @@ -991,6 +1044,33 @@ Time zone information should be preserved when converting. + + + The default JSON name table implementation. + + + + + Initializes a new instance of the class. + + + + + Gets a string containing the same characters as the specified range of characters in the given array. + + The character array containing the name to find. + The zero-based index into the array specifying the first character of the name. + The number of characters in the name. + A string containing the same characters as the specified range of characters in the given array. + + + + Adds the specified string into name table. + + The string to add. + This method is not thread-safe. + The resolved string. + Specifies default value handling options for the . @@ -1434,7 +1514,7 @@ Converts the to its JSON string representation. The value to convert. - A JSON string representation of the . + A JSON string representation of the . @@ -1749,9 +1829,28 @@ The JSON string. The name of the root element to append when deserializing. - A flag to indicate whether to write the Json.NET array attribute. + A value to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + The deserialized . + + + + Deserializes the from a JSON string nested in a root element specified by , + writes a Json.NET array attribute for collections, and encodes special characters. + + The JSON string. + The name of the root element to append when deserializing. + + A value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. + + A value to indicate whether to encode special characters when converting JSON to XML. + If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify + XML namespaces, attributes or processing directives. Instead special characters are encoded and written + as part of the XML element name. + The deserialized . @@ -1801,11 +1900,30 @@ The JSON string. The name of the root element to append when deserializing. - A flag to indicate whether to write the Json.NET array attribute. + A value to indicate whether to write the Json.NET array attribute. This attribute helps preserve arrays when converting the written XML back to JSON. The deserialized . + + + Deserializes the from a JSON string nested in a root element specified by , + writes a Json.NET array attribute for collections, and encodes special characters. + + The JSON string. + The name of the root element to append when deserializing. + + A value to indicate whether to write the Json.NET array attribute. + This attribute helps preserve arrays when converting the written XML back to JSON. + + + A value to indicate whether to encode special characters when converting JSON to XML. + If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify + XML namespaces, attributes or processing directives. Instead special characters are encoded and written + as part of the XML element name. + + The deserialized . + Converts an object to and from JSON. @@ -2019,6 +2137,20 @@ Instructs the not to serialize the public field or public read/write property value. + + + Base class for a table of atomized string objects. + + + + + Gets a string containing the same characters as the specified range of characters in the given array. + + The character array containing the name to find. + The zero-based index into the array specifying the first character of the name. + The number of characters in the name. + A string containing the same characters as the specified range of characters in the given array. + Instructs the how to serialize the object. @@ -2030,6 +2162,12 @@ The member serialization. + + + Gets or sets the missing member handling used when deserializing this object. + + The missing member handling. + Gets or sets how the object's properties with null values are handled during serialization and deserialization. @@ -2068,9 +2206,9 @@ - Gets or sets the used when serializing the property's collection items. + Gets or sets the type used when serializing the property's collection items. - The collection's items . + The collection's items type. @@ -2623,6 +2761,24 @@ The exception thrown when an error occurs during JSON serialization or deserialization. + + + Gets the line number indicating where the error occurred. + + The line number indicating where the error occurred. + + + + Gets the line position indicating where the error occurred. + + The line position indicating where the error occurred. + + + + Gets the path to the JSON where the error occurred. + + The path to the JSON where the error occurred. + Initializes a new instance of the class. @@ -2652,6 +2808,17 @@ The parameter is null. The class name is null or is zero (0). + + + Initializes a new instance of the class + with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. + + The error message that explains the reason for the exception. + The path to the JSON where the error occurred. + The line number indicating where the error occurred. + The line position indicating where the error occurred. + The exception that is the cause of the current exception, or null if no inner exception is specified. + Serializes and deserializes objects into and from the JSON format. @@ -2916,14 +3083,14 @@ Populates the JSON values onto the target object. - The that contains the JSON structure to reader values from. + The that contains the JSON structure to read values from. The target object to populate values onto. Populates the JSON values onto the target object. - The that contains the JSON structure to reader values from. + The that contains the JSON structure to read values from. The target object to populate values onto. @@ -3329,6 +3496,11 @@ The containing the JSON data to read. + + + Gets or sets the reader's property name table. + + Gets or sets the reader's character buffer pool. @@ -4365,7 +4537,7 @@ Represents a reader that provides validation. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -5659,6 +5831,26 @@ Load comments as a with type . + + + Specifies how duplicate property names are handled when loading JSON. + + + + + Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used. + + + + + Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used. + + + + + Throw a when a duplicate property is encountered. + + Contains the LINQ to JSON extension methods. @@ -6425,11 +6617,21 @@ - Gets a the specified name. + Gets a with the specified name. The property name. A with the specified name or null. + + + Gets the with the specified name. + The exact name will be searched for first and if no matching property is found then + the will be used to match a property. + + The property name. + One of the enumeration values that specifies how the strings will be compared. + A matched with the specified name or null. + Gets a of of this object's property values. @@ -6840,20 +7042,34 @@ Gets or sets how JSON comments are handled when loading JSON. + The default value is . The JSON comment handling. Gets or sets how JSON line info is handled when loading JSON. + The default value is . The JSON line info handling. + + + Gets or sets how duplicate property names in JSON objects are handled when loading JSON. + The default value is . + + The JSON duplicate property name handling. + Specifies the settings used when merging JSON. + + + Initializes a new instance of the class. + + Gets or sets the method used when merging JSON arrays. @@ -6866,6 +7082,14 @@ How null value properties are merged. + + + Gets or sets the comparison used to match property names while merging. + The exact property name will be searched for first and if no matching property is found then + the will be used to match a property. + + The comparison used to match property names while merging. + Represents an abstract JSON token. @@ -7885,6 +8109,13 @@ The token to read from. + + + Initializes a new instance of the class. + + The token to read from. + The initial path of the token. It is prepended to the returned . + Reads the next JSON token from the underlying . @@ -8684,7 +8915,7 @@ Contains the JSON schema extension methods. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -8694,7 +8925,7 @@ Determines whether the is valid. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. @@ -8709,7 +8940,7 @@ Determines whether the is valid. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. @@ -8725,7 +8956,7 @@ Validates the specified . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. @@ -8737,7 +8968,7 @@ Validates the specified . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. The source to test. @@ -8750,7 +8981,7 @@ An in-memory representation of a JSON Schema. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9012,7 +9243,7 @@ Returns detailed information about the schema exception. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9069,7 +9300,7 @@ Generates a from a specified . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9122,7 +9353,7 @@ Resolves from an id. - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9150,7 +9381,7 @@ The value types allowed by the . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9205,7 +9436,7 @@ Specifies undefined schema Id handling options for the . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9230,7 +9461,7 @@ Returns detailed information related to the . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9258,7 +9489,7 @@ Represents the callback method that will handle JSON schema validation events and the . - JSON Schema validation has been moved to its own package. See http://www.newtonsoft.com/jsonschema for more details. + JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. @@ -9981,6 +10212,13 @@ The converter. + + + Gets the internally resolved for the contract's type. + This converter is used as a fallback converter when no other converter is resolved. + Setting will always override this converter. + + Gets or sets all methods called immediately after deserialization of the object. @@ -10126,6 +10364,12 @@ The member object serialization. + + + Gets or sets the missing member handling used when deserializing this object. + + The missing member handling. + Gets or sets a value that indicates whether the object's properties are required. @@ -10292,6 +10536,11 @@ A value indicating whether this is required. + + + Gets a value indicating whether has a value specified. + + Gets or sets a value indicating whether this property preserves object references. @@ -10443,7 +10692,7 @@ Lookup and create an instance of the type described by the argument. The type to create. - Optional arguments to pass to an initializing constructor of the JsonConverter. + Optional arguments to pass to an initializing constructor of the JsonConverter. If null, the default constructor is used. @@ -10542,6 +10791,26 @@ The property name to resolve. The resolved property name. + + + Hash code calculation + + + + + + Object equality implementation + + + + + + + Compare to another NamingStrategy + + + + Represents a method that constructs an object. @@ -10797,15 +11066,6 @@ The member. The underlying type of the member. - - - Determines whether the member is an indexed property. - - The member. - - true if the member is an indexed property; otherwise, false. - - Determines whether the property is an indexed property. diff --git a/src/FontAwesome5/Extensions/EFontAwesomeIconExtensions.cs b/src/FontAwesome5/Extensions/EFontAwesomeIconExtensions.cs index 0accdff..8b3b7d3 100644 --- a/src/FontAwesome5/Extensions/EFontAwesomeIconExtensions.cs +++ b/src/FontAwesome5/Extensions/EFontAwesomeIconExtensions.cs @@ -14,7 +14,7 @@ public static class EFontAwesomeIconExtensions /// public static FontAwesomeInformation GetInformation(this EFontAwesomeIcon icon) { - return FontAwesome.Information.TryGetValue(icon, out var info) ? info : null; + return FontAwesomeInternal.Information.TryGetValue(icon, out var info) ? info : null; } /// @@ -22,7 +22,7 @@ public static FontAwesomeInformation GetInformation(this EFontAwesomeIcon icon) /// public static string GetLabel(this EFontAwesomeIcon icon) { - return FontAwesome.Information.TryGetValue(icon, out var info) ? info.Label : null; + return FontAwesomeInternal.Information.TryGetValue(icon, out var info) ? info.Label : null; } /// @@ -30,7 +30,7 @@ public static string GetLabel(this EFontAwesomeIcon icon) /// public static EFontAwesomeStyle GetStyle(this EFontAwesomeIcon icon) { - return FontAwesome.Information.TryGetValue(icon, out var info) ? info.Style : EFontAwesomeStyle.None; + return FontAwesomeInternal.Information.TryGetValue(icon, out var info) ? info.Style : EFontAwesomeStyle.None; } /// @@ -41,7 +41,7 @@ public static bool GetSvg(this EFontAwesomeIcon icon, out string path, out int w path = string.Empty; width = -1; height = -1; - if (FontAwesome.Information.TryGetValue(icon, out var info) && info.Svg != null) + if (FontAwesomeInternal.Information.TryGetValue(icon, out var info) && info.Svg != null) { path = info.Svg.Path; width = info.Svg.Width; @@ -57,7 +57,7 @@ public static bool GetSvg(this EFontAwesomeIcon icon, out string path, out int w /// public static string GetUnicode(this EFontAwesomeIcon icon) { - return FontAwesome.Information.TryGetValue(icon, out var info) ? info.Unicode : char.ConvertFromUtf32(0); + return FontAwesomeInternal.Information.TryGetValue(icon, out var info) ? info.Unicode : char.ConvertFromUtf32(0); } } } diff --git a/src/FontAwesome5/FontAwesome.cs b/src/FontAwesome5/FontAwesomeInternal.cs similarity index 99% rename from src/FontAwesome5/FontAwesome.cs rename to src/FontAwesome5/FontAwesomeInternal.cs index 6d83a8c..8224380 100644 --- a/src/FontAwesome5/FontAwesome.cs +++ b/src/FontAwesome5/FontAwesomeInternal.cs @@ -10,7 +10,7 @@ using System.Collections.Generic; namespace FontAwesome5 { - internal static class FontAwesome + internal static class FontAwesomeInternal { public static Dictionary Information = new Dictionary() { {EFontAwesomeIcon.Solid_Ad, new FontAwesomeInformation("Ad", EFontAwesomeStyle.Solid, "", new FontAwesomeSvgInformation("M157.52 272h36.96L176 218.78 157.52 272zM352 256c-13.23 0-24 10.77-24 24s10.77 24 24 24 24-10.77 24-24-10.77-24-24-24zM464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM250.58 352h-16.94c-6.81 0-12.88-4.32-15.12-10.75L211.15 320h-70.29l-7.38 21.25A16 16 0 0 1 118.36 352h-16.94c-11.01 0-18.73-10.85-15.12-21.25L140 176.12A23.995 23.995 0 0 1 162.67 160h26.66A23.99 23.99 0 0 1 212 176.13l53.69 154.62c3.61 10.4-4.11 21.25-15.11 21.25zM424 336c0 8.84-7.16 16-16 16h-16c-4.85 0-9.04-2.27-11.98-5.68-8.62 3.66-18.09 5.68-28.02 5.68-39.7 0-72-32.3-72-72s32.3-72 72-72c8.46 0 16.46 1.73 24 4.42V176c0-8.84 7.16-16 16-16h16c8.84 0 16 7.16 16 16v160z", 512, 512))}, diff --git a/src/Tools/FontAwesome5.Generator/FontAwesome5.Generator.csproj b/src/Tools/FontAwesome5.Generator/FontAwesome5.Generator.csproj index 93bfb03..f32a314 100644 --- a/src/Tools/FontAwesome5.Generator/FontAwesome5.Generator.csproj +++ b/src/Tools/FontAwesome5.Generator/FontAwesome5.Generator.csproj @@ -12,6 +12,22 @@ 512 true true + false + D:\codinion\repos\FontAwesome5\bin\FontAwesome5.Generator\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 1 + 1.0.0.%2a + false + true + false AnyCPU @@ -32,6 +48,18 @@ prompt 4 + + F3A5AD03D7728016CCFF89A40AB816D8C5E6C3E1 + + + FontAwesome5.Generator_TemporaryKey.pfx + + + true + + + true + ..\..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll @@ -52,7 +80,20 @@ + + + + False + Microsoft .NET Framework 4.6.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + \ No newline at end of file diff --git a/src/Tools/FontAwesome5.Generator/Program.cs b/src/Tools/FontAwesome5.Generator/Program.cs index 9615ba3..9068c28 100644 --- a/src/Tools/FontAwesome5.Generator/Program.cs +++ b/src/Tools/FontAwesome5.Generator/Program.cs @@ -104,7 +104,7 @@ static void Generate(string inputDirectory) WriteLine("{"); PushIndent("\t"); - WriteLine("internal static class FontAwesome"); + WriteLine("internal static class FontAwesomeInternal"); WriteLine("{"); PushIndent("\t"); WriteLine("public static Dictionary Information = new Dictionary() {"); @@ -178,7 +178,7 @@ static void Generate(string inputDirectory) PopIndent(); WriteLine("}"); - outputFile = Path.Combine(inputDirectory, @"src\FontAwesome5\FontAwesome.cs"); + outputFile = Path.Combine(inputDirectory, @"src\FontAwesome5\FontAwesomeInternal.cs"); File.WriteAllText(outputFile, _content.ToString()); }