'**************************************************
' FILE : BBCodeText.vb
' AUTHOR : Paulo Santos
' CREATION : 4/29/2009 2:20:10 PM
' COPYRIGHT : Copyright © 2009
' PJ on Development
' All Rights Reserved.
'
' Description:
' TODO: Add file description
'
' Change log:
' 0.1 4/29/2009 2:20:10 PM
' Paulo Santos
' Created.
'***************************************************
'''
''' Represents a simple text in the BBCode.
'''
Public NotInheritable Class BBCodeText(Of TContext As Class)
Inherits BBCodeNode(Of TContext)
Private __InnerText As String
''' Initializes an instance of the class.
''' This is the default constructor for this class.
Friend Sub New()
End Sub
''' Initializes an instance of the class.
''' The text of the .
Friend Sub New(ByVal text As String)
Me.InnerText = text
End Sub
''' Transforms this instance of into its desired text representation.
''' An object that implements the interface.
''' The text formatted by the .
Public Overrides Function Format(ByVal context As TContext, ByVal formatter As ITextFormatter(Of TContext)) As String
Return formatter.Format(context, __InnerText)
End Function
''' Gets or sets the inner BBCode.
''' The BBCode between the start and end tags.
Public Overrides Property InnerBBCode() As String
Get
Return Me.InnerText
End Get
Set(ByVal value As String)
Me.InnerText = value
End Set
End Property
''' Gets or sets the plain text of the node.
''' The plain text between the start and end tags.
Public Overrides Property InnerText() As String
Get
Return __InnerText
End Get
Set(ByVal value As String)
__InnerText = value
End Set
End Property
''' Gets the outer BBCode.
''' The BBCode of this instance of the .
Public Overrides ReadOnly Property OuterBBCode() As String
Get
Return Me.InnerText
End Get
End Property
''' Returns a that represents the current .
''' A that represents the current .
''' 2
Public Overrides Function ToString() As String
Return Me.InnerText
End Function
End Class