// 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; }
/// <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(); }
/// <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(); }
// 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; }
/// <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; }
//----------------------------------------------------------------------------------------------- /// <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; }
/// <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; }
/// <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) { }