Imports System.ComponentModel

Namespace Data

    ''' <summary>
    ''' Represents a field that is sorted.
    ''' </summary>
    ''' <remarks></remarks>
    Public NotInheritable Class SortField

        Public Sub New()
        End Sub

        Friend Sub New(ByVal sortProperty As PropertyDescriptor, ByVal direction As ListSortDirection, ByVal propertyIndex As Integer)
            Me.SortProperty = sortProperty
            Me.Direction = direction
            Me.PropertyIndex = propertyIndex
            If sortProperty IsNot Nothing Then _
                Me.PropertyName = sortProperty.Name
        End Sub

        Public SortProperty As PropertyDescriptor
        Public Direction As ListSortDirection
        Public PropertyIndex As Integer
        Public PropertyName As String

    End Class

End Namespace