CAESDO.Recruitment.TemplateProcessing.replaceParameter C# (CSharp) Method

replaceParameter() private method

Converts the parameter name into the correct value.
private replaceParameter ( string parameter ) : string
parameter string Parameter name from the template.
return string
        private string replaceParameter(string parameter)
        {
            // Trim the {}
            int length = parameter.Length;
            parameter = parameter.Substring(1, length - 2);

            switch (parameter)
            {
                case "ApplicantName":
                    return userInfo.FullName;
                case "Deadline":
                case "ReviewDate":
                    return userInfo.Position.Deadline.ToLongDateString();
                case "PositionTitle":
                    return userInfo.Position.PositionTitle;
                case "RecruitmentAdminEmail":
                    return userInfo.Position.RecruitmentEmail;
                case "PrimaryDepartment":
                    return userInfo.Position.PrimaryDepartmentName;
                default:
                    //return string.Empty;
                    break;
            }
            #if DEBUG
            return "Error";
            #else
            return string.Empty;
            #endif
        }