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; } }
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); }
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; } } }