Our common objects class library provides class definitions for common objects and messages related to those objects. All classes are readily serializable into XML and JSON by design. Most object classes provide a Clone function to support making copies of the objects and customized comparison routines. Utilities are also included for assistance with serialization (XML and JSON).

An attribute definition called a PII Attribute is included that can be used to mark attributes as containing PII. When combined with the included protected object abstract class, a simple mechanism for serializing an object for error reporting or flow tracing that keeps sensitive data protected is available to the developer with a few strokes of the keyboard. This works great when combined with our advanced exception objects.

The classes are regularly updated to support all updates to the .NET platform and can be pulled from Nuget using www.soundpower.biz.common or going to https://www.nuget.org/packages/www.soundpower.biz.common/. It is provided as open source software under the MIT open source license.

Here is a list of the object classes provided within this library:

  • Comment – A class for managing basic information related to a comment. The commenter is tracked via a Generic Entity object.
  • Comment List – A list of comments.
  • Field Issue – A class designed to convey a message about a given attribute or object and be easily translated from/to the ModelState validation result objects. Meant for sending validation messages back from a service to be readily consumed by a user interface.
  • Field Issue List – A list of object messages.
  • Generic Entity – A simple class that can be used to refer to any type of object either in passing or as a reference in another object. Includes an ID, Name, Alternate ID, and Context attribute. The Unique ID Context attributes are required where the context is used to describe the type of object being referred to.
  • Generic Entity List – A list of generic entities.
  • Person – A basic description of a person including first, middle, last, suffix and prefix name parts. Provides several read-only properties that renders those name parts in different order.
  • People – A list of person objects

To support audit records the following class definitions are also present:

  • Attribute Detail – The description of an attribute including what value type it is and any reference list to draw values from for it.
  • Attribute Detail List – A list of attribute details
  • Audit Detail – An record noting the exact change to a data field as part of an audited action. Includes properties to describe which attribute on which object along with original and new values.
  • Audit Detail List – A list of audit details
  • Audit Record – A record of an audited action. Includes properties for when, action taken and by whom along with an audit detail list to note the data changed as part of the action.
  • Audit Record List – A list of audit records.

Lastly, the following message contract objects are also in this library. All response messages are based on our ResponseBase class to provide a common header.

  • Response Base – A class that can be used as the response to any web service call. It includes a property to note if the requested action failed, any warning messages and any error messages to be conveyed to the user.
  • Audit Record Response – A response object with a single audit record.
  • Audit Record List Response – A response object with an audit record list.
  • Comment List Response – A response object with a comment list.
  • Date Range Request – A request message based on our query request base that includes a from and to date/time property.
  • Generic Entity Response – A response message with a single generic entity.
  • Generic Entity List Response – A response message with a generic entity list.
  • ID List & Date Range Request – A request message based on the date range request that also includes a property for a list of object id’s.
  • Object Id Response – A simple message that included an ID field along with the rest of the standard response base.
  • Person Response – A response message with a single person object
  • People Response – A response message with a people list.
  • Query Request Base – A class containing some standard values to assist with a query request including record limits, sort direction, and sort field.
  • Query Response Base – A class to use as the base of a query response that includes a flag noting if the row limit was exceeded.