Imports System.Web

Public Class SearchQuery

    Private m_template As String

    Public Property Keyword As Keyword
    Public Property Queried As Boolean

    Public ReadOnly Property Template As String
        Get
            Return m_template
        End Get
    End Property

    Public Sub New(Template As String, keyword As Keyword)
        m_template = Template
        Me.Keyword = keyword
        Me.Queried = False
    End Sub

    Public Function ToQueryValue() As String
        Return m_template.Replace("%keyword%", HttpUtility.UrlEncode(Keyword.Keyword))
    End Function

End Class
