using System; using System.Collections.Generic; using System.Text; namespace WxOrder.Framework.Commons.Dialogs { /// /// Defines a contract for specifying values associated with a unique key. /// public interface IParameters : IEnumerable> { /// /// Adds the specified key and value to the parameter collection. /// /// The key of the parameter to add. /// The value of the parameter to add. void Add(string key, object value); /// /// Determines whether the contains the specified . /// /// The key to search the parameters for existence. /// true if the contains a parameter with the specified key; otherwise, false. bool ContainsKey(string key); /// /// Gets the number of parameters contained in the . /// int Count { get; } /// /// Gets a collection containing the keys in the . /// IEnumerable Keys { get; } /// /// Gets the parameter associated with the specified . /// /// The type of the parameter to get. /// The key of the parameter to find. /// A matching value of if it exists. T GetValue(string key); /// /// Gets the parameter associated with the specified . /// /// The type of the parameter to get. /// The key of the parameter to find. /// An of all the values referenced by key. IEnumerable GetValues(string key); /// /// Gets the parameter associated with the specified . /// /// The type of the parameter to get. /// The key of the parameter to get. /// /// When this method returns, contains the parameter associated with the specified key, /// if the key is found; otherwise, the default value for the type of the value parameter. /// /// true if the contains a parameter with the specified key; otherwise, false. bool TryGetValue(string key, out T value); /// /// Gets the parameter associated with the specified key (legacy). /// /// The key of the parameter to get. /// A matching value if it exists. object this[string key] { get; } } }