Esempio n. 1
0
 /// <summary>
 /// Adds the new variable as a field of this field set variable.
 /// </summary>
 /// <param name="variable">The variable.</param>
 public void AddVariable(IInputVariable variable)
 {
     _fields.Add(variable.Name, variable);
 }
 /// <summary>
 /// Adds the specified variable to the collection.
 /// </summary>
 /// <param name="variable">The variable.</param>
 public void Add(IInputVariable variable)
 {
     _variableSet.Add(variable.Name, variable);
 }
        /// <summary>
        /// Attempts to find the variable using the input value and the user supplied variable data collection.
        /// </summary>
        /// <param name="variableCollection">The variable collection.</param>
        /// <param name="inputValue">The input value representing a value to be resolved from a query document.</param>
        /// <param name="variable">The variable that was found in the collection.</param>
        /// <returns><c>true</c> if the varible was found, <c>false</c> otherwise.</returns>
        public bool TryGetVariable(IInputVariableCollection variableCollection, QueryInputValue inputValue, out IInputVariable variable)
        {
            variable = null;
            if (variableCollection == null || !(inputValue is QueryVariableReferenceInputValue varReference))
            {
                return(false);
            }

            return(variableCollection.TryGetVariable(varReference.VariableName, out variable));
        }
 /// <summary>
 /// Gets the value associated with the specified key.
 /// </summary>
 /// <param name="name">The name of the value to get.</param>
 /// <param name="variable">When this method returns, contains the value associated with the specified key,
 /// if the key is found; otherwise, the default value for the type of the value parameter.
 /// This parameter is passed uninitialized.</param>
 /// <returns>true if the instnace contains an element with the specified key; otherwise, false.</returns>
 public bool TryGetVariable(string name, out IInputVariable variable)
 {
     return(_variableSet.TryGetValue(name, out variable));
 }
Esempio n. 5
0
 /// <summary>
 /// Adds the variable as a child of this list variable.
 /// </summary>
 /// <param name="variable">The variable.</param>
 public void AddVariable(IInputVariable variable)
 {
     _items.Add(variable);
 }