/// <summary> /// Fires the <see cref="TokenProcessingError"/> event. /// </summary> /// <param name="unprocessedToken">The unprocessed token.</param> /// <param name="ex">The exception generated while processing the token.</param> protected virtual void OnTokenProcessingError(string unprocessedToken, Exception ex) { Contract.Requires <ArgumentNullException>(unprocessedToken != null); Contract.Requires <ArgumentNullException>(ex != null); var tokenProcessingError = this.TokenProcessingError; if (tokenProcessingError != null) { TokenProcessingErrorEventArgs args = new TokenProcessingErrorEventArgs(unprocessedToken, ex); tokenProcessingError(this, args); } }
/// <summary> /// Fires the <see cref="TokenProcessingError"/> event. /// </summary> /// <param name="unprocessedToken">The unprocessed token.</param> /// <param name="ex">The exception generated while processing the token.</param> protected virtual void OnTokenProcessingError(string unprocessedToken, Exception ex) { Requires.NotNull(unprocessedToken, "unprocessedToken"); Requires.NotNull(ex, "ex"); var tokenProcessingError = this.TokenProcessingError; if (tokenProcessingError != null) { TokenProcessingErrorEventArgs args = new TokenProcessingErrorEventArgs(unprocessedToken, ex); tokenProcessingError(this, args); } }
/// <summary> /// Fires the <see cref="TokenProcessingError"/> event. /// </summary> /// <param name="unprocessedToken">The unprocessed token.</param> /// <param name="ex">The exception generated while processing the token.</param> protected virtual void OnTokenProcessingError(string unprocessedToken, Exception ex) { Contract.Requires<ArgumentNullException>(unprocessedToken != null); Contract.Requires<ArgumentNullException>(ex != null); var tokenProcessingError = this.TokenProcessingError; if (tokenProcessingError != null) { TokenProcessingErrorEventArgs args = new TokenProcessingErrorEventArgs(unprocessedToken, ex); tokenProcessingError(this, args); } }
/// <summary> /// Fires the <see cref="TokenProcessingError"/> event. /// </summary> /// <param name="unprocessedToken">The unprocessed token.</param> /// <param name="ex">The exception generated while processing the token.</param> protected virtual void OnTokenProcessingError(string unprocessedToken, Exception ex) { Requires.NotNull(unprocessedToken, "unprocessedToken"); Requires.NotNull(ex, "ex"); var tokenProcessingError = this.TokenProcessingError; if (tokenProcessingError != null) { TokenProcessingErrorEventArgs args = new TokenProcessingErrorEventArgs(unprocessedToken, ex); tokenProcessingError(this, args); } }
/// <summary> /// Raises the <see cref="E:TokenProcessingError"/> event. /// </summary> /// <param name="e">The <see cref="DotNetOpenAuth.InfoCard.TokenProcessingErrorEventArgs"/> instance containing the event data.</param> protected virtual void OnTokenProcessingError(TokenProcessingErrorEventArgs e) { Contract.Requires(e != null); ErrorUtilities.VerifyArgumentNotNull(e, "e"); var tokenProcessingError = this.TokenProcessingError; if (tokenProcessingError != null) { tokenProcessingError(this, e); } }
/// <summary> /// Handles the TokenProcessingError event of the infoCardSelector control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DotNetOpenAuth.InfoCard.TokenProcessingErrorEventArgs"/> instance containing the event data.</param> private void InfoCardSelector_TokenProcessingError(object sender, TokenProcessingErrorEventArgs e) { this.OnTokenProcessingError(e); }
/// <summary> /// Raises the <see cref="E:TokenProcessingError"/> event. /// </summary> /// <param name="e">The <see cref="DotNetOpenAuth.InfoCard.TokenProcessingErrorEventArgs"/> instance containing the event data.</param> protected virtual void OnTokenProcessingError(TokenProcessingErrorEventArgs e) { Requires.NotNull(e, "paramName"); var tokenProcessingError = this.TokenProcessingError; if (tokenProcessingError != null) { tokenProcessingError(this, e); } }
protected void openIdSelector_TokenProcessingError(object sender, TokenProcessingErrorEventArgs e) { this.errorMessageLabel.Text = HttpUtility.HtmlEncode(e.Exception.ToStringDescriptive()); this.errorPanel.Visible = true; }