Files
SPT-Server-Build/Core/Context/ContextVariable.cs
T

30 lines
635 B
C#

namespace Core.Context;
public class ContextVariable
{
private readonly object _value;
private readonly ContextVariableType _internalType;
private readonly 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;
}
}