Project Description
A subset of the mostly used modules in Jakarta commons implemented in C#.

Modules Included
Following is a brief description of the functionality included. For more details please go through readme.
  • TypeUtils
    • CopyType - copies an object content to another object. Destination can be an interface, in which case Castle's DynamicProxy will be used to generate an instance of a class implementing the destination interface. This instance would be used as the destination object.
    • VerifyProperties - Verifies that all read/write properties defined on an object are maintained. In other words, after writing a value to a property, reading that property will return the same value. This is specially useful for properties that are being used by data-binding or NHibernate.
  • ListUtils
    • Slice - from a list of objects, it will return a list of object representing a single field/property values.
    • ToImmutableList - wraps a list with an immutable list that does not allow modifications on the source list.
    • ToTypesList - converts un-typed list to a typed one.
    • Join - concatenates the values of list items.
  • MapUtils
    • Merge - merging map2 with map1, values in map2 for the same key values will override values in map1.
    • One-Liner Map initialization (Map, MapEntry) - one step on achieving a single line map creation.
  • ToStringBuilder
    • ToString - implements the ToString for an object using reflection.
  • EqualsToBuilder
    • EqualsTo - checks for equality between two objects using reflection.
  • TypeIntrospector
    • GetFields - returns the list of fields declared in an object. Fields can be included/excluded by name.
    • GetMutableProperties - returns the list of read-and-write properties declared in an object. Properties can be included/excluded by name.
  • HashCodeBuilder
    • GetHashCode - calculate hashcode for a specific object using reflecting. All fields are considered in the object tree recursively. Overloaded versions of this method allows for including and excluding specific fields.
  • CompareToBuilder
    • CompareTo - applies the compare to logic to an object tree using reflection. All fields are considered in the object tree recursively. Overloaded versions of this method allows for including and excluding specific fields.

Last edited Jan 8, 2008 at 2:10 PM by yasserhelmi, version 27