XG.Model.Domain.Server.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            return base.ToString() + "|" + Port;
        }

Usage Example

Example #1
0
        void ServerConnect(Server aServer)
        {
            if (!aServer.Enabled)
            {
                _log.Error("ServerConnect(" + aServer + ") is not enabled");
                return;
            }

            IrcConnection connection = _connections.SingleOrDefault(c => c.Server == aServer);
            if (connection == null)
            {
                connection = new IrcConnection
                {
                    Server = aServer,
                    Parser = _parser,
                    Scheduler = Scheduler
                };
                _connections.Add(connection);

                connection.OnDisconnected += ServerDisconnected;
                connection.OnNotificationAdded += AddNotification;
                connection.Start(aServer.ToString());
            }
            else
            {
                _log.Error("ConnectServer(" + aServer + ") is already in the list");
            }
        }