Esempio n. 1
0
 private string GetMessageText(Message.MessageKind messageType)
 {
     foreach (Message m in status.Messages)
     {
         if (m.Kind == messageType)
         {
             return(m.Text);
         }
     }
     return(string.Empty);
 }
Esempio n. 2
0
        /// <summary>
        /// Exibe um mensagem na tela
        /// </summary>
        /// <param name="mensagem">mensagem desejada</param>
        /// <param name="tipoMensagem">tipos: Sucesso, Informação, Warning, Error</param>
        public void ShowMessageDialog(string mensagem, Message.MessageKind tipoMensagem)
        {
            var msg = new Message
            {
                Kind   = tipoMensagem,
                Title  = mensagem,
                Detail = ""
            };

            MensagemTemporaria = msg;
        }
Esempio n. 3
0
        /// <summary>
        /// Exibe um mensagem na screen
        /// </summary>
        /// <param name="mensagem">mensagem desejada</param>
        /// <param name="tipoMensagem">tipos: Sucesso, Informação, Warning, Error</param>
        /// <param name="timeout">tempo para exibição</param>
        public void ShowMessageDialog(string mensagem, Message.MessageKind tipoMensagem, int?timeout = null)
        {
            var msg = new Message
            {
                Kind           = tipoMensagem,
                Title          = mensagem,
                TimeoutSeconds = timeout,
                Detail         = ""
            };

            MensagemTemporaria = msg;
        }
Esempio n. 4
0
        /// <summary>
        /// Conerts a <see cref="Message.MessageKind"/> to a <see cref="BuildMessageType"/>.
        /// </summary>
        /// <param name="kind">The <see cref="Message.MessageKind"/>.</param>
        /// <returns>
        /// The <see cref="BuildMessageType"/>.
        /// </returns>
        private static BuildMessageType Convert(Message.MessageKind kind)
        {
            switch (kind)
            {
            case Message.MessageKind.Breakers:
                return(BuildMessageType.Breakers);

            case Message.MessageKind.BuildAbortedBy:
                return(BuildMessageType.BuildAbortedBy);

            case Message.MessageKind.BuildStatus:
                return(BuildMessageType.BuildStatus);

            case Message.MessageKind.FailingTasks:
                return(BuildMessageType.FailingTasks);

            case Message.MessageKind.Fixer:
                return(BuildMessageType.Fixer);
            }

            return(BuildMessageType.Unknown);
        }
Esempio n. 5
0
 /// <summary>
 /// %Message constructor that accepts a configuration.
 /// <p>
 /// Only Message-related configuration options are held by the Message object.
 /// These configuration options are NOT included with the message when it is sent
 /// across the %GMSEC Bus.
 /// </summary>
 ///
 /// <param name="subject">The subject/topic to associate with the message</param>
 /// <param name="kind">The message kind to associate with the message</param>
 /// <param name="config">A configuration object that contains message-specific options</param>
 ///
 /// <exception cref="GmsecException">If the subject is null or contains an empty-string</exception>
 public Message(string subject, Message.MessageKind kind, Config config)
 {
 }
Esempio n. 6
0
 /// <summary>Basic message Constructor</summary>
 ///
 /// <param name="subject">The subject/topic to associate with the message</param>
 /// <param name="kind">The message kind to associate with the message</param>
 ///
 /// <exception cref="GmsecException">If the subject is null or contains an empty-string</exception>
 public Message(string subject, Message.MessageKind kind)
 {
 }
Esempio n. 7
0
 /// <summary>
 /// Initializes the message instance and automatically builds the appropriate
 /// schemaID based on the version of Specification used
 /// </summary>
 ///
 /// <param name="subject">The subject string for the message.</param>
 /// <param name="status">RESPONSE-STATUS field to insert into a MSG PROD message.</param>
 /// <param name="kind">The kind of message to instantiate.</param>
 /// <param name="productType">PROD-TYPE field to insert into a MSG PROD message.</param>
 /// <param name="productSubtype">PROD-SUBTYPE field to insert into a MSG PROD message.</param>
 /// <param name="config">A configuration to associate with the message.</param>
 /// <param name="spec">A reference to the specification this message's schema will adhere to.</param>
 ///
 /// <exception cref="GmsecException">Thrown if subject is null or contains an empty string.</exception>
 /// <exception cref="GmsecException">Thrown if productType is null or contains an empty string.</exception>
 /// <exception cref="GmsecException">Thrown if Specification is null.</exception>
 public ProductFileMessage(string subject, ResponseStatus.Response status, Message.MessageKind kind, string productType, string productSubtype, Config config, Specification spec)
 {
 }