Advertisement
richcoleman

Process Service - Solution

Nov 29th, 2011
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. '==============================
  2. 'PROCESS.VB
  3. '==============================
  4.  
  5.     Public Class Process
  6.  
  7.         Private _isTest As Boolean
  8.         Public Property Test() As Boolean
  9.             Get
  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.             Get
  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.             Return Me.Tasks.Count
  29.         End Function
  30.  
  31.         Public Tasks As List(Of Task)
  32.  
  33.     End Class
  34.  
  35.  
  36. '==============================
  37. 'TASK.VB
  38. '==============================
  39.  
  40.     Public Class Task
  41.  
  42.         Private _name As Boolean
  43.         Public Property Name() As Boolean
  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.  
  68. End Interface
  69.  
  70.  
  71.  
  72. '==============================
  73. 'CREATEPROCESS.SVC.VB
  74. '==============================
  75.  
  76.  
  77.     Public Class CreateProcess
  78.         Implements ICreateProcess
  79.  
  80.         Public Sub CreateNewProcess(ByVal newprocess As Process) Implements ICreateProcess.CreateNewProcess
  81.             'do stuff with new process
  82.             Dim iTaskCount As Integer = newprocess.GetTaskCount()
  83.         End Sub
  84.  
  85.     End Class
  86.  
  87.  
  88.  
  89.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement