Symphony Framework
CompareObjects Method
Symphony.Conductor.Model Namespace > DataObjectBase Class : CompareObjects Method
The first object to compare
The second object to compare against
The name of the propert/column being sorted
The direction of the sort, or type Symphony.Conductor.Framework.SynergySortOrder
Virtal method to be overriden by the implementing class.
Syntax
public virtual int CompareObjects( 
   object obj1,
   object obj2,
   string colName,
   SynergySortOrder sortDir
)

Parameters

obj1
The first object to compare
obj2
The second object to compare against
colName
The name of the propert/column being sorted
sortDir
The direction of the sort, or type Symphony.Conductor.Framework.SynergySortOrder

Return Value

The method should return an integer result indicating that (0) the two objects are identical, (1) that the first object is greater than the second, or (-1) that the first object vlaue is less than the second.
Remarks
The CompareObjects method is designed to be implemented by the implementing class. It will be called when objects within a list are being sorted. When called, two objects are supplied and the required sort direction. This method should be code generated. If the method returns a value of (-2) then the sort method will attmpt to execute the CustomCompareObjects method which allows for customer sorting of object data properties.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

DataObjectBase Class
DataObjectBase Members