示例#1
0
        private ValueEntry GetLocalEntry(ValueEntryRef entryRef)
        {
            if (!entryRef.Found)
                throw new InvalidOperationException("Entry not found.");

            return localValues[entryRef.Index];
        }
示例#2
0
        private void UpdateLocalValue(ValueEntryRef entryRef, ValueEntry entry)
        {
            if (localValues == null)
                localValues = new List<ValueEntry>();

            if (!entryRef.Found)
            {
                // new local value
                localValues.Add(entry);
            }
            else
            {
                // update
                localValues[entryRef.Index] = entry;
            }
        }
示例#3
0
        private void ClearLocalValue(ValueEntryRef entryRef)
        {
            if (localValues == null)
                return;

            if (entryRef.Found)
            {
                // remove
                localValues.RemoveAt(entryRef.Index);
            }
        }