예제 #1
0
            internal EndPointProxy(Engine eng, EndPoint from, EndPoint to, Type type)
                : base(type)
            {
                from.Register();

                if (from.CheckDestination(to) == false)
                {
                    from.Deregister();

                    throw new ArgumentException("Cannot connect to device EndPoint");
                }

                m_eng  = eng;
                m_from = from;
                m_to   = to;
                m_type = type;
            }
예제 #2
0
 public void Dispose()
 {
     try
     {
         if (m_from != null)
         {
             m_from.Deregister();
         }
     }
     catch
     {
     }
     finally
     {
         m_eng  = null;
         m_from = null;
         m_to   = null;
         m_type = null;
     }
 }
            internal EndPointProxy(Engine eng, EndPoint from, EndPoint to, Type type)
                : base(type)
            {
                from.Register();

                if (from.CheckDestination(to) == false)
                {
                    from.Deregister();

                    throw new ArgumentException("Cannot connect to device EndPoint");
                }

                m_eng = eng;
                m_from = from;
                m_to = to;
                m_type = type;
            }