Exemple #1
0
 public void Set(string name, VariableType type, string value)
 {
     variables.TryGetValue(name, out var oldEntry);
     if (oldEntry == null || oldEntry.type != type || oldEntry.value != value)
     {
         variables[name]   = new VariableEntry(type, value);
         needCalculateHash = true;
     }
 }
Exemple #2
0
        public void SetGlobalVariable(string name, VariableType type, object value)
        {
            EnsureGlobalVariables();

            if (value == null)
            {
                globalVariables.Remove(name);
            }
            else
            {
                globalVariables[name] = new VariableEntry(type, value);
            }

            checkpointManager.Set(GlobalVariablesKey, globalVariables);
        }
Exemple #3
0
 public void Set(string name, VariableType type, object value)
 {
     dict.TryGetValue(name, out var oldEntry);
     if (value == null)
     {
         if (oldEntry != null)
         {
             dict.Remove(name);
             needCalculateHash = true;
         }
     }
     else
     {
         if (oldEntry == null || oldEntry.type != type || !oldEntry.value.Equals(value))
         {
             dict[name]        = new VariableEntry(type, value);
             needCalculateHash = true;
         }
     }
 }