protected void ApplyDataBindingToThisInstance(DataBindingValues dataBinding) { foreach (var binding in _bindings) { string value; if (dataBinding.TryGetValue(binding.DataName, out value)) { binding.Invoke(value); } else { binding.Invoke(null); } } }
public ParseResult Initialize(XmlDocument content, PreviewNotificationData data) { ParseResult result = _parser.ParseToast(content.GetXml(), CurrFeatureSet); if (result.IsOkForRender()) { _lastDataBindingValues = new DataBindingValues(data); result.Toast.ApplyDataBinding(_lastDataBindingValues); if (result.IsOkForRender()) { InitializeContent(result.Toast); } } return(result); }
internal virtual void ApplyDataBinding(DataBindingValues dataBinding) { ApplyDataBindingToThisInstance(dataBinding); }