From 88524047ffee964a0e414a19ea1e6289edc86a89 Mon Sep 17 00:00:00 2001 From: schedpas Date: Wed, 27 Oct 2021 10:04:34 +0200 Subject: [PATCH] Interface for UniquieID - IUniquieID --- Pilz.Cryptography/IUniquieID.cs | 15 +++++++++++++++ Pilz.Cryptography/UniquieID.cs | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Pilz.Cryptography/IUniquieID.cs diff --git a/Pilz.Cryptography/IUniquieID.cs b/Pilz.Cryptography/IUniquieID.cs new file mode 100644 index 0000000..dbfc87e --- /dev/null +++ b/Pilz.Cryptography/IUniquieID.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Pilz.Cryptography +{ + interface IUniquieID + { + bool HasID { get; } + string ID { get; } + + void GenerateIfNull(); + void Generate(); + } +} diff --git a/Pilz.Cryptography/UniquieID.cs b/Pilz.Cryptography/UniquieID.cs index 16efa58..6655afc 100644 --- a/Pilz.Cryptography/UniquieID.cs +++ b/Pilz.Cryptography/UniquieID.cs @@ -9,7 +9,7 @@ using System.Threading.Tasks; namespace Pilz.Cryptography { - public class UniquieID + public class UniquieID : IUniquieID { private static int currentSimpleID = 0;