using System.Collections.Specialized;
using System.Reflection;
namespace System.Web.UI.WebControls {
///
/// Encapsulates the information about a Data Method used by .
///
public class ModelDataSourceMethod {
private Lazy _parameters = new Lazy();
///
/// The instance on which the method will be invoked. For static methods, this will be null.
///
public object Instance {
get;
internal set;
}
///
/// Method parameter values.
///
public OrderedDictionary Parameters {
get {
return _parameters.Value;
}
}
///
/// The method to be invoked.
///
public MethodInfo MethodInfo {
get;
private set;
}
public ModelDataSourceMethod(object instance, MethodInfo methodInfo) {
if (methodInfo == null) {
throw new ArgumentNullException("methodInfo");
}
Instance = instance;
MethodInfo = methodInfo;
}
}
}