Saxonite v1.2.8
This commit is contained in:
@@ -48,6 +48,7 @@ namespace Sarand.Net.Standard.Base.Bus
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Utilities.
|
||||
/// <summary>Verify that the Item Id is non-null and that the Item Type is specified (>0) and the Id is valid (>0).</summary>
|
||||
public static bool IsValid(ItemId itemId)
|
||||
{
|
||||
if (itemId == null) return false;
|
||||
@@ -56,6 +57,11 @@ namespace Sarand.Net.Standard.Base.Bus
|
||||
if (itemId.idType == ItemIdType.String && StringUtil.IsEmpty(itemId.StringId)) return false;
|
||||
return true;
|
||||
}
|
||||
/// <summary>Return the Item Id if non-=null, otherwise empty Item Id.</summary>
|
||||
public static ItemId InvalidOnNull (ItemId itemId)
|
||||
{
|
||||
return itemId ?? new ItemId();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Comparison.
|
||||
|
||||
Reference in New Issue
Block a user