Mustache.Scope.Set C# (CSharp) Method

Set() private method

private Set ( string key ) : void
key string
return void
        internal void Set(string key)
        {
            SearchResults results = tryFind(key);
            if (ValueRequested == null)
            {
                set(results, results.Value);
                return;
            }

            ValueRequestEventArgs e = new ValueRequestEventArgs();
            if (results.Found)
            {
                e.Value = results.Value;
            }

            ValueRequested(this, e);
            set(results, e.Value);
        }

Same methods

Scope::Set ( string key, object value ) : void

Usage Example

        /// <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)
        {
            string name = (string)arguments[nameParameter];

            contextScope.Set(name);
        }
All Usage Examples Of Mustache.Scope::Set