/// <summary> /// Returns the prefix or suffix text, depending on the supplied <see cref="TextAppendType"/>. /// If the prefix or suffix is null, it will be returned a string.empty. /// </summary> /// <param name="at">The <see cref="TextAppendType"/> defines the format of the return value</param> /// <returns>Returns the formated prefix or suffix</returns> private string GetAppendText(TextAppendType at) { // define a return value string retVal = string.Empty; // check if it should be a prefix, the format will be [PREFIX], // or check if it should be a suffix, the format will be [SUFFIX] if (at == TextAppendType.Prefix && !string.IsNullOrEmpty(this.prefix)) { retVal = this.prefix ?? string.Empty; } else if (at == TextAppendType.Suffix && !string.IsNullOrEmpty(this.suffix)) { retVal = this.suffix ?? string.Empty; } // return the formated prefix or suffix return(retVal); }
/// <summary> /// Returns the prefix or suffix text, depending on the supplied <see cref="TextAppendType"/>. /// If the prefix or suffix is null, it will be returned a string.empty. /// </summary> /// <param name="at">The <see cref="TextAppendType"/> defines the format of the return value</param> /// <returns>Returns the formated prefix or suffix</returns> private string GetAppendText(TextAppendType at) { // define a return value string retVal = string.Empty; // check if it should be a prefix, the format will be [PREFIX], // or check if it should be a suffix, the format will be [SUFFIX] if (at == TextAppendType.Prefix && !string.IsNullOrEmpty(this.prefix)) { retVal = this.prefix ?? string.Empty; } else if (at == TextAppendType.Suffix && !string.IsNullOrEmpty(this.suffix)) { retVal = this.suffix ?? string.Empty; } // return the formated prefix or suffix return retVal; }