View difference between Paste ID: rt8HwsXY and GpDhPRVm
SHOW: | | - or go back to the newest paste.
1
'==============================
2
'PROCESS.VB
3
'==============================
4
5
    Public Class Process
6
7
        Private _isTest As Boolean
8
        Public Property Test() As Boolean
9-
        Private Property Test() As Boolean
9+
10
                Return _isTest
11
            End Get
12
            Set(ByVal value As Boolean)
13
                _isTest = value
14
            End Set
15
        End Property
16
17
        Private _timeLimitForTesting As Integer
18
        Public Property TimeLimitForTesting() As Integer
19-
        Private Property TimeLimitForTesting() As Integer
19+
20
                Return _timeLimitForTesting
21
            End Get
22
            Set(ByVal value As Integer)
23
                _timeLimitForTesting = value
24
            End Set
25
        End Property
26
27
        Friend Function GetTaskCount() As Integer
28-
        Public Sub SetProcessTimeLimitForTesting(ByVal timeLimitForTesting As Integer)
28+
29-
            _isTest = True
29+
30-
            _timeLimitForTesting = timeLimitForTesting
30+
31
        Public Tasks As List(Of Task)
32
33
    End Class
34
35
36
'==============================
37-
        Public Sub AddTask(ByVal name As String)
37+
38-
            Dim newTask As New Task()
38+
39-
            newTask.Name = name
39+
40-
            Me.Tasks.Add(newTask)
40+
41
42
        Private _name As Boolean
43-
        Private Tasks As New TaskCollection()
43+
44
            Get
45
                Return _name
46
            End Get
47
            Set(ByVal value As Boolean)
48
                _name = value
49
            End Set
50
        End Property
51
52
    End Class
53
54
    
55
'==============================
56
'ICREATEPROCESS.VB
57
'==============================
58
59
60
Imports System.ServiceModel
61
62
<ServiceContract()>
63
Public Interface ICreateProcess
64
65
    <OperationContract()>
66
    Sub CreateNewProcess(ByVal newprocess As Process)
67-
    Public NotInheritable Class TaskCollection
67+
68-
        Inherits CollectionBase
68+
69
70-
        Public Sub New()
70+
71
72
'==============================
73
'CREATEPROCESS.SVC.VB
74-
        Default Public ReadOnly Property Item(ByVal index As Integer) As Task
74+
75
76-
                Return CType(List.Item(index), Task)
76+
77
    Public Class CreateProcess
78
        Implements ICreateProcess
79
80-
        Public Sub Add(ByVal task As Task)
80+
81-
            List.Add(task)
81+
82
            Dim iTaskCount As Integer = newprocess.GetTaskCount()
83
        End Sub
84-
        Public Sub Remove(ByVal index As Integer)
84+
85-
            If index > Count - 1 Or index < 0 Then
85+
86-
                Console.WriteLine("Can't remove this item")
86+
87-
            Else
87+
88-
                List.RemoveAt(index)
88+
89-
            End If
89+