/// <summary> /// Gets resolved data from this or any Chained data item /// where data is valid for view. /// </summary> /// <param name="view"></param> /// <returns></returns> public object GetData(string view) { if (string.IsNullOrEmpty(view) || IsCurrentValidForView(view)) { return(Data); } else if (ChainedDataItem != null && ChainedDataItem.IsValidForView(view)) { return(ChainedDataItem.GetData(view)); } else { return(null); } }
/// <summary> /// Tests to see if this data item or (chained data item) /// is valid for the specified view /// </summary> /// <param name="viewName"></param> public bool IsValidForView(string viewName) { if (IsCurrentValidForView(viewName)) { return(true); } else if (ChainedDataItem != null) { return(ChainedDataItem.IsValidForView(viewName)); } else { return(false); } }