Imports DigitalData.Modules.EDMI.API.EDMIServiceReference Imports DigitalData.Modules.Logging Namespace Modules.IDB Public Class CheckOutFile Inherits BaseMethod Public Sub New(pLogConfig As LogConfig, pChannel As IEDMIServiceChannel) MyBase.New(pLogConfig, pChannel) End Sub Public Async Function RunAsync(pObjectId As Long, Optional pComment As String = "", Optional pOptions As Options.CheckOutInOptions = Nothing) As Task(Of Long) ' Set default options If pOptions Is Nothing Then pOptions = New Options.CheckOutInOptions() End If Dim oCheckOutFileResponse = Await Channel.CheckInOutFileAsync(New CheckInOutFileRequest With { .User = New UserState With { .Language = pOptions.Language, .UserName = pOptions.Username }, .Action = CheckInOutFileAction.CheckOut, .Comment = pComment, .ObjectId = pObjectId }) If oCheckOutFileResponse.OK = False Then Throw New ApplicationException("Could not Import File Contents!") End If Return oCheckOutFileResponse.ObjectId End Function End Class End Namespace