Gives the option to handle the preview event and thus stop the normal event from being raised.
Inheritance: IrcMessageEventArgs
Exemplo n.º 1
0
        /// <summary>
        /// Raises the <see cref="PreviewNoticeReceived"/> event.
        /// </summary>
        /// <param name="e">The <see cref="IrcPreviewMessageEventArgs"/> instance containing the event data.</param>
        protected virtual void OnPreviewNoticeReceived(IrcPreviewMessageEventArgs e)
        {
            var handler = this.PreviewNoticeReceived;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Exemplo n.º 2
0
        internal void HandleNoticeReceived(IIrcMessageSource source, IList <IIrcMessageTarget> targets, string text)
        {
            var previewEventArgs = new IrcPreviewMessageEventArgs(source, targets, text, this.Client.TextEncoding);

            OnPreviewNoticeReceived(previewEventArgs);
            if (!previewEventArgs.Handled)
            {
                OnNoticeReceived(new IrcMessageEventArgs(source, targets, text, this.Client.TextEncoding));
            }
        }
Exemplo n.º 3
0
        internal void HandleMessageReceived(IIrcMessageSource source, IList <IIrcMessageTarget> targets, string text)
        {
            var previewEventArgs = new IrcPreviewMessageEventArgs(source, targets, text);

            OnPreviewMessageReceived(previewEventArgs);
            if (!previewEventArgs.Handled)
            {
                OnMessageReceived(new IrcMessageEventArgs(source, targets, text));
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// Raises the <see cref="PreviewNoticeReceived"/> event.
 /// </summary>
 /// <param name="e">The <see cref="IrcPreviewMessageEventArgs"/> instance containing the event data.</param>
 protected virtual void OnPreviewNoticeReceived(IrcPreviewMessageEventArgs e)
 {
     var handler = this.PreviewNoticeReceived;
     if (handler != null)
         handler(this, e);
 }
Exemplo n.º 5
0
 internal void HandleNoticeReceived(IIrcMessageSource source, IList<IIrcMessageTarget> targets, string text)
 {
     var previewEventArgs = new IrcPreviewMessageEventArgs(source, targets, text, this.Client.TextEncoding);
     OnPreviewNoticeReceived(previewEventArgs);
     if (!previewEventArgs.Handled)
         OnNoticeReceived(new IrcMessageEventArgs(source, targets, text, this.Client.TextEncoding));
 }
 internal void HandleMessageReceived(IIrcMessageSource source, IList<IIrcMessageTarget> targets, string text)
 {
     var previewEventArgs = new IrcPreviewMessageEventArgs(source, targets, text);
     OnPreviewMessageReceived(previewEventArgs);
     if (!previewEventArgs.Handled)
         OnMessageReceived(new IrcMessageEventArgs(source, targets, text));
 }