progress
This commit is contained in:
parent
16e76d6b31
commit
484dbfc9d9
529 changed files with 113694 additions and 0 deletions
33
AspClassic.Scripting/Runtime/BaseSymbolDictionary.cs
Normal file
33
AspClassic.Scripting/Runtime/BaseSymbolDictionary.cs
Normal file
|
@ -0,0 +1,33 @@
|
|||
namespace AspClassic.Scripting.Runtime;
|
||||
|
||||
internal abstract class BaseSymbolDictionary
|
||||
{
|
||||
private const int ObjectKeysId = -2;
|
||||
|
||||
private static readonly object _nullObject = new object();
|
||||
|
||||
internal static readonly SymbolId ObjectKeys = new SymbolId(-2);
|
||||
|
||||
public static object NullToObj(object o)
|
||||
{
|
||||
if (o == null)
|
||||
{
|
||||
return _nullObject;
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
public static object ObjToNull(object o)
|
||||
{
|
||||
if (o == _nullObject)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
||||
public static bool IsNullObject(object o)
|
||||
{
|
||||
return o == _nullObject;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue