Mustache.Scope.TryFind C# (CSharp) Method

TryFind() public method

public TryFind ( string name, object &value ) : bool
name string
value object
return bool
        public bool TryFind(string name, out object value)
        {
            SearchResults result = tryFind(name);
            value = result.Value;
            return result.Found;
        }

Usage Example

Example #1
0
 /// <summary>
 /// Gets the text to output.
 /// </summary>
 /// <param name="writer">The writer to write the output to.</param>
 /// <param name="arguments">The arguments passed to the tag.</param>
 /// <param name="contextScope">Extra data passed along with the context.</param>
 public override void GetText(TextWriter writer, Dictionary<string, object> arguments, Scope contextScope)
 {
     if (contextScope.TryFind("index", out object index))
     {
         writer.Write(index);
     }
 }
All Usage Examples Of Mustache.Scope::TryFind