Files
SPT-Server-Build/Core/Context/ContextVariable.cs
T
2025-01-15 15:06:54 +00:00

30 lines
614 B
C#

namespace Core.Context;
public class ContextVariable
{
protected object _value;
protected ContextVariableType _internalType;
protected DateTime _timestamp;
public ContextVariable(object value, ContextVariableType contextVariableInternalType)
{
_value = value;
_timestamp = DateTime.Now;
_internalType = contextVariableInternalType;
}
public T GetValue<T>() {
return (T)_value;
}
public DateTime GetTimestamp()
{
return _timestamp;
}
public ContextVariableType GetContextType()
{
return _internalType;
}
}