Ejemplo n.º 1
0
 /// <summary>
 /// This function returns a String with each property and value in the class.  The String displays the property name, property friendly name and property value.
 /// </summary>
 /// <param name="delimiter">What delimiter do you want between each property.  Defaults to comma.  Could use Envoirnment.NewLine, etc.</param>
 /// <param name="sortByProperytName">Normally sorts the output by property name.</param>
 /// <returns>String</returns>
 public String ToClassString(String delimiter = GlobalConstants.STRING_DEFAULT_DELIMITER, SortByPropertyName sortByProperytName = SortByPropertyName.Yes)
 {
     return(ClassMessageCreationHelper.ClassToString(this, delimiter, sortByProperytName));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Used to generate an Dictionary(Of String, String) for each property in the class.
 /// </summary>
 /// <param name="defaultValue">Default message if no class propeties are decorated</param>
 /// <param name="dictionary">Pass an IDictionary Object that needs to be populated.  Typicaly this would be the Data property of an Exception Object.</param>
 /// <param name="sortByPropertyName">Normally sorts the output by property name.</param>
 /// <returns>IDictionary</returns>
 public IDictionary <String, String> ToClassIDictionary(String defaultValue, IDictionary <String, String> dictionary, SortByPropertyName sortByPropertyName = SortByPropertyName.Yes)
 {
     return(ClassMessageCreationHelper.ClassToIDictionary(this, defaultValue, dictionary, sortByPropertyName));
 }
Ejemplo n.º 3
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));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Used to generate a Dictionary(Of String, String) for each property decorated with the AuditAttribute.  Dictionary is property name, property value.
 /// </summary>
 /// <param name="defaultValue">Default message if no class propeties are decorated</param>
 /// <param name="dictionary">Pass an IDictionary Object that needs to be populated.  Typically this would be the Data property of an Exception Object.</param>
 /// <returns>IDictionary</returns>
 public IDictionary <String, String> ToAuditIDictionary(String defaultValue, IDictionary <String, String> dictionary)
 {
     return(ClassMessageCreationHelper.AuditToIDictionary(this, defaultValue, dictionary));
 }
 /// <summary>
 /// Builds up a String containing each property and value in the class. The String displays the property name, property friendly name and property value.
 /// </summary>
 /// <param name="delimiter">What delimiter do you want between each property? Defaults to comma; can pass others like Environment.NewLine, etc.</param>
 /// <param name="sortByPropertyName">If set to <c>SortByPropertyName.Yes</c> then output will be sorted by AuditAttribute.AuditSequence and then property name; otherwise no additional sorting is performed and properties; will be left in ordinal order.</param>
 /// <returns>A String containing each property name, friendly name and value, separated by the delimiter and optionally sorted by property name.</returns>
 public String ToClassString(String delimiter = GlobalConstants.DefaultDelimiter, SortByPropertyName sortByPropertyName = SortByPropertyName.Yes)
 {
     return(ClassMessageCreationHelper.ClassToString(this, delimiter, sortByPropertyName));
 }
 /// <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));
 }