예제 #1
0
 public void Unregister(IAgentEx SrvEx)
 {
     if (m_nNotifySinkID != -1)
     {
         SrvEx.Unregister(m_nNotifySinkID);
     }
 }
예제 #2
0
        public void Initialize()
        {
            if (m_SrvEx != null)
            {
                return; //Already initialized
            }
            Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
            try {
                AgentServer AgSrv = new AgentServer();
                // The following cast does the QueryInterface to fetch IAgentEx interface from the IAgent interface, directly supported by the object
                m_SrvEx = (IAgentEx)AgSrv;

                m_Sink = new AgentNotifySink();
                m_Sink.Register(m_SrvEx);
            } catch (Exception e) {
                AgentServerStartupException ex = new AgentServerStartupException("Agent Server could not be started", e);
                Console.WriteLine(ex);
                throw ex;
            }
        }
예제 #3
0
        public void Initialize()
        {
            if (m_SrvEx != null) {
                return; //Already initialized
            }
            Thread.CurrentThread.SetApartmentState(ApartmentState.STA);
            try {
                AgentServer AgSrv = new AgentServer();
                // The following cast does the QueryInterface to fetch IAgentEx interface from the IAgent interface, directly supported by the object
                m_SrvEx = (IAgentEx)AgSrv;

                m_Sink = new AgentNotifySink();
                m_Sink.Register(m_SrvEx);
            } catch (Exception e) {
                AgentServerStartupException ex = new AgentServerStartupException("Agent Server could not be started", e);
                Console.WriteLine(ex);
                throw ex;
            }
        }
예제 #4
0
 public void Unregister(IAgentEx SrvEx)
 {
     if (m_nNotifySinkID != -1) {
         SrvEx.Unregister(m_nNotifySinkID);
     }
 }
예제 #5
0
 public void Register(IAgentEx SrvEx)
 {
     SrvEx.Register(this, out m_nNotifySinkID);
 }
예제 #6
0
 public void Register(IAgentEx SrvEx)
 {
     SrvEx.Register(this, out m_nNotifySinkID);
 }