EDMI: Work on ClassDataASorDB

This commit is contained in:
Jonathan Jenne
2021-06-30 16:35:21 +02:00
parent d79340d54f
commit 8e8374fc88
24 changed files with 210 additions and 131 deletions

View File

@@ -8,6 +8,8 @@ Public Class Client
Private Const INVALID_OBEJCT_ID As Long = 0
Private Const KIND_TYPE_DOC = "DOC"
Public Const DEFAULT_SERVICE_PORT = 9000
Private ReadOnly _logger As Logger
Private ReadOnly _channelFactory As ChannelFactory(Of IEDMIServiceChannel)
Private ReadOnly _IPAddressServer As String
@@ -27,6 +29,22 @@ Public Class Client
Public AccessRight As AccessRight
End Class
Public Shared Function ParseServiceAddress(AddressWithOptionalPort As String) As Tuple(Of String, Integer)
Dim oSplit() As String = AddressWithOptionalPort.Split(":"c)
Dim oAppServerAddress As String = oSplit(0)
Dim oAppServerPort As Integer
If oSplit.Length = 2 Then
If Integer.TryParse(oSplit(1), oAppServerPort) Then
oAppServerPort = DEFAULT_SERVICE_PORT
End If
Else
oAppServerPort = DEFAULT_SERVICE_PORT
End If
Return New Tuple(Of String, Integer)(oAppServerAddress, oAppServerPort)
End Function
''' <summary>
''' Creates a new EDMI Client object
''' </summary>