Let's create a Interface that represents a GUID and a first class to implement it. I'll handle it.
IDataGuid = interface
function Value: TGuid;
function AsString: string;
function AsSmallString: string;
end;
TDataGuid = class(TInterfacedObject, IDataGuid)
private
FGuid: TGuid;
public
constructor Create(Guid: TGuid); reintroduce;
class function New(Guid: TGuid): IDataGuid; overload;
class function New(const Guid: string): IDataGuid; overload;
class function New(Guid: Variant): IDataGuid; overload;
class function New: IDataGuid; overload;
function Value: TGuid;
function AsString: string;
function AsSmallString: string;
end;
Let's create a Interface that represents a GUID and a first class to implement it. I'll handle it.