1*cdf0e10cSrcweir'************************************************************************* 2*cdf0e10cSrcweir' 3*cdf0e10cSrcweir' DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir' 5*cdf0e10cSrcweir' Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir' 7*cdf0e10cSrcweir' OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir' 9*cdf0e10cSrcweir' This file is part of OpenOffice.org. 10*cdf0e10cSrcweir' 11*cdf0e10cSrcweir' OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir' it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir' only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir' 15*cdf0e10cSrcweir' OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir' but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir' GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir' (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir' 21*cdf0e10cSrcweir' You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir' version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir' <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir' for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir' 26*cdf0e10cSrcweir'************************************************************************* 27*cdf0e10cSrcweir 28*cdf0e10cSrcweirOption Explicit On 29*cdf0e10cSrcweirOption Strict On 30*cdf0e10cSrcweir 31*cdf0e10cSrcweirimports System 32*cdf0e10cSrcweirimports uno 33*cdf0e10cSrcweirimports uno.util 34*cdf0e10cSrcweirimports unoidl.com.sun.star.lang 35*cdf0e10cSrcweirimports unoidl.com.sun.star.uno 36*cdf0e10cSrcweirimports unoidl.com.sun.star.test.bridge 37*cdf0e10cSrcweirimports System.Windows.Forms 38*cdf0e10cSrcweirimports System.Diagnostics 39*cdf0e10cSrcweirimports System.Reflection 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir 42*cdf0e10cSrcweirNamespace vb_testobj 43*cdf0e10cSrcweirPublic Class VBBridgeTestObject 44*cdf0e10cSrcweir Inherits WeakBase 45*cdf0e10cSrcweir Implements XRecursiveCall, XBridgeTest2 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir Private m_xContext As XComponentContext 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir Public Sub New (xContext As XComponentContext) 50*cdf0e10cSrcweir MyBase.New 51*cdf0e10cSrcweir m_xContext = xContext 52*cdf0e10cSrcweir End Sub 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir Private m_bool As Boolean 55*cdf0e10cSrcweir Private m_char As Char 56*cdf0e10cSrcweir Private m_byte As Byte 57*cdf0e10cSrcweir Private m_short As Short 58*cdf0e10cSrcweir Private m_ushort As UInt16 59*cdf0e10cSrcweir Private m_long As Integer 60*cdf0e10cSrcweir Private m_ulong As UInt32 61*cdf0e10cSrcweir Private m_hyper As Long 62*cdf0e10cSrcweir Private m_uhyper As UInt64 63*cdf0e10cSrcweir Private m_float As Single 64*cdf0e10cSrcweir Private m_double As Double 65*cdf0e10cSrcweir Private m_string As String 66*cdf0e10cSrcweir Private m_xInterface As Object 67*cdf0e10cSrcweir Private m_any As Any 68*cdf0e10cSrcweir Private m_testEnum As TestEnum = TestEnum.TEST 69*cdf0e10cSrcweir Private m_testElements() As TestElement = New TestElement(){} 70*cdf0e10cSrcweir Private m_testDataElements As TestDataElements = New TestDataElements 71*cdf0e10cSrcweir Private m_nLastCallId As Integer = 0 72*cdf0e10cSrcweir Private m_bFirstCall As Boolean = True 73*cdf0e10cSrcweir Private m_bSequenceOfCallTestPassed As Boolean = True 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir Private m_arBool() As Boolean 76*cdf0e10cSrcweir Private m_arChar() As Char 77*cdf0e10cSrcweir Private m_arByte() As Byte 78*cdf0e10cSrcweir Private m_arShort() As Short 79*cdf0e10cSrcweir Private m_arLong() As Integer 80*cdf0e10cSrcweir Private m_arHyper() As Long 81*cdf0e10cSrcweir Private m_arUShort() As UInt16 82*cdf0e10cSrcweir Private m_arULong() As UInt32 83*cdf0e10cSrcweir Private m_arUHyper() As UInt64 84*cdf0e10cSrcweir Private m_arString() As String 85*cdf0e10cSrcweir Private m_arFloat() As Single 86*cdf0e10cSrcweir Private m_arDouble() As Double 87*cdf0e10cSrcweir Private m_arEnum() As TestEnum 88*cdf0e10cSrcweir Private m_arObject() As Object 89*cdf0e10cSrcweir Private m_arLong2()() As Integer 90*cdf0e10cSrcweir Private m_arLong3()()() As Integer 91*cdf0e10cSrcweir Private m_arAny() As Any 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir Public Overridable Sub setValues( _ 94*cdf0e10cSrcweir bBool As Boolean, aChar As Char, nByte As Byte, nShort As Short, _ 95*cdf0e10cSrcweir nUShort As UInt16, nLong As Integer, nULong As UInt32, _ 96*cdf0e10cSrcweir nHyper As Long, nUHyper As UInt64, fFloat As Single, _ 97*cdf0e10cSrcweir fDouble As Double, testEnum As TestEnum, str As String, _ 98*cdf0e10cSrcweir xInterface As Object, any As Any, testElements() As TestElement, _ 99*cdf0e10cSrcweir testDataElements As TestDataElements) _ 100*cdf0e10cSrcweir Implements XBridgeTest2.setValues 101*cdf0e10cSrcweir#if DEBUG 102*cdf0e10cSrcweir ' Console.WriteLine( "##### " + GetType().FullName + ".setValues:" + any ) 103*cdf0e10cSrcweir#endif 104*cdf0e10cSrcweir m_bool = bBool 105*cdf0e10cSrcweir m_char = aChar 106*cdf0e10cSrcweir m_byte = nByte 107*cdf0e10cSrcweir m_short = nShort 108*cdf0e10cSrcweir m_ushort = nUShort 109*cdf0e10cSrcweir m_long = nLong 110*cdf0e10cSrcweir m_ulong = nULong 111*cdf0e10cSrcweir m_hyper = nHyper 112*cdf0e10cSrcweir m_uhyper = nUHyper 113*cdf0e10cSrcweir m_float = fFloat 114*cdf0e10cSrcweir m_double = fDouble 115*cdf0e10cSrcweir m_testEnum = testEnum 116*cdf0e10cSrcweir m_string = str 117*cdf0e10cSrcweir m_xInterface = xInterface 118*cdf0e10cSrcweir m_any = any 119*cdf0e10cSrcweir m_testElements = testElements 120*cdf0e10cSrcweir m_testDataElements = testDataElements 121*cdf0e10cSrcweir End Sub 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir Public Overridable Function setValues2( _ 124*cdf0e10cSrcweir ByRef io_bool As Boolean, ByRef io_char As Char, _ 125*cdf0e10cSrcweir ByRef io_byte As Byte, ByRef io_short As Short, _ 126*cdf0e10cSrcweir ByRef io_ushort As UInt16, ByRef io_long As Integer, _ 127*cdf0e10cSrcweir ByRef io_ulong As UInt32, ByRef io_hyper As Long, _ 128*cdf0e10cSrcweir ByRef io_uhyper As UInt64, ByRef io_float As Single, _ 129*cdf0e10cSrcweir ByRef io_double As Double, ByRef io_testEnum As TestEnum, _ 130*cdf0e10cSrcweir ByRef io_string As String, ByRef io_xInterface As Object, _ 131*cdf0e10cSrcweir ByRef io_any As Any, ByRef io_testElements() As TestElement, _ 132*cdf0e10cSrcweir ByRef io_testDataElements As TestDataElements) As TestDataElements _ 133*cdf0e10cSrcweir Implements XBridgeTest2.setValues2 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir#if DEBUG 136*cdf0e10cSrcweir 'Console.WriteLine( "##### " + GetType().FullName + ".setValues2:" + io_any ) 137*cdf0e10cSrcweir#endif 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir m_bool = io_bool 140*cdf0e10cSrcweir m_char = io_char 141*cdf0e10cSrcweir m_byte = io_byte 142*cdf0e10cSrcweir m_short = io_short 143*cdf0e10cSrcweir m_ushort = io_ushort 144*cdf0e10cSrcweir m_long = io_long 145*cdf0e10cSrcweir m_ulong = io_ulong 146*cdf0e10cSrcweir m_hyper = io_hyper 147*cdf0e10cSrcweir m_uhyper = io_uhyper 148*cdf0e10cSrcweir m_float = io_float 149*cdf0e10cSrcweir m_double = io_double 150*cdf0e10cSrcweir m_testEnum = io_testEnum 151*cdf0e10cSrcweir m_string = io_string 152*cdf0e10cSrcweir m_xInterface = io_xInterface 153*cdf0e10cSrcweir m_any = io_any 154*cdf0e10cSrcweir m_testElements = DirectCast(io_testElements.Clone(), TestElement()) 155*cdf0e10cSrcweir m_testDataElements = io_testDataElements 156*cdf0e10cSrcweir 157*cdf0e10cSrcweir Dim temp As TestElement = io_testElements(0) 158*cdf0e10cSrcweir io_testElements(0) = io_testElements(1) 159*cdf0e10cSrcweir io_testElements(1) = temp 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir Return m_testDataElements 162*cdf0e10cSrcweir End Function 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir Public Overridable Function getValues( _ 165*cdf0e10cSrcweir ByRef o_bool As Boolean, ByRef o_char As Char, _ 166*cdf0e10cSrcweir ByRef o_byte As Byte, ByRef o_short As Short, _ 167*cdf0e10cSrcweir ByRef o_ushort As UInt16, ByRef o_long As Integer, _ 168*cdf0e10cSrcweir ByRef o_ulong As UInt32, ByRef o_hyper As Long, _ 169*cdf0e10cSrcweir ByRef o_uhyper As UInt64, ByRef o_float As Single, _ 170*cdf0e10cSrcweir ByRef o_double As Double, ByRef o_testEnum As TestEnum, _ 171*cdf0e10cSrcweir ByRef o_string As String, ByRef o_xInterface As Object, _ 172*cdf0e10cSrcweir ByRef o_any As Any, ByRef o_testElements() As TestElement, _ 173*cdf0e10cSrcweir ByRef o_testDataElements As TestDataElements) As TestDataElements _ 174*cdf0e10cSrcweir Implements XBridgeTest2.getValues 175*cdf0e10cSrcweir#if DEBUG 176*cdf0e10cSrcweir 'Console.WriteLine( "##### " + GetType().FullName + ".getValues" ) 177*cdf0e10cSrcweir#endif 178*cdf0e10cSrcweir 179*cdf0e10cSrcweir o_bool = m_bool 180*cdf0e10cSrcweir o_char = m_char 181*cdf0e10cSrcweir o_byte = m_byte 182*cdf0e10cSrcweir o_short = m_short 183*cdf0e10cSrcweir o_ushort = m_ushort 184*cdf0e10cSrcweir o_long = m_long 185*cdf0e10cSrcweir o_ulong = m_ulong 186*cdf0e10cSrcweir o_hyper = m_hyper 187*cdf0e10cSrcweir o_uhyper = m_uhyper 188*cdf0e10cSrcweir o_float = m_float 189*cdf0e10cSrcweir o_double = m_double 190*cdf0e10cSrcweir o_testEnum = m_testEnum 191*cdf0e10cSrcweir o_string = m_string 192*cdf0e10cSrcweir o_xInterface = m_xInterface 193*cdf0e10cSrcweir o_any = m_any 194*cdf0e10cSrcweir o_testElements = m_testElements 195*cdf0e10cSrcweir o_testDataElements = m_testDataElements 196*cdf0e10cSrcweir 197*cdf0e10cSrcweir Return m_testDataElements 198*cdf0e10cSrcweir End Function 199*cdf0e10cSrcweir 200*cdf0e10cSrcweir ' Attributes --------------------------------------------------------- 201*cdf0e10cSrcweir Public Overridable Property Bool As Boolean _ 202*cdf0e10cSrcweir Implements XBridgeTest2.Bool 203*cdf0e10cSrcweir Get 204*cdf0e10cSrcweir Return m_bool 205*cdf0e10cSrcweir End Get 206*cdf0e10cSrcweir Set (Value As Boolean) 207*cdf0e10cSrcweir m_bool = value 208*cdf0e10cSrcweir End Set 209*cdf0e10cSrcweir End Property 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir Public Overridable Property [Byte] As Byte _ 212*cdf0e10cSrcweir Implements XBridgeTest2.Byte 213*cdf0e10cSrcweir Get 214*cdf0e10cSrcweir Return m_byte 215*cdf0e10cSrcweir End Get 216*cdf0e10cSrcweir Set (Value As Byte) 217*cdf0e10cSrcweir m_byte = value 218*cdf0e10cSrcweir End Set 219*cdf0e10cSrcweir End Property 220*cdf0e10cSrcweir 221*cdf0e10cSrcweir Public Overridable Property [Char] As Char _ 222*cdf0e10cSrcweir Implements XBridgeTest2.Char 223*cdf0e10cSrcweir Get 224*cdf0e10cSrcweir Return m_char 225*cdf0e10cSrcweir End Get 226*cdf0e10cSrcweir Set (Value As Char) 227*cdf0e10cSrcweir m_char = value 228*cdf0e10cSrcweir End Set 229*cdf0e10cSrcweir End Property 230*cdf0e10cSrcweir 231*cdf0e10cSrcweir Public Overridable Property [Short] As Short _ 232*cdf0e10cSrcweir Implements XBridgeTest2.Short 233*cdf0e10cSrcweir Get 234*cdf0e10cSrcweir Return m_short 235*cdf0e10cSrcweir End Get 236*cdf0e10cSrcweir Set (Value As Short) 237*cdf0e10cSrcweir m_short = value 238*cdf0e10cSrcweir End Set 239*cdf0e10cSrcweir End Property 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir Public Overridable Property [UShort] As UInt16 _ 242*cdf0e10cSrcweir Implements XBridgeTest2.UShort 243*cdf0e10cSrcweir Get 244*cdf0e10cSrcweir Return m_ushort 245*cdf0e10cSrcweir End Get 246*cdf0e10cSrcweir Set (Value As UInt16) 247*cdf0e10cSrcweir m_ushort = value 248*cdf0e10cSrcweir End Set 249*cdf0e10cSrcweir End Property 250*cdf0e10cSrcweir 251*cdf0e10cSrcweir Public Overridable Property [Long] As Integer _ 252*cdf0e10cSrcweir Implements XBridgeTest2.Long 253*cdf0e10cSrcweir Get 254*cdf0e10cSrcweir Return m_long 255*cdf0e10cSrcweir End Get 256*cdf0e10cSrcweir Set (Value As Integer) 257*cdf0e10cSrcweir m_long = value 258*cdf0e10cSrcweir End Set 259*cdf0e10cSrcweir End Property 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir Public Overridable Property [ULong]() As UInt32 _ 262*cdf0e10cSrcweir Implements XBridgeTest2.ULong 263*cdf0e10cSrcweir Get 264*cdf0e10cSrcweir Return m_ulong 265*cdf0e10cSrcweir End Get 266*cdf0e10cSrcweir Set (Value As UInt32) 267*cdf0e10cSrcweir m_ulong = value 268*cdf0e10cSrcweir End Set 269*cdf0e10cSrcweir End Property 270*cdf0e10cSrcweir 271*cdf0e10cSrcweir Public Overridable Property Hyper As Long _ 272*cdf0e10cSrcweir Implements XBridgeTest2.Hyper 273*cdf0e10cSrcweir Get 274*cdf0e10cSrcweir Return m_hyper 275*cdf0e10cSrcweir End Get 276*cdf0e10cSrcweir Set (Value As Long) 277*cdf0e10cSrcweir m_hyper = value 278*cdf0e10cSrcweir End Set 279*cdf0e10cSrcweir End Property 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir Public Overridable Property UHyper As UInt64 _ 282*cdf0e10cSrcweir Implements XBridgeTest2.UHyper 283*cdf0e10cSrcweir Get 284*cdf0e10cSrcweir Return m_uhyper 285*cdf0e10cSrcweir End Get 286*cdf0e10cSrcweir Set (Value As UInt64) 287*cdf0e10cSrcweir m_uhyper = value 288*cdf0e10cSrcweir End Set 289*cdf0e10cSrcweir End Property 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir Public Overridable Property Float As Single _ 292*cdf0e10cSrcweir Implements XBridgeTest2.Float 293*cdf0e10cSrcweir Get 294*cdf0e10cSrcweir Return m_float 295*cdf0e10cSrcweir End Get 296*cdf0e10cSrcweir Set (Value As Single) 297*cdf0e10cSrcweir m_float = value 298*cdf0e10cSrcweir End Set 299*cdf0e10cSrcweir End Property 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir Public Overridable Property [Double] As Double _ 302*cdf0e10cSrcweir Implements XBridgeTest2.Double 303*cdf0e10cSrcweir Get 304*cdf0e10cSrcweir Return m_double 305*cdf0e10cSrcweir End Get 306*cdf0e10cSrcweir Set (Value As Double) 307*cdf0e10cSrcweir m_double = value 308*cdf0e10cSrcweir End Set 309*cdf0e10cSrcweir End Property 310*cdf0e10cSrcweir 311*cdf0e10cSrcweir Public Overridable Property [Enum] As TestEnum _ 312*cdf0e10cSrcweir Implements XBridgeTest2.Enum 313*cdf0e10cSrcweir Get 314*cdf0e10cSrcweir Return m_testEnum 315*cdf0e10cSrcweir End Get 316*cdf0e10cSrcweir Set (Value As TestEnum) 317*cdf0e10cSrcweir m_testEnum = value 318*cdf0e10cSrcweir End Set 319*cdf0e10cSrcweir End Property 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir Public Overridable Property [String] As String _ 322*cdf0e10cSrcweir Implements XBridgeTest2.String 323*cdf0e10cSrcweir Get 324*cdf0e10cSrcweir Return m_string 325*cdf0e10cSrcweir End Get 326*cdf0e10cSrcweir Set (Value As String) 327*cdf0e10cSrcweir m_string = value 328*cdf0e10cSrcweir End Set 329*cdf0e10cSrcweir End Property 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir Public Overridable Property [Interface] As Object _ 332*cdf0e10cSrcweir Implements XBridgeTest2.Interface 333*cdf0e10cSrcweir Get 334*cdf0e10cSrcweir Return m_xInterface 335*cdf0e10cSrcweir End Get 336*cdf0e10cSrcweir Set (Value As Object) 337*cdf0e10cSrcweir m_xInterface = value 338*cdf0e10cSrcweir End Set 339*cdf0e10cSrcweir End Property 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir Public Overridable Property Any As uno.Any _ 342*cdf0e10cSrcweir Implements XBridgeTest2.Any 343*cdf0e10cSrcweir Get 344*cdf0e10cSrcweir#if DEBUG 345*cdf0e10cSrcweir' Console.WriteLine( "##### " + GetType().FullName + ".Any" ) 346*cdf0e10cSrcweir#endif 347*cdf0e10cSrcweir Return m_any 348*cdf0e10cSrcweir End Get 349*cdf0e10cSrcweir Set (Value As Any) 350*cdf0e10cSrcweir#if DEBUG 351*cdf0e10cSrcweir 'Console.WriteLine( "##### " + GetType().FullName + ".Any:" + value ) 352*cdf0e10cSrcweir#endif 353*cdf0e10cSrcweir m_any = value 354*cdf0e10cSrcweir End Set 355*cdf0e10cSrcweir End Property 356*cdf0e10cSrcweir 357*cdf0e10cSrcweir Public Overridable Property Sequence As TestElement() _ 358*cdf0e10cSrcweir Implements XBridgeTest2.Sequence 359*cdf0e10cSrcweir Get 360*cdf0e10cSrcweir Return m_testElements 361*cdf0e10cSrcweir End Get 362*cdf0e10cSrcweir Set (Value() As TestElement) 363*cdf0e10cSrcweir m_testElements = value 364*cdf0e10cSrcweir End Set 365*cdf0e10cSrcweir End Property 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir Public Overridable Property Struct As TestDataElements _ 368*cdf0e10cSrcweir Implements XBridgeTest2.Struct 369*cdf0e10cSrcweir Get 370*cdf0e10cSrcweir Return m_testDataElements 371*cdf0e10cSrcweir End Get 372*cdf0e10cSrcweir Set (Value As TestDataElements) 373*cdf0e10cSrcweir m_testDataElements = value 374*cdf0e10cSrcweir End Set 375*cdf0e10cSrcweir End Property 376*cdf0e10cSrcweir 377*cdf0e10cSrcweir Public Overridable Function transportAny(value As Any) As Any _ 378*cdf0e10cSrcweir Implements XBridgeTest2.transportAny 379*cdf0e10cSrcweir Return value 380*cdf0e10cSrcweir End Function 381*cdf0e10cSrcweir 382*cdf0e10cSrcweir Public Overridable Sub [call](nCallId As Integer, nWaitMUSEC As Integer) _ 383*cdf0e10cSrcweir Implements XBridgeTest2.call 384*cdf0e10cSrcweir 385*cdf0e10cSrcweir Threading.Thread.Sleep(CType(nWaitMUSEC / 10000, Integer)) 386*cdf0e10cSrcweir If m_bFirstCall = True 387*cdf0e10cSrcweir m_bFirstCall = False 388*cdf0e10cSrcweir Else 389*cdf0e10cSrcweir m_bSequenceOfCallTestPassed = m_bSequenceOfCallTestPassed And (nCallId > m_nLastCallId) 390*cdf0e10cSrcweir End If 391*cdf0e10cSrcweir m_nLastCallId = nCallId 392*cdf0e10cSrcweir End Sub 393*cdf0e10cSrcweir 394*cdf0e10cSrcweir Public Overridable Sub callOneway(nCallId As Integer, nWaitMUSEC As Integer) _ 395*cdf0e10cSrcweir Implements XBridgeTest2.callOneway 396*cdf0e10cSrcweir 397*cdf0e10cSrcweir Threading.Thread.Sleep(CType(nWaitMUSEC / 10000, Integer)) 398*cdf0e10cSrcweir m_bSequenceOfCallTestPassed = m_bSequenceOfCallTestPassed And (nCallId > m_nLastCallId) 399*cdf0e10cSrcweir m_nLastCallId = nCallId 400*cdf0e10cSrcweir End Sub 401*cdf0e10cSrcweir 402*cdf0e10cSrcweir Public Overridable Function sequenceOfCallTestPassed() As Boolean _ 403*cdf0e10cSrcweir Implements XBridgeTest2.sequenceOfCallTestPassed 404*cdf0e10cSrcweir Return m_bSequenceOfCallTestPassed 405*cdf0e10cSrcweir End Function 406*cdf0e10cSrcweir 407*cdf0e10cSrcweir Public Overridable Sub callRecursivly(xCall As XRecursiveCall, nToCall As Integer) _ 408*cdf0e10cSrcweir Implements XRecursiveCall.callRecursivly 409*cdf0e10cSrcweir SyncLock (Me) 410*cdf0e10cSrcweir If nToCall <> 0 411*cdf0e10cSrcweir nToCall = nToCall - 1 412*cdf0e10cSrcweir xCall.callRecursivly(Me , nToCall) 413*cdf0e10cSrcweir End If 414*cdf0e10cSrcweir End SyncLock 415*cdf0e10cSrcweir End Sub 416*cdf0e10cSrcweir 417*cdf0e10cSrcweir Public Overridable Sub startRecursiveCall(xCall As XRecursiveCall, nToCall As Integer) _ 418*cdf0e10cSrcweir Implements XBridgeTest2.startRecursiveCall 419*cdf0e10cSrcweir SyncLock (Me) 420*cdf0e10cSrcweir If nToCall <> 0 421*cdf0e10cSrcweir nToCall = nToCall - 1 422*cdf0e10cSrcweir xCall.callRecursivly(Me , nToCall ) 423*cdf0e10cSrcweir End If 424*cdf0e10cSrcweir End SyncLock 425*cdf0e10cSrcweir End Sub 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir ' XBridgeTest 428*cdf0e10cSrcweir Public Overridable Function raiseException( _ 429*cdf0e10cSrcweir nArgumentPos As Short, rMsg As String, xContext As Object) As TestDataElements _ 430*cdf0e10cSrcweir Implements XBridgeTest2.raiseException 431*cdf0e10cSrcweir Throw New IllegalArgumentException(rMsg, xContext, nArgumentPos) 432*cdf0e10cSrcweir End Function 433*cdf0e10cSrcweir 434*cdf0e10cSrcweir Public Overridable Sub raiseRuntimeExceptionOneway(rMsg As String , xContext As Object) _ 435*cdf0e10cSrcweir Implements XBridgeTest2.raiseRuntimeExceptionOneway 436*cdf0e10cSrcweir Throw New RuntimeException(rMsg, xContext) 437*cdf0e10cSrcweir End Sub 438*cdf0e10cSrcweir 439*cdf0e10cSrcweir Public Overridable Property RuntimeException As Integer _ 440*cdf0e10cSrcweir Implements XBridgeTest2.RuntimeException 441*cdf0e10cSrcweir Get 442*cdf0e10cSrcweir Throw New RuntimeException(m_string, m_xInterface) 443*cdf0e10cSrcweir End Get 444*cdf0e10cSrcweir Set (Value As Integer) 445*cdf0e10cSrcweir Throw New RuntimeException(m_string, m_xInterface) 446*cdf0e10cSrcweir End Set 447*cdf0e10cSrcweir End Property 448*cdf0e10cSrcweir 449*cdf0e10cSrcweir ' XBridgeTest2 450*cdf0e10cSrcweir Public Overridable Function setDim2(val()() As Integer) As Integer()() _ 451*cdf0e10cSrcweir Implements XBridgeTest2.setDim2 452*cdf0e10cSrcweir m_arLong2 = val 453*cdf0e10cSrcweir Return val 454*cdf0e10cSrcweir End Function 455*cdf0e10cSrcweir 456*cdf0e10cSrcweir Public Overridable Function setDim3(val()()() As Integer) As Integer()()() _ 457*cdf0e10cSrcweir Implements XBridgeTest2.setDim3 458*cdf0e10cSrcweir m_arLong3 = val 459*cdf0e10cSrcweir Return val 460*cdf0e10cSrcweir End Function 461*cdf0e10cSrcweir 462*cdf0e10cSrcweir Public Overridable Function setSequenceAny(val() As Any) As Any() _ 463*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceAny 464*cdf0e10cSrcweir m_arAny = val 465*cdf0e10cSrcweir Return val 466*cdf0e10cSrcweir End Function 467*cdf0e10cSrcweir 468*cdf0e10cSrcweir Public Overridable Function setSequenceBool(val() As Boolean) As Boolean() _ 469*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceBool 470*cdf0e10cSrcweir m_arBool = val 471*cdf0e10cSrcweir Return val 472*cdf0e10cSrcweir End Function 473*cdf0e10cSrcweir 474*cdf0e10cSrcweir Public Overridable Function setSequenceByte(val() As Byte) As Byte() _ 475*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceByte 476*cdf0e10cSrcweir m_arByte = val 477*cdf0e10cSrcweir Return val 478*cdf0e10cSrcweir End Function 479*cdf0e10cSrcweir 480*cdf0e10cSrcweir Public Overridable Function setSequenceChar(val() As Char) As Char() _ 481*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceChar 482*cdf0e10cSrcweir m_arChar = val 483*cdf0e10cSrcweir Return val 484*cdf0e10cSrcweir End Function 485*cdf0e10cSrcweir 486*cdf0e10cSrcweir Public Overridable Function setSequenceShort(val() As Short) As Short() _ 487*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceShort 488*cdf0e10cSrcweir m_arShort = val 489*cdf0e10cSrcweir Return val 490*cdf0e10cSrcweir End Function 491*cdf0e10cSrcweir 492*cdf0e10cSrcweir Public Overridable Function setSequenceLong(val() As Integer) As Integer() _ 493*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceLong 494*cdf0e10cSrcweir 495*cdf0e10cSrcweir m_arLong = val 496*cdf0e10cSrcweir Return val 497*cdf0e10cSrcweir End Function 498*cdf0e10cSrcweir 499*cdf0e10cSrcweir Public Overridable Function setSequenceHyper(val() As Long) As Long() _ 500*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceHyper 501*cdf0e10cSrcweir m_arHyper = val 502*cdf0e10cSrcweir Return val 503*cdf0e10cSrcweir End Function 504*cdf0e10cSrcweir 505*cdf0e10cSrcweir Public Overridable Function setSequenceFloat(val() As Single) As Single() _ 506*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceFloat 507*cdf0e10cSrcweir m_arFloat = val 508*cdf0e10cSrcweir Return val 509*cdf0e10cSrcweir End Function 510*cdf0e10cSrcweir 511*cdf0e10cSrcweir Public Overridable Function setSequenceDouble(val() As Double) As Double() _ 512*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceDouble 513*cdf0e10cSrcweir m_arDouble = val 514*cdf0e10cSrcweir Return val 515*cdf0e10cSrcweir End Function 516*cdf0e10cSrcweir 517*cdf0e10cSrcweir Public Overridable Function setSequenceEnum(val() As TestEnum) As TestEnum() _ 518*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceEnum 519*cdf0e10cSrcweir m_arEnum = val 520*cdf0e10cSrcweir Return val 521*cdf0e10cSrcweir End Function 522*cdf0e10cSrcweir 523*cdf0e10cSrcweir Public Overridable Function setSequenceUShort(val() As UInt16) As UInt16() _ 524*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceUShort 525*cdf0e10cSrcweir m_arUShort = val 526*cdf0e10cSrcweir Return val 527*cdf0e10cSrcweir End Function 528*cdf0e10cSrcweir 529*cdf0e10cSrcweir Public Overridable Function setSequenceULong(val() As UInt32) As UInt32() _ 530*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceULong 531*cdf0e10cSrcweir m_arULong = val 532*cdf0e10cSrcweir Return val 533*cdf0e10cSrcweir End Function 534*cdf0e10cSrcweir 535*cdf0e10cSrcweir Public Overridable Function setSequenceUHyper(val() As UInt64) As UInt64() _ 536*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceUHyper 537*cdf0e10cSrcweir m_arUHyper = val 538*cdf0e10cSrcweir Return val 539*cdf0e10cSrcweir End Function 540*cdf0e10cSrcweir 541*cdf0e10cSrcweir Public Overridable Function setSequenceXInterface(val() As Object ) As Object() _ 542*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceXInterface 543*cdf0e10cSrcweir m_arObject = val 544*cdf0e10cSrcweir Return val 545*cdf0e10cSrcweir End Function 546*cdf0e10cSrcweir 547*cdf0e10cSrcweir Public Overridable Function setSequenceString(val() As String) As String() _ 548*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceString 549*cdf0e10cSrcweir m_arString = val 550*cdf0e10cSrcweir Return val 551*cdf0e10cSrcweir End Function 552*cdf0e10cSrcweir 553*cdf0e10cSrcweir Public Overridable Function setSequenceStruct(val() As TestElement) As TestElement() _ 554*cdf0e10cSrcweir Implements XBridgeTest2.setSequenceStruct 555*cdf0e10cSrcweir m_testElements = val 556*cdf0e10cSrcweir Return val 557*cdf0e10cSrcweir End Function 558*cdf0e10cSrcweir 559*cdf0e10cSrcweir Public Overridable Sub setSequencesInOut( _ 560*cdf0e10cSrcweir ByRef aSeqBoolean() As Boolean, ByRef aSeqChar() As Char, _ 561*cdf0e10cSrcweir ByRef aSeqByte() As Byte, ByRef aSeqShort() As Short, _ 562*cdf0e10cSrcweir ByRef aSeqUShort() As UInt16, ByRef aSeqLong() As Integer, _ 563*cdf0e10cSrcweir ByRef aSeqULong() As UInt32, ByRef aSeqHyper() As Long, _ 564*cdf0e10cSrcweir ByRef aSeqUHyper() As UInt64, ByRef aSeqFloat() As Single, _ 565*cdf0e10cSrcweir ByRef aSeqDouble() As Double, ByRef aSeqTestEnum() As TestEnum, _ 566*cdf0e10cSrcweir ByRef aSeqString() As String, ByRef aSeqXInterface() As Object, _ 567*cdf0e10cSrcweir ByRef aSeqAny() As Any, ByRef aSeqDim2()() As Integer, _ 568*cdf0e10cSrcweir ByRef aSeqDim3()()() As Integer) _ 569*cdf0e10cSrcweir Implements XBridgeTest2.setSequencesInOut 570*cdf0e10cSrcweir 571*cdf0e10cSrcweir m_arBool = aSeqBoolean 572*cdf0e10cSrcweir m_arChar = aSeqChar 573*cdf0e10cSrcweir m_arByte = aSeqByte 574*cdf0e10cSrcweir m_arShort = aSeqShort 575*cdf0e10cSrcweir m_arUShort = aSeqUShort 576*cdf0e10cSrcweir m_arLong = aSeqLong 577*cdf0e10cSrcweir m_arULong = aSeqULong 578*cdf0e10cSrcweir m_arHyper = aSeqHyper 579*cdf0e10cSrcweir m_arUHyper = aSeqUHyper 580*cdf0e10cSrcweir m_arFloat = aSeqFloat 581*cdf0e10cSrcweir m_arDouble = aSeqDouble 582*cdf0e10cSrcweir m_arEnum = aSeqTestEnum 583*cdf0e10cSrcweir m_arString = aSeqString 584*cdf0e10cSrcweir m_arObject = aSeqXInterface 585*cdf0e10cSrcweir m_arAny = aSeqAny 586*cdf0e10cSrcweir m_arLong2 = aSeqDim2 587*cdf0e10cSrcweir m_arLong3 = aSeqDim3 588*cdf0e10cSrcweir End Sub 589*cdf0e10cSrcweir 590*cdf0e10cSrcweir Public Overridable Sub setSequencesOut( _ 591*cdf0e10cSrcweir ByRef aSeqBoolean() As Boolean, ByRef aSeqChar() As Char, _ 592*cdf0e10cSrcweir ByRef aSeqByte() As Byte, ByRef aSeqShort() As Short, _ 593*cdf0e10cSrcweir ByRef aSeqUShort() As UInt16, ByRef aSeqLong() As Integer, _ 594*cdf0e10cSrcweir ByRef aSeqULong() As UInt32, ByRef aSeqHyper() As Long, _ 595*cdf0e10cSrcweir ByRef aSeqUHyper() As UInt64, ByRef aSeqFloat() As Single, _ 596*cdf0e10cSrcweir ByRef aSeqDouble() As Double, ByRef aSeqTestEnum() As TestEnum, _ 597*cdf0e10cSrcweir ByRef aSeqString() As String, ByRef aSeqXInterface() As Object, _ 598*cdf0e10cSrcweir ByRef aSeqAny() As Any, ByRef aSeqDim2()() As Integer, _ 599*cdf0e10cSrcweir ByRef aSeqDim3()()() As Integer) _ 600*cdf0e10cSrcweir Implements XBridgeTest2.setSequencesOut 601*cdf0e10cSrcweir 602*cdf0e10cSrcweir aSeqBoolean = m_arBool 603*cdf0e10cSrcweir aSeqChar = m_arChar 604*cdf0e10cSrcweir aSeqByte = m_arByte 605*cdf0e10cSrcweir aSeqShort = m_arShort 606*cdf0e10cSrcweir aSeqUShort = m_arUShort 607*cdf0e10cSrcweir aSeqLong = m_arLong 608*cdf0e10cSrcweir aSeqULong = m_arULong 609*cdf0e10cSrcweir aSeqHyper = m_arHyper 610*cdf0e10cSrcweir aSeqUHyper = m_arUHyper 611*cdf0e10cSrcweir aSeqFloat = m_arFloat 612*cdf0e10cSrcweir aSeqDouble = m_arDouble 613*cdf0e10cSrcweir aSeqTestEnum = m_arEnum 614*cdf0e10cSrcweir aSeqString = m_arString 615*cdf0e10cSrcweir aSeqXInterface = m_arObject 616*cdf0e10cSrcweir aSeqAny = m_arAny 617*cdf0e10cSrcweir aSeqDim2 = m_arLong2 618*cdf0e10cSrcweir aSeqDim3 = m_arLong3 619*cdf0e10cSrcweir 620*cdf0e10cSrcweir End Sub 621*cdf0e10cSrcweir 622*cdf0e10cSrcweirEnd Class 623*cdf0e10cSrcweir 624*cdf0e10cSrcweirEnd Namespace 625