Files
QWERTYkez.OpenXmlProcessors/QWERTYkez.ExcelProcessor/Editors/NumberFormatPattern.cs

20 lines
577 B
C#
Raw Normal View History

namespace QWERTYkez.ExcelProcessor.Editors;
public class NumberFormatPattern
{
public string Format { get; }
internal int? Id { get; private set; }
public NumberFormatPattern(string format, ushort id = 0)
{
Format = format ?? throw new ArgumentNullException(nameof(format));
if (id != 0) Id = id;
}
internal void Attach(ushort id) => Id = id;
public override bool Equals(object? obj) =>
obj is NumberFormatPattern other && Format == other.Format;
public override int GetHashCode() => Format?.GetHashCode() ?? 0;
}