Gives the option to handle the preview event and thus stop the normal event from being raised.
Inheritance: IrcMessageEventArgs
Esempio 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);
            }
        }
Esempio 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));
            }
        }
Esempio 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));
            }
        }
Esempio 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);
 }
Esempio 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));
 }