BusinessMgr
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Sarand.Net.Standard.Base.Core
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
//-------------------------------------------------------------------
|
||||
public CodeDesc (String code, String desc, String comment = "")
|
||||
public CodeDesc(String code, String desc, String comment = "")
|
||||
{
|
||||
Code = StringUtil.EmptyOnNull(code);
|
||||
Desc = StringUtil.EmptyOnNull(desc);
|
||||
|
||||
@@ -9,14 +9,21 @@ namespace Sarand.Net.Standard.Base.Core
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
public TypeCodeDesc (int type, String code, String desc, String comment = "") :
|
||||
public TypeCodeDesc(int type, String code, String desc, String comment = "") :
|
||||
base(code, desc, comment)
|
||||
{
|
||||
Type = type;
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
/// <summary>Generic initialisation, ie. with type as enum.</summary>
|
||||
public static TypeCodeDesc Create<T>(T type, String code, string desc, string comment = "") where T : struct, IConvertible
|
||||
{
|
||||
return new TypeCodeDesc((int)(type as IConvertible), code, desc, comment);
|
||||
}
|
||||
|
||||
// Properties.
|
||||
public int Type { get; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user