mustache.ArgumentCollection.GetArguments C# (CSharp) Method

GetArguments() public method

Substitutes the key placeholders with their respective values.
public GetArguments ( KeyScope scope ) : object>.Dictionary
scope KeyScope The current lexical scope.
return object>.Dictionary
        public Dictionary<string, object> GetArguments(KeyScope scope)
        {
            Dictionary<string, object> arguments = new Dictionary<string,object>();
            foreach (KeyValuePair<TagParameter, string> pair in _argumentLookup)
            {
                object value;
                if (pair.Value == null)
                {
                    value = pair.Key.DefaultValue;
                }
                else
                {
                    value = scope.Find(pair.Value);
                }
                arguments.Add(pair.Key.Name, value);
            }
            return arguments;
        }