Ejemplo n.º 1
0
 /// <summary>
 /// Returns a String of each property decorated with the AuditAttribute.  The String displays the property name, property friendly name and property value.  This function is typically used when a developer needs to make an audit log entry.  It provides a very simple method to generate these messages.
 /// </summary>
 /// <param name="defaultValue">If no properties have been decorated with the AuditAttribute, then this message is displayed.</param>
 /// <param name="delimiter">What delimiter do you want between each property.  Defaults to comma.  Could use vbcrlf, etc.</param>
 public String ToAuditString(String defaultValue, String delimiter = GlobalConstants.STRING_DEFAULT_DELIMITER)
 {
     return(ClassMessageCreationHelper.AuditToString(this, defaultValue, delimiter));
 }
 /// <summary>
 /// Builds up a String containing each property and value in the class decorated with the AuditAttribute. The String displays the property name, property friendly name and property value.
 /// </summary>
 /// <param name="defaultValue">If no class properties are decorated with the <see cref="AuditAttribute"/> then a single entry will be added to the dictionary that is named 'DefaultValue' and will have the value of defaultValue.</param>
 /// <param name="delimiter">What delimiter do you want between each property? Defaults to comma; can pass others like Environment.NewLine, etc.</param>
 /// <param name="includeAllProperties">if set to <c>true</c> [include all properties].</param>
 /// <returns>A String containing each property name, friendly name and value, separated by the delimiter and sorted by AuditAttribute.AuditSequence and then property name.</returns>
 public String ToAuditString(String defaultValue, String delimiter = GlobalConstants.DefaultDelimiter, Boolean includeAllProperties = false)
 {
     return(ClassMessageCreationHelper.AuditToString(this, defaultValue, delimiter, includeAllProperties));
 }