Imports System
Imports System.ComponentModel
Imports System.Diagnostics
Imports System.Xml.Serialization


Public Class EntitySearch

    Public Class SearchProvider
        Dim m_exactMatchQuery As String = "SELECT Summary FROM Htmldocument WHERE FREETEXT(Summary,'({0}) ')"
        Public Sub New()

        End Sub

    End Class






    <Serializable()> _
    Public Class SearchSiteResponse
        Inherits ProviderResults
        Implements IProviderResults

        Private m_SearchResultCollection As SearchResultCollection

        Public Property SearchResultCollection() As SearchResultCollection
            Get
                Return Me.m_SearchResultCollection
            End Get
            Set(ByVal value As SearchResultCollection)
                Me.m_SearchResultCollection = value
            End Set
        End Property
    End Class

    <Serializable()> _
    Public Class SearchSupportResponse
        Inherits ProviderResults
        Implements IProviderResults

        Private m_SearchResultCollection As SearchResultCollection

        Public Property SearchResultCollection() As SearchResultCollection
            Get
                Return Me.m_SearchResultCollection
            End Get
            Set(ByVal value As SearchResultCollection)
                Me.m_SearchResultCollection = value
            End Set
        End Property
    End Class





    <Serializable()> _
    Public Class SearchResultCollection
        Dim m_results As List(Of SearchResult)

        Public Property results() As List(Of SearchResult)
            Get
                Return m_results
            End Get
            Set(ByVal value As List(Of SearchResult))
                m_results = value
            End Set
        End Property
    End Class
    <Serializable()> _
    Public Class SearchResult

        Private m_Score As Single
        Private m_URL As String
        Private m_MimeType As MimeType
        Private m_BinaryDocumentMime As String
        Private m_DocumentID As Integer
        Private m_ParentFolderID As Integer
        Private m_Title As String
        Private m_Summary As String
        Private m_HMTL As String
        Private m_CreateDate As Date
        Private m_resultType As SearchResultType

        Public Property URL() As String
            Get
                Return m_URL
            End Get
            Set(ByVal value As String)
                m_URL = value
            End Set
        End Property
        Public Property MimeType() As MimeType
            Get
                Return m_MimeType
            End Get
            Set(ByVal value As MimeType)
                m_MimeType = value
            End Set
        End Property
        Public Property BinaryDocumentMimeType() As String
            Get
                Return m_BinaryDocumentMime
            End Get
            Set(ByVal value As String)
                m_BinaryDocumentMime = value
            End Set
        End Property

        Public Property Score() As Single
            Get
                Return m_Score
            End Get
            Set(ByVal value As Single)
                m_Score = value
            End Set
        End Property
        Public Property DocumentID() As Integer
            Get
                Return m_DocumentID
            End Get
            Set(ByVal value As Integer)
                m_DocumentID = value
            End Set
        End Property
        Public Property ParentFolderID() As Integer
            Get
                Return m_ParentFolderID
            End Get
            Set(ByVal value As Integer)
                m_ParentFolderID = value
            End Set
        End Property
        Public Property Title() As String
            Get
                Return m_Title
            End Get
            Set(ByVal value As String)
                m_Title = value
            End Set
        End Property
        Public Property Summary() As String
            Get
                Return m_Summary
            End Get
            Set(ByVal value As String)
                m_Summary = value
            End Set
        End Property
        Public Property HMTL() As String
            Get
                Return m_HMTL
            End Get
            Set(ByVal value As String)
                m_HMTL = value
            End Set
        End Property
        Public Property CreateDate() As Date
            Get
                Return m_CreateDate
            End Get
            Set(ByVal value As Date)
                m_CreateDate = value
            End Set
        End Property
        Public Property resultType() As SearchResultType
            Get
                Return m_resultType
            End Get
            Set(ByVal value As SearchResultType)
                m_resultType = value
            End Set
        End Property

    End Class
    Public Enum SearchResultType
        Support
        Site
    End Enum

    Public Enum MimeType
        PDF
        TXT
        DOC
        SUPPORT_ARTICLE_FROM_DB
        CONTENT_ARTICLE_FROM_DB
    End Enum


    <Serializable()> _
    Public Class RegisterForUpdatesRequest
        Inherits ProviderRequests
        Implements IProviderParameters

        Private m_lastName As String
        Private m_firstName As String
        Private m_street As String
        Private m_apt As String
        Private m_city As String
        Private m_state As String
        Private m_zip As String
        Private m_phone As String
        Private m_email As String
        Private m_trackingID As String


        Public Sub New(ByVal lastName As String, ByVal firstName As String, ByVal street As String, _
          ByVal apt As String, ByVal city As String, ByVal state As String, ByVal zip As String, ByVal phone As String, ByVal email As String, ByVal trackingID As String)
            m_lastName = lastName
            m_firstName = firstName
            m_street = street
            m_apt = apt
            m_city = city
            m_state = state
            m_zip = zip
            m_phone = phone
            m_email = email
            m_trackingID = trackingID
        End Sub

        Public ReadOnly Property LastName() As String
            Get
                Return m_lastName
            End Get
        End Property

        Public ReadOnly Property FirstName() As String
            Get
                Return m_firstName
            End Get
        End Property

        Public ReadOnly Property Street() As String
            Get
                Return m_street
            End Get
        End Property

        Public ReadOnly Property Apt() As String
            Get
                Return m_apt
            End Get
        End Property

        Public ReadOnly Property City() As String
            Get
                Return m_city
            End Get
        End Property

        Public ReadOnly Property State() As String
            Get
                Return m_state
            End Get
        End Property

        Public ReadOnly Property Zip() As String
            Get
                Return m_zip
            End Get
        End Property

        Public ReadOnly Property Phone() As String
            Get
                Return m_phone
            End Get
        End Property

        Public ReadOnly Property Email() As String
            Get
                Return m_email
            End Get
        End Property

        Public ReadOnly Property TrackingID() As String
            Get
                Return m_trackingID
            End Get
        End Property

    End Class



End Class
