Добавьте файлы проекта.
This commit is contained in:
20
QWERTYkez.ExcelProcessor/Editors/NumberFormatPattern.cs
Normal file
20
QWERTYkez.ExcelProcessor/Editors/NumberFormatPattern.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user