refactor: included checkifnull function, added sql schema for the signature database
This commit is contained in:
24
gaseous-tools/Common.cs
Normal file
24
gaseous-tools/Common.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
namespace gaseous_tools
|
||||
{
|
||||
public class Common
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns IfNullValue if the ObjectToCheck is null
|
||||
/// </summary>
|
||||
/// <param name="ObjectToCheck">Any nullable object to check for null</param>
|
||||
/// <param name="IfNullValue">Any object to return if ObjectToCheck is null</param>
|
||||
/// <returns></returns>
|
||||
static public object ReturnValueIfNull(object? ObjectToCheck, object IfNullValue)
|
||||
{
|
||||
if (ObjectToCheck == null)
|
||||
{
|
||||
return IfNullValue;
|
||||
} else
|
||||
{
|
||||
return ObjectToCheck;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user