/// <summary> /// Register an itemwise dependency. /// </summary> /// <param name="variableName"></param> /// <param name="dependentItems"></param> /// <param name="function"></param> /// <returns>Returns the registerd dependency information.</returns> public DependencyItem RegisterItemwise(string variableName, HashSet<string> dependentItems, AType function) { // Invalidate any dependencies using the variable InvalidateDependencies(variableName); DependencyItem item = new DependencyItem(variableName, dependentItems, function, true); this.mapping[variableName] = item; return item; }
/// <summary> /// Register an itemwise dependency. /// </summary> /// <param name="variableName"></param> /// <param name="dependentItems"></param> /// <param name="function"></param> /// <returns>Returns the registerd dependency information.</returns> public DependencyItem RegisterItemwise(string variableName, HashSet <string> dependentItems, AType function) { // Invalidate any dependencies using the variable InvalidateDependencies(variableName); DependencyItem item = new DependencyItem(variableName, dependentItems, function, true); this.mapping[variableName] = item; return(item); }
/// <summary> /// Tries to get the <see cref="DependencyItem"/> for the given variable. /// </summary> /// <param name="variableName">Global variable name.</param> /// <param name="dependency"><see cref="DependencyItem"/> for the given global variable name.</param> /// <returns>True if ther is a <see cref="DependencyItem"/>, otherwise false.</returns> public bool TryGetDependency(string variableName, out DependencyItem dependency) { return this.mapping.TryGetValue(variableName, out dependency); }
/// <summary> /// Tries to get the <see cref="DependencyItem"/> for the given variable. /// </summary> /// <param name="variableName">Global variable name.</param> /// <param name="dependency"><see cref="DependencyItem"/> for the given global variable name.</param> /// <returns>True if ther is a <see cref="DependencyItem"/>, otherwise false.</returns> public bool TryGetDependency(string variableName, out DependencyItem dependency) { return(this.mapping.TryGetValue(variableName, out dependency)); }