/// <summary> /// Occurs when the contained eval needs to resolve an unknown identifier. /// </summary> /// <param name="sender">Source of event.</param> /// <param name="e">An ResolveIdentifierEventArgs containing the event data.</param> protected virtual void OnResolveIdentifier(object sender, ResolveIdentifierEventArgs e) { // Search for an element with the same name as the requested identifier if ((e.Value == null) && (_target != null)) { e.Value = _target.FindName(e.Identifier); } }
/// <summary> /// Attempt to resolve the provided identifier into a value. /// </summary> /// <param name="identifier">Identifier to resolve.</param> /// <returns>Resolved value.</returns> public object PerformResolveIdentifier(string identifier) { ResolveIdentifierEventArgs e = new ResolveIdentifierEventArgs(identifier); OnResolveIdentifier(e); return e.Value; }
/// <summary> /// Raises the ResolveIdentifier event. /// </summary> /// <param name="e">An ResolveIdentifierEventArgs containing the event data.</param> protected virtual void OnResolveIdentifier(ResolveIdentifierEventArgs e) { if (ResolveIdentifier != null) ResolveIdentifier(this, e); }
/// <summary> /// Occurs when the contained eval needs to resolve an unknown identifier. /// </summary> /// <param name="sender">Source of event.</param> /// <param name="e">An ResolveIdentifierEventArgs containing the event data.</param> protected virtual void OnResolveIdentifier(object sender, ResolveIdentifierEventArgs e) { // Search for an element with the same name as the requested identifier if ((e.Value == null) && (_target != null)) e.Value = _target.FindName(e.Identifier); }