|
Imports System.Xml
Imports System.Xml.XPath
Public Class DuplicateRecordsCollection
Inherits RecordsCollection
''' <summary>
''' Line number of the record in the file
''' </summary>
''' <remarks></remarks>
Private _master_row As Integer
Private _action As MergeRows
Private _column_replacements As List(Of Replacement)
''' <summary>
''' Colection of duplicate records (line numbers of rows)
''' </summary>
''' <remarks></remarks>
Public Sub New(ByVal row As Integer, ByVal action As MergeRows)
MyBase.New(row)
_master_row = row
_action = action
_column_replacements = New List(Of Replacement)
End Sub
Public Property MasterRow() As Integer
Get
Return _master_row
End Get
Set(ByVal value As Integer)
_master_row = value
End Set
End Property
Public Sub ReplaceValues()
_column_replacements = New List(Of Replacement)
Dim proc As MergeProcessor
For Each proc In Me._action.MergeProcessors
Me._column_replacements.Add(New Replacement(proc.Column, proc.GetValue(Me)))
Next
End Sub
Public ReadOnly Property Replacements() As ICollection(Of Replacement)
Get
Return Me._column_replacements
End Get
End Property
End Class
Public Class Replacement
Private _column As DataColumn
Private _value As String
Friend ReadOnly Property Column() As DataColumn
Get
Return _column
End Get
End Property
Friend ReadOnly Property Value() As String
Get
Return _value
End Get
End Property
Public Sub New(ByVal column As DataColumn, ByVal value As String)
_column = column
_value = Value
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.