init
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Naplo.Domain.V3.Interfaces;
|
||||
|
||||
namespace Kreta.Naplo.Domain.V3.UniqueIdentifier
|
||||
{
|
||||
public class IntezmenyUid : IReadonlyUidRaw, IEqualityComparer<IntezmenyUid>
|
||||
{
|
||||
public IntezmenyUid(int id)
|
||||
{
|
||||
Id = id;
|
||||
UidRaw = id.ToString();
|
||||
}
|
||||
|
||||
public IntezmenyUid(string uidRaw)
|
||||
{
|
||||
Id = int.Parse(uidRaw);
|
||||
UidRaw = uidRaw;
|
||||
}
|
||||
|
||||
public int Id { get; private set; }
|
||||
|
||||
public string UidRaw { get; private set; }
|
||||
|
||||
public bool Equals(IntezmenyUid x, IntezmenyUid y) => x == y || x.UidRaw == y.UidRaw;
|
||||
|
||||
public int GetHashCode(IntezmenyUid obj) => obj.UidRaw.GetHashCode();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user