private static void BuildBankAdviceText(StringBuilderReuse advText, string inputValue, string prefix = null) { if (inputValue != null && inputValue != string.Empty) { advText = advText.Length != 0 ? advText.Append(" ") : advText; if (prefix == null) { advText.Append(inputValue); } else { advText.Append(prefix).Append(':').Append(inputValue); } } }
string GetValues(UnicontaBaseEntity oldRecord, UnicontaBaseEntity newRecord, bool IsNewValue) { if (oldRecord == null) { return(null); } var prop = oldRecord.GetType().GetProperty(this._PropName); if (prop != null) { return(CheckProperty(oldRecord, newRecord, IsNewValue, prop)); } StringBuilderReuse values = null; string singleVal = null; foreach (var RecProperty in oldRecord.GetType().GetProperties()) { var val = CheckProperty(oldRecord, newRecord, IsNewValue, RecProperty); if (val != null) { if (singleVal == null) { singleVal = val; } else { if (values == null) { values = StringBuilderReuse.Create(); values.Append(singleVal); } values.Append(';').Append(val); } } } return((values != null) ? values.ToStringAndRelease() : singleVal); }