8using System.Collections.Generic;
30 private int customFormatID;
132 #region privateFields
133 private string customFormatCode;
147 get => customFormatCode;
150 if (
string.IsNullOrEmpty(value))
152 throw new FormatException(
"A custom format code cannot be null or empty");
154 customFormatCode = value;
164 get {
return customFormatID; }
171 customFormatID = value;
177 [Append(Ignore =
true)]
184 else {
return false; }
201 customFormatCode =
string.Empty;
214 StringBuilder sb =
new StringBuilder();
215 sb.Append(
"\"NumberFormat\": {\n");
218 AddPropertyAsJson(sb,
"Number",
Number);
219 AddPropertyAsJson(sb,
"HashCode", this.
GetHashCode(),
true);
221 return sb.ToString();
232 customFormatCode = customFormatCode,
258 int hashCode = 495605284;
259 hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(
CustomFormatCode);
261 hashCode = hashCode * -1521134295 +
Number.GetHashCode();
281 #region staticMethods
336 bool isDefined = System.Enum.IsDefined(typeof(
FormatNumber), number);
Class for exceptions regarding Style incidents.
Class represents an abstract style component.
Class to manage all styles at runtime, before writing XLSX files. The main purpose is deduplication a...
static StyleRepository Instance
Gets the singleton instance of the repository.