/// <summary> /// Call this version if the control state /// is valid for all view states /// </summary> /// <param name="state"></param> public void AddViewControlState(ViewControlState state) { AddViewControlState(ViewControlState.ViewState.Create, state); AddViewControlState(ViewControlState.ViewState.Read, state); AddViewControlState(ViewControlState.ViewState.Update, state); AddViewControlState(ViewControlState.ViewState.Delete, state); }
/// <summary> /// Call this version if the property state /// is valid for a specific state /// </summary> /// <param name="viewState"></param> /// <param name="state"></param> public void AddViewControlState(ViewControlState.ViewState viewState, ViewControlState state) { // Add name, if not seen before if (!_controlNames.Contains(state.PropertyName)) { _controlNames.Add(state.PropertyName); } _viewControlStateMap[viewState].Add(state.PropertyName, state); }