Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

44 lines
897 B
C#

namespace System.Web.Mvc {
using System;
using System.ComponentModel;
public class ViewDataInfo {
private object _value;
private Func<object> _valueAccessor;
public ViewDataInfo() {
}
public ViewDataInfo(Func<object> valueAccessor) {
_valueAccessor = valueAccessor;
}
public object Container {
get;
set;
}
public PropertyDescriptor PropertyDescriptor {
get;
set;
}
public object Value {
get {
if (_valueAccessor != null) {
_value = _valueAccessor();
_valueAccessor = null;
}
return _value;
}
set {
_value = value;
_valueAccessor = null;
}
}
}
}