예제 #1
0
 //        public int Port
 //        {
 //            get { return _Port; }
 //            set { _Port = value; }
 //        }
 //
 //        public RemotingMechanism RemotingMechanism
 //        {
 //            get { return _RemotingMechanism; }
 //            set { _RemotingMechanism = value; }
 //        }
 //-----------------------------------------------------------------------------------------------
 /// <summary>
 /// Creates an instance of the RemoteEndPoint class
 /// </summary>
 /// <param name="host"></param>
 /// <param name="port"></param>
 /// <param name="remotingMechanism"></param>
 public RemoteEndPoint(string host, int port, RemotingMechanism remotingMechanism)
     : base(port,remotingMechanism)
 {
     _Host = host;
     //_Port = port;
     //_RemotingMechanism = remotingMechanism;
 }
예제 #2
0
        /// <summary>
        /// Remove an existing remoting mechanism.
        /// </summary>
        /// <param name="remotingMechanism">The remoting mechanism to remove.</param>
        public void RemoveRemotingMechanism(RemotingMechanism remotingMechanism)
        {
            if (RemotingMechanisms.Contains(remotingMechanism))
            {
                RemotingMechanisms.Remove(remotingMechanism);
            }

            BindRemotingMechanisms();
        }
예제 #3
0
        /// <summary>
        /// Adds another remoting mechanism.
        /// </summary>
        /// <param name="remotingMechanism">The remoting mechanism to add.</param>
        public void AddRemotingMechanism(RemotingMechanism remotingMechanism)
        {
            if (!RemotingMechanisms.Contains(remotingMechanism))
            {
                RemotingMechanisms.Add(remotingMechanism);
            }

            BindRemotingMechanisms();
        }
예제 #4
0
//        public int Port
//        {
//            get { return _Port; }
//            set { _Port = value; }
//        }
//
//        public RemotingMechanism RemotingMechanism
//        {
//            get { return _RemotingMechanism; }
//            set { _RemotingMechanism = value; }
//        }

        //-----------------------------------------------------------------------------------------------

        /// <summary>
        /// Creates an instance of the RemoteEndPoint class
        /// </summary>
        /// <param name="host"></param>
        /// <param name="port"></param>
        /// <param name="remotingMechanism"></param>
        public RemoteEndPoint(string host, int port, RemotingMechanism remotingMechanism) : base(port, remotingMechanism)
        {
            _Host = host;
            //_Port = port;
            //_RemotingMechanism = remotingMechanism;
        }
예제 #5
0
        /// <summary>
        /// A mechanism for storing RemotingMechanism information to Hostname field in database.
        /// </summary>
        /// <param name="hostName"></param>
        /// <param name="remotingMechanism"></param>
        /// <returns></returns>
        public static string GetHackInfoHostName(string hostName, RemotingMechanism remotingMechanism, string protocol)
        {
            string ret = hostName;
            switch (remotingMechanism)
            {
                case RemotingMechanism.WCF:
                    {
                        ret = String.Format("wcf${0}", hostName);
                        break;
                    }
                case RemotingMechanism.WCFHttp:
                    {
                        if (protocol == "https")
                            ret = String.Format("wcfHttps${0}", hostName);
                        else
                            ret = String.Format("wcfHttp${0}", hostName);
                        break;
                    }
                case RemotingMechanism.WCFTcp:
                    {
                        ret = String.Format("wcfTcp${0}", hostName);
                        break;
                    }
            }

            return ret;
        }
예제 #6
0
 //-----------------------------------------------------------------------------------------------
 /// <summary>
 /// Creates an instance of the OwnEndPoint
 /// </summary>
 /// <param name="port"></param>
 /// <param name="remotingMechanism"></param>
 public OwnEndPoint(int port, RemotingMechanism remotingMechanism)
 {
     _Port = port;
     _RemotingMechanism = remotingMechanism;
 }
예제 #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EndPoint"/> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="port">The port.</param>
 /// <param name="remotingMechanism">The remoting mechanism.</param>
 public EndPoint(string host, int port, RemotingMechanism remotingMechanism)
 {
     _Host = host;
     _Port = port;
     _RemotingMechanism = remotingMechanism;
 }
예제 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EndPoint"/> class.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="remotingMechanism">The remoting mechanism.</param>
 public EndPoint(int port, RemotingMechanism remotingMechanism)
     : this(Dns.GetHostName(), port, remotingMechanism)
 {
 }
예제 #9
0
        //-----------------------------------------------------------------------------------------------

        /// <summary>
        /// Creates an instance of the OwnEndPoint
        /// </summary>
        /// <param name="port"></param>
        /// <param name="remotingMechanism"></param>
        public OwnEndPoint(int port, RemotingMechanism remotingMechanism)
        {
            _Port = port;
            _RemotingMechanism = remotingMechanism;
        }
예제 #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EndPoint"/> class.
 /// </summary>
 /// <param name="host">The host.</param>
 /// <param name="port">The port.</param>
 /// <param name="remotingMechanism">The remoting mechanism.</param>
 public EndPoint(string host, int port, RemotingMechanism remotingMechanism)
 {
     _Host = host;
     _Port = port;
     _RemotingMechanism = remotingMechanism;
 }
예제 #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EndPoint"/> class.
 /// </summary>
 /// <param name="port">The port.</param>
 /// <param name="remotingMechanism">The remoting mechanism.</param>
 public EndPoint(int port, RemotingMechanism remotingMechanism)
     : this(Dns.GetHostName(), port, remotingMechanism)
 {
 }