mRemoteNG.Tools.ExternalToolArgumentParser.GetVariableReplacement C# (CSharp) Method

GetVariableReplacement() private method

private GetVariableReplacement ( string variable, string original ) : string
variable string
original string
return string
        private string GetVariableReplacement(string variable, string original)
        {
            var replacement = "";
            if (_connectionInfo == null) return replacement;
            switch (variable.ToLowerInvariant())
            {
                case "name":
                    replacement = _connectionInfo.Name;
                    break;
                case "hostname":
                    replacement = _connectionInfo.Hostname;
                    break;
                case "port":
                    replacement = Convert.ToString(_connectionInfo.Port);
                    break;
                case "username":
                    replacement = _connectionInfo.Username;
                    break;
                case "password":
                    replacement = _connectionInfo.Password;
                    break;
                case "domain":
                    replacement = _connectionInfo.Domain;
                    break;
                case "description":
                    replacement = _connectionInfo.Description;
                    break;
                case "macaddress":
                    replacement = _connectionInfo.MacAddress;
                    break;
                case "userfield":
                    replacement = _connectionInfo.UserField;
                    break;
                default:
                    return original;
            }
            return replacement;
        }