public void HarvestSetting(ref object setting) { foreach (Control ctrl in Items) { ISettingView settingView = ctrl as ISettingView; if (settingView != null) { settingView.HarvestSetting(ref setting); } } }
/// <summary> /// Mediator collect setting from all owned setting pages /// </summary> /// <param name="setting">The setting.</param> public void HarvestSetting(ref object setting) { if (_settingPagesMapping == null) { throw new Exception("Not initialized"); } foreach (Control ctrl in _settingPagesMapping.Values) { ISettingView settingCtrl = ctrl as ISettingView; if (settingCtrl != null) { settingCtrl.HarvestSetting(ref setting); } } }