Exemplo n.º 1
0
        /// <summary>
        /// Throws an exception for an error message event.
        /// </summary>
        /// <param name="mea">Message event arguments.</param>
        public static void OnMessage(MessageEventArgs e)
        {
            WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs;

            if (null != errorEventArgs)
            {
                throw new WixException(errorEventArgs);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Sends a message to the message delegate if there is one.
        /// </summary>
        /// <param name="mea">Message event arguments.</param>
        public void OnMessage(MessageEventArgs e)
        {
            WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs;

            if (null != errorEventArgs)
            {
                this.encounteredError = true;
            }

            this.extension.OnMessage(e);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Sends a message to the message delegate if there is one.
        /// </summary>
        /// <param name="mea">Message event arguments.</param>
        private void OnMessage(MessageEventArgs mea)
        {
            WixErrorEventArgs errorEventArgs = mea as WixErrorEventArgs;

            if (null != this.Message)
            {
                this.Message(this, mea);
            }
            else if (null != errorEventArgs)
            {
                throw new WixException(errorEventArgs);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Sends a message to the <see cref="Message"/> delegate if there is one.
        /// </summary>
        /// <param name="e">Message event arguments.</param>
        /// <remarks>
        /// <para><b>Notes to Inheritors:</b> When overriding <b>OnMessage</b>
        /// in a derived class, be sure to call the base class's
        /// <b>OnMessage</b> method so that registered delegates recieve
        /// the event.</para>
        /// </remarks>
        public virtual void OnMessage(MessageEventArgs e)
        {
            WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs;

            if (null != this.Message)
            {
                this.Message(this, e);
            }
            else if (null != errorEventArgs)
            {
                throw new WixException(errorEventArgs);
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Sends a message to the message delegate if there is one.
        /// </summary>
        /// <param name="mea">Message event arguments.</param>
        public void OnMessage(MessageEventArgs mea)
        {
            WixErrorEventArgs errorEventArgs = mea as WixErrorEventArgs;

            if (null != errorEventArgs)
            {
                this.encounteredError = true;
            }

            if (null != this.MessageHandler)
            {
                this.MessageHandler(this, mea);
            }
            else if (null != errorEventArgs)
            {
                throw new WixException(errorEventArgs);
            }
        }
        /// <summary>
        /// Sends a message to the message handler if there is one.
        /// </summary>
        /// <param name="mea">Message event arguments.</param>
        public void OnMessage(MessageEventArgs e)
        {
            WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs;

            if (null != errorEventArgs || MessageLevel.Error == e.Level)
            {
                this.encounteredError = true;
            }

            if (null != this.messageHandler)
            {
                this.messageHandler.OnMessage(e);
            }
            else if (null != errorEventArgs)
            {
                throw new WixException(errorEventArgs);
            }
        }
Exemplo n.º 7
0
        /// <summary>
        /// Sends a message to the message delegate if there is one.
        /// </summary>
        /// <param name="mea">Message event arguments.</param>
        public void OnMessage(MessageEventArgs mea)
        {
            WixErrorEventArgs errorEventArgs = mea as WixErrorEventArgs;

            if (null != errorEventArgs)
            {
                this.encounteredError = true;
            }

            if (null != this.Message)
            {
                this.Message(this, mea);
                if (MessageLevel.Error == mea.Level)
                {
                    this.encounteredError = true;
                }
            }
            else if (null != errorEventArgs)
            {
                throw new WixException(errorEventArgs);
            }
        }
        /// <summary>
        /// Sends a message to the message delegate if there is one.
        /// </summary>
        /// <param name="mea">Message event arguments.</param>
        private void OnMessage(MessageEventArgs e)
        {
            WixErrorEventArgs errorEventArgs = e as WixErrorEventArgs;

            if (null != errorEventArgs)
            {
                this.encounteredError = true;
            }

            if (null != this.Message)
            {
                this.Message(this, e);
                if (MessageLevel.Error == e.Level)
                {
                    this.encounteredError = true;
                }
            }
            else if (null != errorEventArgs)
            {
                throw new WixException(errorEventArgs);
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// Sends a message to the message delegate if there is one. WARNING: if warnings-as-errors is turned on, this won't stop the build on a warning.
        /// </summary>
        /// <param name="mea">Message event arguments.</param>
        private void OnMessage(MessageEventArgs mea)
        {
            WixErrorEventArgs errorEventArgs = mea as WixErrorEventArgs;

            if (null != this.Message)
            {
                lock (this.lockObject)
                {
                    if (null != errorEventArgs)
                    {
                        this.threadError = errorEventArgs.Id;
                    }
                    this.Message(this, mea);
                }
            }
            else if (null != errorEventArgs)
            {
                lock (this.lockObject)
                {
                    this.threadError = errorEventArgs.Id;
                }
                throw new WixException(errorEventArgs);
            }
        }
Exemplo n.º 10
0
 /// <summary>
 /// Instantiate a new WixNotOutputException.
 /// </summary>
 /// <param name="error">Localized error information.</param>
 public WixNotOutputException(WixErrorEventArgs error)
     : base(error)
 {
 }
 /// <summary>
 /// Instantiate new WixMissingTableDefinitionException.
 /// </summary>
 /// <param name="error">Localized error information.</param>
 public WixMissingTableDefinitionException(WixErrorEventArgs error)
     : base(error)
 {
 }
Exemplo n.º 12
0
 /// <summary>
 /// Instantiate a new WixNotIntermediateException.
 /// </summary>
 /// <param name="error">Localized error information.</param>
 public WixNotIntermediateException(WixErrorEventArgs error)
     : base(error)
 {
 }
Exemplo n.º 13
0
 /// <summary>
 /// Instantiate new WixMissingTableDefinitionException.
 /// </summary>
 /// <param name="error">Localized error information.</param>
 public WixMissingTableDefinitionException(WixErrorEventArgs error)
     : base(error)
 {
 }
Exemplo n.º 14
0
 /// <summary>
 /// Instantiate a new WixNotLibraryException.
 /// </summary>
 /// <param name="error">Localized error information.</param>
 public WixNotLibraryException(WixErrorEventArgs error)
     : base(error)
 {
 }
Exemplo n.º 15
0
 /// <summary>
 /// Instantiate a new WixException with a given WixError.
 /// </summary>
 /// <param name="error">The localized error information.</param>
 /// <param name="exception">Original exception.</param>
 public WixException(WixErrorEventArgs error, Exception exception) :
     base(String.Empty, exception)
 {
     this.error = error;
 }
 /// <summary>
 /// Instantiate a new WixNotLibraryException.
 /// </summary>
 /// <param name="error">Localized error information.</param>
 public WixNotLibraryException(WixErrorEventArgs error)
     : base(error)
 {
 }
Exemplo n.º 17
0
 /// <summary>
 /// Instantiate a new WixException with a given WixError.
 /// </summary>
 /// <param name="error">The localized error information.</param>
 public WixException(WixErrorEventArgs error)
 {
     this.error = error;
 }
Exemplo n.º 18
0
 /// <summary>
 /// Instantiate a new WixException with a given WixError.
 /// </summary>
 /// <param name="error">The localized error information.</param>
 public WixException(WixErrorEventArgs error)
 {
     this.error = error;
 }
Exemplo n.º 19
0
 /// <summary>
 /// Instantiate a new WixNotOutputException.
 /// </summary>
 /// <param name="error">Localized error information.</param>
 public WixNotOutputException(WixErrorEventArgs error)
     : base(error)
 {
 }
Exemplo n.º 20
0
 /// <summary>
 /// Instantiate a new WixNotIntermediateException.
 /// </summary>
 /// <param name="error">Localized error information.</param>
 public WixNotIntermediateException(WixErrorEventArgs error)
     : base(error)
 {
 }
Exemplo n.º 21
0
 /// <summary>
 /// Instantiate a new WixException with a given WixError.
 /// </summary>
 /// <param name="error">The localized error information.</param>
 public WixException(WixErrorEventArgs error) : this(error, null)
 {
 }