Esempio n. 1
0
 internal void OnGeneralError(DirectAgent agent, Exception error)
 {
     if (Logger.IsDebugEnabled)
     {
         Logger.Error(error);
     }
     else
     {
         Logger.Error(error.Message);
     }
 }
Esempio n. 2
0
        internal MessageEnvelope(MessageEnvelope envelope)
        {
            m_agent         = envelope.m_agent;
            this.RawMessage = envelope.RawMessage;
            m_message       = envelope.m_message;
            if (envelope.m_recipients != null)
            {
                m_recipients = new DirectAddressCollection {
                    envelope.m_recipients
                };
            }

            m_sender   = envelope.m_sender;
            m_notifyTo = envelope.m_notifyTo;
        }
Esempio n. 3
0
        public void StartAgent(string[] args)
        {
            if (m_agent != null)
            {
                return;
            }
            
            string pathOrDomain = args.GetOptionalValue(0, "nhind.hsgincubator.com");
            bool isDomain = args.GetOptionalValue<bool>(1, true);

            if (isDomain)
            {
                m_agent = new DirectAgent(pathOrDomain);
            }
            else
            {
                AgentSettings settings = AgentSettings.LoadFile(pathOrDomain);
                m_agent = settings.CreateAgent();
            }
        }
Esempio n. 4
0
 internal MessageEnvelope(MessageEnvelope envelope)
 {
     m_agent = envelope.m_agent;
     this.RawMessage = envelope.RawMessage;
     m_message = envelope.m_message;
     if (envelope.m_recipients != null)
     {
         m_recipients = new DirectAddressCollection {envelope.m_recipients};
     }
     
     m_sender = envelope.m_sender;
     m_notifyTo = envelope.m_notifyTo;
 }
Esempio n. 5
0
 void InitAgent()
 {
     using (new MethodTracer(Logger))
     {
         m_agent = m_settings.CreateAgent();
     }
 }
Esempio n. 6
0
 public void StopAgent(string[] args)
 {
     m_agent = null;   
 }