namespace System.Web.UI.WebControls {
using System.Collections.Specialized;
///
/// Encapsulates the result of a Data Method Operation done by .
///
public class ModelDataMethodResult {
private OrderedDictionary _outputParameters;
///
/// The return value from data method.
/// ReturnValue is IEnumerable for Select operation,
/// and optionally int value for Update/Delete/Insert operation (affectedRows).
///
public object ReturnValue {
get;
private set;
}
///
/// A read-only dictionary with the values of out and ref parameters.
///
public OrderedDictionary OutputParameters {
get {
return _outputParameters;
}
}
public ModelDataMethodResult(object returnValue, OrderedDictionary outputParameters) {
ReturnValue = returnValue;
outputParameters = outputParameters ?? new OrderedDictionary(StringComparer.OrdinalIgnoreCase);
_outputParameters = outputParameters.AsReadOnly();
}
}
}