Creating the FileWorkerOptions Class

Each instance of the FileWorker class needs to know three things:

  • The file input location

  • The file output location

  • The file type to process

Therefore we will add another class called FileWorkerOptions. Instead of creating another class file, we simply add the code shown in Example 4-17 to the FileWorker class .vb file.

Example 4-17. Adding a new property class to FileWorker.vb.

Public Class FileWorkerOptions Private m_Output As String Private m_Input As String Private m_FileType As String Public Property Output() As String Get Return m_Output End Get Set(ByVal value As String) m_Output = value End Set End Property Public Property Input() As String Get Return m_Input End Get Set(ByVal value As String) m_Input = value ...

Get Programming Windows® Services with Microsoft® Visual Basic® 2008 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.