public SlotInfo AddSlot(string name, SlotType type, TypeInfo valueType) { lock (LockObject) { var index = type == SlotType.Value ? ValuesCount++ : ParametersCount++; var slot = new SlotInfo(this, type, valueType, name, index); slots.Add(name, slot); return(slot); } }
public bool TryGetValue(string key, out object value) { value = null; SlotInfo slot = scope.ScopeInfo.GetSlot(key); if (slot == null) { return(false); } value = scope.GetValue(slot.Index); return(true); }