Imports UTS_Core.UTSModule.Station

Namespace UTSModule.Test.Command
    Public Class TestCommand
        ''' <summary>
        ''' 测试命令类型
        ''' </summary>
        ''' <returns></returns>
        Public Property Type() As String

        ''' <summary>
        ''' 测试命令名称
        ''' </summary>
        ''' <returns></returns>
        Public Property Name() As String

        ''' <summary>
        ''' 测试命令参数
        ''' </summary>
        ''' <returns></returns>
        Public Property Parameter() As List(Of String)

        Sub New()
            Type = String.Empty
            Name = String.Empty
            Parameter = New List(Of String)()
        End Sub

        Sub New(node As RowNode)
            Parameter = New List(Of String)()

            If IsNothing(node) Then
                Type = String.Empty
                Name = String.Empty
            Else
                Type = node.CommandType
                Name = node.Command

                For i As Integer = 0 To node.Parameters.Count - 1
                    Parameter.Add(node.Parameters(i).Value)
                Next
            End If
        End Sub

    End Class
End Namespace