summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2012-04-25 11:19:13 +0200
committerBenoit Foucher <benoit@zeroc.com>2012-04-25 11:19:13 +0200
commit7e874613ff22bedf988273b51a15ab937f01169f (patch)
tree115a92a902f80fcc6252c5fac6a957ecc548b82c
parentFixed copyrights (diff)
downloadice-7e874613ff22bedf988273b51a15ab937f01169f.tar.bz2
ice-7e874613ff22bedf988273b51a15ab937f01169f.tar.xz
ice-7e874613ff22bedf988273b51a15ab937f01169f.zip
Merged Silverlight support
-rw-r--r--cs/INSTALL.SILVERLIGHT81
-rw-r--r--cs/Makefile.mak6
-rwxr-xr-xcs/allTests.py30
-rw-r--r--cs/bin/sl/.gitignore1
-rw-r--r--cs/config/Make.rules.mak.cs39
-rw-r--r--cs/config/PolicyResponse.xml13
-rw-r--r--cs/demo/Glacier2/sl/README.txt26
-rw-r--r--cs/demo/Glacier2/sl/chat.Web/Properties/AssemblyInfo.cs35
-rw-r--r--cs/demo/Glacier2/sl/chat.Web/Silverlight.js2
-rw-r--r--cs/demo/Glacier2/sl/chat.Web/Web.Debug.config30
-rw-r--r--cs/demo/Glacier2/sl/chat.Web/Web.Release.config31
-rw-r--r--cs/demo/Glacier2/sl/chat.Web/Web.config13
-rw-r--r--cs/demo/Glacier2/sl/chat.Web/chat.Web.csproj99
-rw-r--r--cs/demo/Glacier2/sl/chat.Web/chatTestPage.aspx74
-rw-r--r--cs/demo/Glacier2/sl/chat.Web/chatTestPage.html73
-rw-r--r--cs/demo/Glacier2/sl/chat/.gitignore3
-rw-r--r--cs/demo/Glacier2/sl/chat/App.xaml8
-rw-r--r--cs/demo/Glacier2/sl/chat/App.xaml.cs79
-rw-r--r--cs/demo/Glacier2/sl/chat/Chat.ice28
-rw-r--r--cs/demo/Glacier2/sl/chat/ChatPage.xaml44
-rw-r--r--cs/demo/Glacier2/sl/chat/ChatPage.xaml.cs68
-rw-r--r--cs/demo/Glacier2/sl/chat/ConnectingPage.xaml13
-rw-r--r--cs/demo/Glacier2/sl/chat/ConnectingPage.xaml.cs32
-rw-r--r--cs/demo/Glacier2/sl/chat/Coordinator.cs203
-rw-r--r--cs/demo/Glacier2/sl/chat/DisconnectingPage.xaml13
-rw-r--r--cs/demo/Glacier2/sl/chat/DisconnectingPage.xaml.cs32
-rw-r--r--cs/demo/Glacier2/sl/chat/LoginPage.xaml25
-rw-r--r--cs/demo/Glacier2/sl/chat/LoginPage.xaml.cs73
-rw-r--r--cs/demo/Glacier2/sl/chat/MainPage.xaml14
-rw-r--r--cs/demo/Glacier2/sl/chat/MainPage.xaml.cs100
-rw-r--r--cs/demo/Glacier2/sl/chat/Properties/AppManifest.xml6
-rw-r--r--cs/demo/Glacier2/sl/chat/Properties/AssemblyInfo.cs35
-rw-r--r--cs/demo/Glacier2/sl/chat/bin/AppManifest.xaml8
-rw-r--r--cs/demo/Glacier2/sl/chat/bin/Glacier2.xml2110
-rw-r--r--cs/demo/Glacier2/sl/chat/bin/Ice.xml5815
-rw-r--r--cs/demo/Glacier2/sl/chat/bin/System.Windows.Controls.Navigation.xml420
-rw-r--r--cs/demo/Glacier2/sl/chat/bin/chat.xapbin0 -> 259022 bytes
-rw-r--r--cs/demo/Glacier2/sl/chat/bin/chatTestPage.html73
-rw-r--r--cs/demo/Glacier2/sl/chat/chat.csproj145
-rw-r--r--cs/demo/Ice/compact/Program.cs19
-rw-r--r--cs/demo/Ice/compact/bidir/Callback.ice30
-rw-r--r--cs/demo/Ice/compact/bidir/CallbackSenderI.cs110
-rw-r--r--cs/demo/Ice/compact/bidir/MainForm.Designer.cs107
-rw-r--r--cs/demo/Ice/compact/bidir/MainForm.cs103
-rw-r--r--cs/demo/Ice/compact/bidir/MainForm.resx (renamed from cs/demo/Ice/compact/MainForm.resx)0
-rw-r--r--cs/demo/Ice/compact/bidir/Program.cs28
-rw-r--r--cs/demo/Ice/compact/bidir/README.txt58
-rw-r--r--cs/demo/Ice/compact/bidir/server.csproj99
-rw-r--r--cs/demo/Ice/compact/hello/Hello.ice (renamed from cs/demo/Ice/compact/Hello.ice)0
-rw-r--r--cs/demo/Ice/compact/hello/MainForm.Designer.cs (renamed from cs/demo/Ice/compact/MainForm.Designer.cs)0
-rw-r--r--cs/demo/Ice/compact/hello/MainForm.cs (renamed from cs/demo/Ice/compact/MainForm.cs)0
-rw-r--r--cs/demo/Ice/compact/hello/MainForm.resx (renamed from vsaddin/src/IceSilverlightConfigurationDialog.resx)8
-rw-r--r--cs/demo/Ice/compact/hello/Program.cs28
-rw-r--r--cs/demo/Ice/compact/hello/README.txt (renamed from cs/demo/Ice/compact/README)2
-rw-r--r--cs/demo/Ice/compact/hello/client.csproj (renamed from cs/demo/Ice/compact/Ice.compact.client.csproj)10
-rw-r--r--cs/demo/Ice/sl/bidir/README.txt40
-rw-r--r--cs/demo/Ice/sl/bidir/bidir.Web/Properties/AssemblyInfo.cs35
-rw-r--r--cs/demo/Ice/sl/bidir/bidir.Web/Silverlight.js2
-rw-r--r--cs/demo/Ice/sl/bidir/bidir.Web/Web.Debug.config30
-rw-r--r--cs/demo/Ice/sl/bidir/bidir.Web/Web.Release.config31
-rw-r--r--cs/demo/Ice/sl/bidir/bidir.Web/Web.config13
-rw-r--r--cs/demo/Ice/sl/bidir/bidir.Web/bidir.Web.csproj99
-rw-r--r--cs/demo/Ice/sl/bidir/bidir.Web/bidirTestPage.aspx74
-rw-r--r--cs/demo/Ice/sl/bidir/bidir.Web/bidirTestPage.html73
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/.gitignore3
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/App.xaml8
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/App.xaml.cs77
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/Callback.ice27
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/CallbackReceiverI.cs38
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/MainPage.xaml30
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/MainPage.xaml.cs138
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/Properties/AppManifest.xml6
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/Properties/AssemblyInfo.cs35
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/demo/Ice/sl/bidir/bidir/bidir.csproj118
-rw-r--r--cs/demo/Ice/sl/hello/README.txt23
-rw-r--r--cs/demo/Ice/sl/hello/hello.Web/Properties/AssemblyInfo.cs35
-rw-r--r--cs/demo/Ice/sl/hello/hello.Web/Silverlight.js2
-rw-r--r--cs/demo/Ice/sl/hello/hello.Web/Web.Debug.config30
-rw-r--r--cs/demo/Ice/sl/hello/hello.Web/Web.Release.config31
-rw-r--r--cs/demo/Ice/sl/hello/hello.Web/Web.config13
-rw-r--r--cs/demo/Ice/sl/hello/hello.Web/hello.Web.csproj101
-rw-r--r--cs/demo/Ice/sl/hello/hello.Web/helloTestPage.aspx74
-rw-r--r--cs/demo/Ice/sl/hello/hello.Web/helloTestPage.html73
-rw-r--r--cs/demo/Ice/sl/hello/hello.sln26
-rw-r--r--cs/demo/Ice/sl/hello/hello/.gitignore3
-rw-r--r--cs/demo/Ice/sl/hello/hello/App.xaml8
-rw-r--r--cs/demo/Ice/sl/hello/hello/App.xaml.cs76
-rw-r--r--cs/demo/Ice/sl/hello/hello/Hello.ice21
-rw-r--r--cs/demo/Ice/sl/hello/hello/MainPage.xaml56
-rw-r--r--cs/demo/Ice/sl/hello/hello/MainPage.xaml.cs180
-rw-r--r--cs/demo/Ice/sl/hello/hello/Properties/AppManifest.xml6
-rw-r--r--cs/demo/Ice/sl/hello/hello/Properties/AssemblyInfo.cs35
-rw-r--r--cs/demo/Ice/sl/hello/hello/hello.csproj114
-rwxr-xr-xcs/demo/democf.sln18
-rw-r--r--cs/demo/demosl.sln73
-rw-r--r--cs/src/Glacier2/Application.cs3
-rw-r--r--cs/src/Glacier2/SessionHelper.cs6
-rw-r--r--cs/src/Ice/Application.cs3
-rw-r--r--cs/src/Ice/Arrays.cs58
-rw-r--r--cs/src/Ice/AssemblyUtil.cs29
-rw-r--r--cs/src/Ice/AsyncIOThread.cs11
-rw-r--r--cs/src/Ice/BasicStream.cs136
-rw-r--r--cs/src/Ice/ByteBuffer.cs42
-rw-r--r--cs/src/Ice/ConnectionFactory.cs8
-rw-r--r--cs/src/Ice/ConnectionI.cs2
-rw-r--r--cs/src/Ice/EndpointFactoryManager.cs6
-rw-r--r--cs/src/Ice/EndpointHostResolver.cs4
-rw-r--r--cs/src/Ice/EndpointI.cs2
-rw-r--r--cs/src/Ice/EventHandler.cs1
-rw-r--r--cs/src/Ice/ImplicitContextI.cs72
-rw-r--r--cs/src/Ice/Instance.cs63
-rw-r--r--cs/src/Ice/LinkedList.cs304
-rw-r--r--cs/src/Ice/LocatorInfo.cs53
-rw-r--r--cs/src/Ice/LoggerI.cs23
-rw-r--r--cs/src/Ice/Makefile1
-rw-r--r--cs/src/Ice/Makefile.mak1
-rw-r--r--cs/src/Ice/Monitor.cs150
-rw-r--r--cs/src/Ice/Network.cs496
-rw-r--r--cs/src/Ice/Object.cs2
-rw-r--r--cs/src/Ice/ObjectFactoryManager.cs20
-rw-r--r--cs/src/Ice/Options.cs6
-rw-r--r--cs/src/Ice/OutgoingAsync.cs4
-rw-r--r--cs/src/Ice/OutputBase.cs10
-rw-r--r--cs/src/Ice/PluginManagerI.cs2
-rw-r--r--cs/src/Ice/PropertiesI.cs111
-rw-r--r--cs/src/Ice/ProtocolPluginFacade.cs5
-rw-r--r--cs/src/Ice/Reference.cs77
-rw-r--r--cs/src/Ice/ReferenceFactory.cs24
-rw-r--r--cs/src/Ice/SliceChecksums.cs2
-rw-r--r--cs/src/Ice/SysLoggerI.cs6
-rw-r--r--cs/src/Ice/TcpAcceptor.cs22
-rw-r--r--cs/src/Ice/TcpConnector.cs19
-rw-r--r--cs/src/Ice/TcpEndpointI.cs14
-rw-r--r--cs/src/Ice/TcpTransceiver.cs211
-rw-r--r--cs/src/Ice/ThreadPool.cs37
-rw-r--r--cs/src/Ice/Time.cs17
-rw-r--r--cs/src/Ice/Timer.cs53
-rw-r--r--cs/src/Ice/UdpConnector.cs14
-rw-r--r--cs/src/Ice/UdpEndpointI.cs11
-rw-r--r--cs/src/Ice/UdpTransceiver.cs261
-rw-r--r--cs/src/Ice/Util.cs12
-rw-r--r--cs/src/Ice/ValueWriter.cs15
-rw-r--r--cs/src/IceSSL/AcceptorI.cs12
-rw-r--r--cs/src/IceSSL/ConnectorI.cs2
-rw-r--r--cs/src/IceSSL/EndpointI.cs6
-rw-r--r--cs/src/IceSSL/TransceiverI.cs52
-rw-r--r--cs/src/Makefile.mak8
-rw-r--r--cs/src/PolicyServer/AssemblyInfo.cs45
-rw-r--r--cs/src/PolicyServer/Makefile.mak39
-rw-r--r--cs/src/PolicyServer/PolicyServer.cs127
-rw-r--r--cs/test/Ice/adapterDeactivation/AllTests.cs155
-rw-r--r--cs/test/Ice/adapterDeactivation/App.xaml7
-rw-r--r--cs/test/Ice/adapterDeactivation/App.xaml.cs81
-rw-r--r--cs/test/Ice/adapterDeactivation/Makefile4
-rw-r--r--cs/test/Ice/adapterDeactivation/Makefile.mak4
-rw-r--r--cs/test/Ice/adapterDeactivation/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/adapterDeactivation/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/adapterDeactivation/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/adapterDeactivation/adapterDeactivation.csproj114
-rw-r--r--cs/test/Ice/ami/AllTests.cs126
-rw-r--r--cs/test/Ice/ami/App.xaml8
-rw-r--r--cs/test/Ice/ami/App.xaml.cs80
-rw-r--r--cs/test/Ice/ami/Makefile2
-rw-r--r--cs/test/Ice/ami/Makefile.mak2
-rw-r--r--cs/test/Ice/ami/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/ami/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/ami/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/ami/ami.csproj115
-rw-r--r--cs/test/Ice/background/Acceptor.cs2
-rw-r--r--cs/test/Ice/background/Transceiver.cs4
-rw-r--r--cs/test/Ice/binding/AllTests.cs277
-rw-r--r--cs/test/Ice/binding/App.xaml8
-rw-r--r--cs/test/Ice/binding/App.xaml.cs81
-rw-r--r--cs/test/Ice/binding/Client.cs2
-rw-r--r--cs/test/Ice/binding/Makefile2
-rw-r--r--cs/test/Ice/binding/Makefile.mak2
-rw-r--r--cs/test/Ice/binding/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/binding/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/binding/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/binding/binding.csproj115
-rw-r--r--cs/test/Ice/defaultServant/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/defaultServant/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/defaultServant/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/defaultValue/AllTests.cs38
-rw-r--r--cs/test/Ice/defaultValue/App.xaml8
-rw-r--r--cs/test/Ice/defaultValue/App.xaml.cs73
-rw-r--r--cs/test/Ice/defaultValue/Makefile3
-rw-r--r--cs/test/Ice/defaultValue/Makefile.mak3
-rw-r--r--cs/test/Ice/defaultValue/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/defaultValue/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/defaultValue/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/defaultValue/defaultValue.csproj115
-rw-r--r--cs/test/Ice/dictMapping/AllTests.cs49
-rw-r--r--cs/test/Ice/dictMapping/App.xaml8
-rw-r--r--cs/test/Ice/dictMapping/App.xaml.cs81
-rw-r--r--cs/test/Ice/dictMapping/Makefile5
-rw-r--r--cs/test/Ice/dictMapping/Makefile.mak4
-rw-r--r--cs/test/Ice/dictMapping/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/dictMapping/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/dictMapping/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/dictMapping/dictMapping.csproj118
-rw-r--r--cs/test/Ice/dispatcher/AllTests.cs46
-rw-r--r--cs/test/Ice/dispatcher/App.xaml8
-rw-r--r--cs/test/Ice/dispatcher/App.xaml.cs81
-rw-r--r--cs/test/Ice/dispatcher/Makefile2
-rw-r--r--cs/test/Ice/dispatcher/Makefile.mak2
-rw-r--r--cs/test/Ice/dispatcher/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/dispatcher/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/dispatcher/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/dispatcher/dispatcher.csproj116
-rw-r--r--cs/test/Ice/exceptions/AllTests.cs335
-rw-r--r--cs/test/Ice/exceptions/App.xaml8
-rw-r--r--cs/test/Ice/exceptions/App.xaml.cs81
-rw-r--r--cs/test/Ice/exceptions/Makefile5
-rw-r--r--cs/test/Ice/exceptions/Makefile.mak4
-rw-r--r--cs/test/Ice/exceptions/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/exceptions/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/exceptions/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/exceptions/exceptions.csproj116
-rw-r--r--cs/test/Ice/facets/AllTests.cs104
-rw-r--r--cs/test/Ice/facets/App.xaml8
-rw-r--r--cs/test/Ice/facets/App.xaml.cs82
-rw-r--r--cs/test/Ice/facets/Makefile5
-rw-r--r--cs/test/Ice/facets/Makefile.mak4
-rw-r--r--cs/test/Ice/facets/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/facets/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/facets/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/facets/facets.csproj115
-rw-r--r--cs/test/Ice/faultTolerance/AllTests.cs133
-rw-r--r--cs/test/Ice/faultTolerance/App.xaml8
-rw-r--r--cs/test/Ice/faultTolerance/App.xaml.cs81
-rw-r--r--cs/test/Ice/faultTolerance/Client.cs2
-rw-r--r--cs/test/Ice/faultTolerance/Makefile2
-rw-r--r--cs/test/Ice/faultTolerance/Makefile.mak2
-rw-r--r--cs/test/Ice/faultTolerance/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/faultTolerance/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/faultTolerance/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/faultTolerance/faultTolerance.csproj115
-rw-r--r--cs/test/Ice/hold/AllTests.cs71
-rw-r--r--cs/test/Ice/hold/App.xaml8
-rw-r--r--cs/test/Ice/hold/App.xaml.cs81
-rw-r--r--cs/test/Ice/hold/Makefile2
-rw-r--r--cs/test/Ice/hold/Makefile.mak2
-rw-r--r--cs/test/Ice/hold/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/hold/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/hold/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/hold/hold.csproj115
-rw-r--r--cs/test/Ice/info/AllTests.cs79
-rw-r--r--cs/test/Ice/info/App.xaml8
-rw-r--r--cs/test/Ice/info/App.xaml.cs81
-rw-r--r--cs/test/Ice/info/Makefile2
-rw-r--r--cs/test/Ice/info/Makefile.mak2
-rw-r--r--cs/test/Ice/info/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/info/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/info/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/info/info.csproj115
-rw-r--r--cs/test/Ice/inheritance/AllTests.cs78
-rw-r--r--cs/test/Ice/inheritance/App.xaml8
-rw-r--r--cs/test/Ice/inheritance/App.xaml.cs82
-rw-r--r--cs/test/Ice/inheritance/Makefile5
-rw-r--r--cs/test/Ice/inheritance/Makefile.mak4
-rw-r--r--cs/test/Ice/inheritance/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/inheritance/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/inheritance/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/inheritance/inheritance.csproj115
-rw-r--r--cs/test/Ice/invoke/AllTests.cs46
-rw-r--r--cs/test/Ice/invoke/App.xaml8
-rw-r--r--cs/test/Ice/invoke/App.xaml.cs81
-rw-r--r--cs/test/Ice/invoke/Makefile2
-rw-r--r--cs/test/Ice/invoke/Makefile.mak2
-rw-r--r--cs/test/Ice/invoke/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/invoke/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/invoke/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/invoke/invoke.csproj115
-rw-r--r--cs/test/Ice/location/AllTests.cs162
-rw-r--r--cs/test/Ice/location/App.xaml8
-rw-r--r--cs/test/Ice/location/App.xaml.cs81
-rw-r--r--cs/test/Ice/location/Makefile2
-rw-r--r--cs/test/Ice/location/Makefile.mak2
-rw-r--r--cs/test/Ice/location/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/location/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/location/Properties/InBrowserSettings.xml5
-rw-r--r--cs/test/Ice/location/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/location/location.csproj120
-rw-r--r--cs/test/Ice/objects/AllTests.cs174
-rw-r--r--cs/test/Ice/objects/App.xaml8
-rw-r--r--cs/test/Ice/objects/App.xaml.cs81
-rw-r--r--cs/test/Ice/objects/Client.cs57
-rw-r--r--cs/test/Ice/objects/Makefile4
-rw-r--r--cs/test/Ice/objects/Makefile.mak4
-rw-r--r--cs/test/Ice/objects/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/objects/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/objects/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/objects/objects.csproj123
-rw-r--r--cs/test/Ice/operations/AllTests.cs85
-rw-r--r--cs/test/Ice/operations/App.xaml8
-rw-r--r--cs/test/Ice/operations/App.xaml.cs81
-rw-r--r--cs/test/Ice/operations/Makefile2
-rw-r--r--cs/test/Ice/operations/Makefile.mak4
-rw-r--r--cs/test/Ice/operations/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/operations/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/operations/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/operations/operations.csproj122
-rw-r--r--cs/test/Ice/proxy/AllTests.cs88
-rw-r--r--cs/test/Ice/proxy/App.xaml8
-rw-r--r--cs/test/Ice/proxy/App.xaml.cs81
-rw-r--r--cs/test/Ice/proxy/Makefile4
-rw-r--r--cs/test/Ice/proxy/Makefile.mak4
-rw-r--r--cs/test/Ice/proxy/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/proxy/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/proxy/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/proxy/proxy.csproj115
-rw-r--r--cs/test/Ice/retry/AllTests.cs68
-rw-r--r--cs/test/Ice/retry/App.xaml8
-rw-r--r--cs/test/Ice/retry/App.xaml.cs81
-rw-r--r--cs/test/Ice/retry/Makefile2
-rw-r--r--cs/test/Ice/retry/Makefile.mak2
-rw-r--r--cs/test/Ice/retry/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/retry/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/retry/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/retry/retry.csproj115
-rw-r--r--cs/test/Ice/seqMapping/AllTests.cs49
-rw-r--r--cs/test/Ice/seqMapping/App.xaml8
-rw-r--r--cs/test/Ice/seqMapping/App.xaml.cs81
-rw-r--r--cs/test/Ice/seqMapping/Makefile5
-rw-r--r--cs/test/Ice/seqMapping/Makefile.mak4
-rw-r--r--cs/test/Ice/seqMapping/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/seqMapping/Properties/AssemblyInfo.cs35
-rw-r--r--cs/test/Ice/seqMapping/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/seqMapping/Serializable.cs3
-rw-r--r--cs/test/Ice/seqMapping/Test.ice8
-rw-r--r--cs/test/Ice/seqMapping/Twoways.cs10
-rw-r--r--cs/test/Ice/seqMapping/TwowaysAMI.cs12
-rw-r--r--cs/test/Ice/seqMapping/TwowaysNewAMI.cs12
-rw-r--r--cs/test/Ice/seqMapping/seqMapping.csproj120
-rw-r--r--cs/test/Ice/servantLocator/AllTests.cs91
-rw-r--r--cs/test/Ice/servantLocator/App.xaml8
-rw-r--r--cs/test/Ice/servantLocator/App.xaml.cs81
-rw-r--r--cs/test/Ice/servantLocator/Makefile5
-rw-r--r--cs/test/Ice/servantLocator/Makefile.mak4
-rw-r--r--cs/test/Ice/servantLocator/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/servantLocator/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/servantLocator/Properties/InBrowserSettings.xml5
-rw-r--r--cs/test/Ice/servantLocator/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/servantLocator/servantLocator.csproj120
-rw-r--r--cs/test/Ice/slicing/exceptions/AllTests.cs202
-rw-r--r--cs/test/Ice/slicing/exceptions/App.xaml8
-rw-r--r--cs/test/Ice/slicing/exceptions/App.xaml.cs81
-rw-r--r--cs/test/Ice/slicing/exceptions/Makefile2
-rw-r--r--cs/test/Ice/slicing/exceptions/Makefile.mak2
-rw-r--r--cs/test/Ice/slicing/exceptions/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/slicing/exceptions/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/slicing/exceptions/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/slicing/exceptions/exceptions.csproj115
-rw-r--r--cs/test/Ice/slicing/objects/AllTests.cs381
-rw-r--r--cs/test/Ice/slicing/objects/App.xaml8
-rw-r--r--cs/test/Ice/slicing/objects/App.xaml.cs81
-rw-r--r--cs/test/Ice/slicing/objects/Makefile2
-rw-r--r--cs/test/Ice/slicing/objects/Makefile.mak2
-rw-r--r--cs/test/Ice/slicing/objects/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/slicing/objects/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/slicing/objects/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/slicing/objects/objects.csproj119
-rw-r--r--cs/test/Ice/stream/AllTests.cs1433
-rw-r--r--cs/test/Ice/stream/App.xaml8
-rw-r--r--cs/test/Ice/stream/App.xaml.cs81
-rw-r--r--cs/test/Ice/stream/Client.cs1408
-rw-r--r--cs/test/Ice/stream/Makefile2
-rw-r--r--cs/test/Ice/stream/Makefile.mak2
-rw-r--r--cs/test/Ice/stream/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/stream/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/stream/Properties/InBrowserSettings.xml5
-rw-r--r--cs/test/Ice/stream/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/stream/Test.ice11
-rw-r--r--cs/test/Ice/stream/stream.csproj120
-rw-r--r--cs/test/Ice/timeout/AllTests.cs94
-rw-r--r--cs/test/Ice/timeout/App.xaml8
-rw-r--r--cs/test/Ice/timeout/App.xaml.cs81
-rw-r--r--cs/test/Ice/timeout/Makefile2
-rw-r--r--cs/test/Ice/timeout/Makefile.mak2
-rw-r--r--cs/test/Ice/timeout/Properties/AppManifest.xml6
-rw-r--r--cs/test/Ice/timeout/Properties/AssemblyInfo.cs44
-rw-r--r--cs/test/Ice/timeout/Properties/OutOfBrowserSettings.xml10
-rw-r--r--cs/test/Ice/timeout/timeout.csproj115
-rw-r--r--cs/test/TestCommon/Properties/AssemblyInfo.cs37
-rw-r--r--cs/test/TestCommon/TestApp.cs142
-rw-r--r--cs/test/TestCommon/TestCommon.csproj78
-rw-r--r--cs/test/testsl.sln195
-rwxr-xr-xscripts/TestUtil.py68
-rw-r--r--vsaddin/src/Builder.cs114
-rw-r--r--vsaddin/src/Connect.cs8
-rw-r--r--vsaddin/src/ExtraCompilerOptionsView.cs15
-rwxr-xr-xvsaddin/src/IceCsharpConfigurationDialog.cs85
-rw-r--r--vsaddin/src/IceSilverlightConfigurationDialog.Designer.cs208
-rw-r--r--vsaddin/src/IceSilverlightConfigurationDialog.cs395
-rw-r--r--vsaddin/src/Util.cs74
-rwxr-xr-xvsaddin/src/addin-vs2008.csproj11
-rwxr-xr-xvsaddin/src/addin-vs2010.csproj9
399 files changed, 24260 insertions, 4760 deletions
diff --git a/cs/INSTALL.SILVERLIGHT b/cs/INSTALL.SILVERLIGHT
new file mode 100644
index 00000000000..c661aee00c4
--- /dev/null
+++ b/cs/INSTALL.SILVERLIGHT
@@ -0,0 +1,81 @@
+Build instructions
+------------------
+
+Ice for Silverlight has been built and tested with:
+
+- Microsoft Visual Studio 2010 SP1 and Silverlight 5.0
+
+
+Unpack the archive. The .NET sources will be contained in the
+Ice-@ver@\cs subdirectory.
+
+You will need the Slice to C# translator and supporting executables
+and libraries from Ice for C++. You can download a binary distribution
+from the ZeroC web site, or you can build Ice for C++ yourself.
+
+Binary distributions for the supported platforms are available at
+
+ http://www.zeroc.com/download.html
+
+Follow these steps to build the source:
+
+1) If you have not built Ice for C++ in the "cpp" subdirectory, set
+ ICE_HOME to the directory of your Ice for C++ installation.
+ For example:
+
+ > set ICE_HOME=C:\Ice-@ver@
+
+2) Change to the "cs" subdirectory of the Ice source distribution:
+
+ > cd Ice-@ver@\cs
+
+3) Open config\Make.rules.mak.cs and review the comments that describe
+ the settings you can modify. For example, you may wish to enable
+ optimization.
+
+ You must define SILVERLIGHT=yes to build the Silverlight Ice
+ assembly.
+
+4) Run nmake:
+
+ > nmake /f Makefile.mak
+
+To build the tests and demos you must use the Visual Studio solutions
+located in test\testsl.sln and demo\demosl.sln. Note that the projects
+require the Ice Visual Studio Add-In. The add-in is installed automatically
+when you use the Ice installer, or you can install the add-in manually by
+following the instructions in ..\vsaddin\INSTALL.txt.
+
+Installation
+------------
+
+Simply run "nmake /f Makefile.mak install". This will install Ice for
+.NET in the directory specified by the "prefix" variable in
+config\Make.rules.mak.cs. The Ice Silverlight assemblies will be
+located in <prefix>\bin\sl
+
+Running the tests
+-----------------
+
+Silverlight has no server side support, you must use a server from
+another language mapping:
+
+To run a test, open a command window and change to the test
+directory. At the command prompt, execute:
+
+ > server
+
+Open test\testsl.sln in Visual Studio and start the corresponding
+test, using the "Debug > Start new instance" command. In the test
+application, click "Run"
+
+If everything worked out, you should see lots of "ok" messages. In
+case of a failure, the tests abort with "failed".
+
+
+Running the demos
+-----------------
+
+To run the demos, open demo\demosl.sln Solution and follow the
+instructions in the REAME.txt files of each demo.
+
diff --git a/cs/Makefile.mak b/cs/Makefile.mak
index 2af544408d7..502a5d15876 100644
--- a/cs/Makefile.mak
+++ b/cs/Makefile.mak
@@ -11,7 +11,11 @@ top_srcdir = .
!include $(top_srcdir)/config/Make.rules.mak.cs
-SUBDIRS = src test demo
+SUBDIRS = src
+
+!if "$(SILVERLIGHT)" != "yes"
+SUBDIRS = $(SUBDIRS) test demo
+!endif
install:: install-common
@if not exist "$(install_bindir)" \
diff --git a/cs/allTests.py b/cs/allTests.py
index fc5e041ade3..c2284249681 100755
--- a/cs/allTests.py
+++ b/cs/allTests.py
@@ -25,11 +25,11 @@ import TestUtil
# List of all basic tests.
#
tests = [
- ("Slice/keyword", ["once"]),
- ("Slice/structure", ["once"]),
- ("IceUtil/inputUtil", ["once"]),
+ ("Slice/keyword", ["once", "nosilverlight"]),
+ ("Slice/structure", ["once", "nosilverlight"]),
+ ("IceUtil/inputUtil", ["once", "nosilverlight"]),
("Ice/proxy", ["core"]),
- ("Ice/properties", ["once"]),
+ ("Ice/properties", ["once", "nosilverlight"]),
("Ice/operations", ["core"]),
("Ice/exceptions", ["core"]),
("Ice/ami", ["core"]),
@@ -44,26 +44,26 @@ tests = [
("Ice/adapterDeactivation", ["core"]),
("Ice/slicing/exceptions", ["core"]),
("Ice/slicing/objects", ["core"]),
- ("Ice/checksum", ["core", "nocompact"]),
+ ("Ice/checksum", ["core", "nocompact", "nosilverlight"]),
("Ice/dispatcher", ["core"]),
("Ice/stream", ["core"]),
("Ice/retry", ["core"]),
("Ice/timeout", ["core"]),
("Ice/servantLocator", ["core"]),
- ("Ice/interceptor", ["core"]),
+ ("Ice/interceptor", ["core", "nosilverlight"]),
("Ice/dictMapping", ["core"]),
("Ice/seqMapping", ["core"]),
- ("Ice/background", ["core"]),
- ("Ice/udp", ["core"]),
- ("Ice/defaultServant", ["core"]),
+ ("Ice/background", ["core", "nosilverlight"]),
+ ("Ice/udp", ["core", "nosilverlight"]),
+ ("Ice/defaultServant", ["core", "nosilverlight"]),
("Ice/defaultValue", ["core"]),
- ("Ice/threadPoolPriority", ["core", "nomono"]),
+ ("Ice/threadPoolPriority", ["core", "nomono", "nosilverlight"]),
("Ice/invoke", ["core"]),
- ("IceBox/configuration", ["core", "noipv6"]),
- ("Glacier2/router", ["service"]),
- ("Glacier2/sessionHelper", ["service"]),
- ("IceGrid/simple", ["service"]),
- ("IceSSL/configuration", ["once", "novista", "nomono", "nocompact"]),
+ ("IceBox/configuration", ["core", "noipv6", "nosilverlight"]),
+ ("Glacier2/router", ["service", "nosilverlight"]),
+ ("Glacier2/sessionHelper", ["service", "nosilverlight"]),
+ ("IceGrid/simple", ["service", "nosilverlight"]),
+ ("IceSSL/configuration", ["once", "novista", "nomono", "nocompact", "nosilverlight"]),
]
if __name__ == "__main__":
diff --git a/cs/bin/sl/.gitignore b/cs/bin/sl/.gitignore
new file mode 100644
index 00000000000..39af5887579
--- /dev/null
+++ b/cs/bin/sl/.gitignore
@@ -0,0 +1 @@
+# Dummy file, so that git retains this otherwise empty directory.
diff --git a/cs/config/Make.rules.mak.cs b/cs/config/Make.rules.mak.cs
index 1517570ec3c..34c51e33cb5 100644
--- a/cs/config/Make.rules.mak.cs
+++ b/cs/config/Make.rules.mak.cs
@@ -42,6 +42,24 @@ prefix = C:\Ice-$(VERSION)
#COMPACT = yes
#
+# Enable support for Silverlight.This setting disables the following
+# features:
+#
+# - Protocol compression
+# - Ice.Application and Glacier2.Application classes
+# - Dynamic loading of Slice-generated class and exception factories
+# - IceSSL
+# - ICE_CONFIG environment variable
+# - Dynamic loading of Slice checksums
+# - Thread priorities
+# - Ice.StdOut and Ice.StdErr
+# - Ice.PrintProcessId
+# - Ice.LogFile
+# - Load properties for Windows registry
+#
+#SILVERLIGHT = yes
+
+#
# Define DEBUG as yes if you want to build with debug information and
# assertions enabled.
#
@@ -52,7 +70,7 @@ DEBUG = yes
# Define OPTIMIZE as yes if you want to build with optimization.
#
-OPTIMIZE = yes
+#OPTIMIZE = yes
#
# Define FRAMEWORK as 3.5 to force a .NET 3.5 build with Visual Studio 2010.
@@ -126,15 +144,26 @@ MCSFLAGS = $(MCSFLAGS) /reference:"$(FRAMEWORKDIR)\v2.0.50727\System.Data.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(PROGRAMFILES)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll"
MCSFLAGS = $(MCSFLAGS) /reference:"$(PROGRAMFILES)\Reference Assemblies\Microsoft\Framework\v3.0\System.Runtime.Serialization.dll"
!elseif "$(COMPACT)" == "yes"
-!if "$(PROCESSOR_ARCHITECTURE)" == "AMD64" || "$(PROCESSOR_ARCHITECTUREW6432)" == "AMD64"
-NETCF_HOME = $(PROGRAMFILES) (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE
-!else
NETCF_HOME = $(PROGRAMFILES)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE
-!endif
NETCF_REFS = "/r:$(NETCF_HOME)\mscorlib.dll" \
"/r:$(NETCF_HOME)\System.dll" \
"/r:$(NETCF_HOME)\System.Runtime.Serialization.dll"
MCSFLAGS = $(MCSFLAGS) -noconfig -nostdlib -define:COMPACT $(NETCF_REFS)
+!elseif "$(SILVERLIGHT)" == "yes"
+!if "$(SILVERLIGHT_VERSION)" == ""
+SILVERLIGHT_VERSION = 5.0.61118.0
+!endif
+SILVERLIGHT_HOME = $(PROGRAMFILES)\Microsoft Silverlight\$(SILVERLIGHT_VERSION)
+
+SILVERLIGHT_REFS = "/r:$(SILVERLIGHT_HOME)\mscorlib.dll" \
+ "/r:$(SILVERLIGHT_HOME)\System.Core.dll" \
+ "/r:$(SILVERLIGHT_HOME)\system.dll" \
+ "/r:$(SILVERLIGHT_HOME)\System.Windows.dll" \
+ "/r:$(SILVERLIGHT_HOME)\System.Net.dll" \
+ "/r:$(SILVERLIGHT_HOME)\System.Windows.Browser.dll"
+MCSFLAGS = $(MCSFLAGS) -noconfig -nostdlib -define:SILVERLIGHT $(SILVERLIGHT_REFS)
+bindir = $(top_srcdir)\bin\sl
+install_bindir = $(prefix)\bin\sl
!endif
!if "$(ice_src_dist)" != ""
diff --git a/cs/config/PolicyResponse.xml b/cs/config/PolicyResponse.xml
new file mode 100644
index 00000000000..1b7867e93fa
--- /dev/null
+++ b/cs/config/PolicyResponse.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding ="utf-8"?>
+<access-policy>
+ <cross-domain-access>
+ <policy>
+ <allow-from>
+ <domain uri="*" />
+ </allow-from>
+ <grant-to>
+ <socket-resource port="4502-4506" protocol="tcp" />
+ </grant-to>
+ </policy>
+ </cross-domain-access>
+</access-policy> \ No newline at end of file
diff --git a/cs/demo/Glacier2/sl/README.txt b/cs/demo/Glacier2/sl/README.txt
new file mode 100644
index 00000000000..eb9f1eafb62
--- /dev/null
+++ b/cs/demo/Glacier2/sl/README.txt
@@ -0,0 +1,26 @@
+This demo demonstrates the use of a Glacier2 session helpers and
+Silverlight to create a graphical client for the simple chat server.
+
+First follow the instructions in the C++ Glacier2 chat demo README
+to start the server and the Glacier2 router.
+
+1) You must use the server from the C++ demo directory, before
+ starting the Glacier2 router, you must edit the client endpoints to
+ use a port in the range allowed by Silverlight.
+
+ Edit the config.glacier2 file from the C++ chat demo directory and
+ update the property Glacier2.Client.Endpoints as follow:
+
+ Glacier2.Client.Endpoints=tcp -p 4502 -h 127.0.0.1
+
+2) Follow the instructions in the C++ demo README to start the server
+ and the Glacier2 router.
+
+3) In a command window, start the policy server.
+
+ > cd <Ice installation directory>\bin
+ > policyserver 127.0.0.1 ..\config\PolicyResponse.xml
+
+4) From Visual Studio open the `chat.Web' project and start the chat
+ Silverlight application using the "Debug > Start new instance"
+ command.
diff --git a/cs/demo/Glacier2/sl/chat.Web/Properties/AssemblyInfo.cs b/cs/demo/Glacier2/sl/chat.Web/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..61f17874e1a
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat.Web/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("chat.Web")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("chat.Web")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("2d00642b-9469-4eb9-b453-fca0dca032e5")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/demo/Glacier2/sl/chat.Web/Silverlight.js b/cs/demo/Glacier2/sl/chat.Web/Silverlight.js
new file mode 100644
index 00000000000..15e04097676
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat.Web/Silverlight.js
@@ -0,0 +1,2 @@
+//v2.0.30511.0
+if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(b){if(b==undefined)b=null;var a=false,m=null;try{var i=null,j=false;if(window.ActiveXObject)try{i=new ActiveXObject("AgControl.AgControl");if(b===null)a=true;else if(i.IsVersionSupported(b))a=true;i=null}catch(l){j=true}else j=true;if(j){var k=navigator.plugins["Silverlight Plug-In"];if(k)if(b===null)a=true;else{var h=k.description;if(h==="1.0.30226.2")h="2.0.30226.2";var c=h.split(".");while(c.length>3)c.pop();while(c.length<4)c.push(0);var e=b.split(".");while(e.length>4)e.pop();var d,g,f=0;do{d=parseInt(e[f]);g=parseInt(c[f]);f++}while(f<e.length&&d===g);if(d<=g&&!isNaN(d))a=true}}}catch(l){a=false}return a};Silverlight.WaitForInstallCompletion=function(){if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){try{navigator.plugins.refresh()}catch(a){}if(Silverlight.isInstalled(null)&&!Silverlight.__onSilverlightInstalledCalled){Silverlight.onSilverlightInstalled();Silverlight.__onSilverlightInstalledCalled=true}else setTimeout(Silverlight.WaitForInstallCompletion,3e3)}};Silverlight.__startup=function(){navigator.plugins.refresh();Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null);if(!Silverlight.isBrowserRestartRequired){Silverlight.WaitForInstallCompletion();if(!Silverlight.__installationEventFired){Silverlight.onInstallRequired();Silverlight.__installationEventFired=true}}else if(window.navigator.mimeTypes){var b=navigator.mimeTypes["application/x-silverlight-2"],c=navigator.mimeTypes["application/x-silverlight-2-b2"],d=navigator.mimeTypes["application/x-silverlight-2-b1"],a=d;if(c)a=c;if(!b&&(d||c)){if(!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}}else if(b&&a)if(b.enabledPlugin&&a.enabledPlugin)if(b.enabledPlugin.description!=a.enabledPlugin.description)if(!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}}if(!Silverlight.disableAutoStartup)if(window.removeEventListener)window.removeEventListener("load",Silverlight.__startup,false);else window.detachEvent("onload",Silverlight.__startup)};if(!Silverlight.disableAutoStartup)if(window.addEventListener)window.addEventListener("load",Silverlight.__startup,false);else window.attachEvent("onload",Silverlight.__startup);Silverlight.createObject=function(m,f,e,k,l,h,j){var d={},a=k,c=l;d.version=a.version;a.source=m;d.alt=a.alt;if(h)a.initParams=h;if(a.isWindowless&&!a.windowless)a.windowless=a.isWindowless;if(a.framerate&&!a.maxFramerate)a.maxFramerate=a.framerate;if(e&&!a.id)a.id=e;delete a.ignoreBrowserVer;delete a.inplaceInstallPrompt;delete a.version;delete a.isWindowless;delete a.framerate;delete a.data;delete a.src;delete a.alt;if(Silverlight.isInstalled(d.version)){for(var b in c)if(c[b]){if(b=="onLoad"&&typeof c[b]=="function"&&c[b].length!=1){var i=c[b];c[b]=function(a){return i(document.getElementById(e),j,a)}}var g=Silverlight.__getHandlerName(c[b]);if(g!=null){a[b]=g;c[b]=null}else throw"typeof events."+b+" must be 'function' or 'string'";}slPluginHTML=Silverlight.buildHTML(a)}else slPluginHTML=Silverlight.buildPromptHTML(d);if(f)f.innerHTML=slPluginHTML;else return slPluginHTML};Silverlight.buildHTML=function(a){var b=[];b.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"');if(a.id!=null)b.push(' id="'+Silverlight.HtmlAttributeEncode(a.id)+'"');if(a.width!=null)b.push(' width="'+a.width+'"');if(a.height!=null)b.push(' height="'+a.height+'"');b.push(" >");delete a.id;delete a.width;delete a.height;for(var c in a)if(a[c])b.push('<param name="'+Silverlight.HtmlAttributeEncode(c)+'" value="'+Silverlight.HtmlAttributeEncode(a[c])+'" />');b.push("</object>");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d<c.length;d++){a=c.charCodeAt(d);if(a>96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+" \n";a+="Message: "+b.ErrorMessage+" \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+" \n";a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}a+="MethodName: "+b.methodName+" \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c} \ No newline at end of file
diff --git a/cs/demo/Glacier2/sl/chat.Web/Web.Debug.config b/cs/demo/Glacier2/sl/chat.Web/Web.Debug.config
new file mode 100644
index 00000000000..962e6b73a26
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat.Web/Web.Debug.config
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+ <!--
+ In the example below, the "SetAttributes" transform will change the value of
+ "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
+ finds an atrribute "name" that has a value of "MyDB".
+
+ <connectionStrings>
+ <add name="MyDB"
+ connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+ </connectionStrings>
+ -->
+ <system.web>
+ <!--
+ In the example below, the "Replace" transform will replace the entire
+ <customErrors> section of your web.config file.
+ Note that because there is only one customErrors section under the
+ <system.web> node, there is no need to use the "xdt:Locator" attribute.
+
+ <customErrors defaultRedirect="GenericError.htm"
+ mode="RemoteOnly" xdt:Transform="Replace">
+ <error statusCode="500" redirect="InternalError.htm"/>
+ </customErrors>
+ -->
+ </system.web>
+</configuration> \ No newline at end of file
diff --git a/cs/demo/Glacier2/sl/chat.Web/Web.Release.config b/cs/demo/Glacier2/sl/chat.Web/Web.Release.config
new file mode 100644
index 00000000000..141832ba77e
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat.Web/Web.Release.config
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+ <!--
+ In the example below, the "SetAttributes" transform will change the value of
+ "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
+ finds an atrribute "name" that has a value of "MyDB".
+
+ <connectionStrings>
+ <add name="MyDB"
+ connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+ </connectionStrings>
+ -->
+ <system.web>
+ <compilation xdt:Transform="RemoveAttributes(debug)" />
+ <!--
+ In the example below, the "Replace" transform will replace the entire
+ <customErrors> section of your web.config file.
+ Note that because there is only one customErrors section under the
+ <system.web> node, there is no need to use the "xdt:Locator" attribute.
+
+ <customErrors defaultRedirect="GenericError.htm"
+ mode="RemoteOnly" xdt:Transform="Replace">
+ <error statusCode="500" redirect="InternalError.htm"/>
+ </customErrors>
+ -->
+ </system.web>
+</configuration> \ No newline at end of file
diff --git a/cs/demo/Glacier2/sl/chat.Web/Web.config b/cs/demo/Glacier2/sl/chat.Web/Web.config
new file mode 100644
index 00000000000..0598be112f3
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat.Web/Web.config
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<!--
+ For more information on how to configure your ASP.NET application, please visit
+ http://go.microsoft.com/fwlink/?LinkId=169433
+ -->
+
+<configuration>
+ <system.web>
+ <compilation debug="true" targetFramework="4.0" />
+ </system.web>
+
+</configuration>
diff --git a/cs/demo/Glacier2/sl/chat.Web/chat.Web.csproj b/cs/demo/Glacier2/sl/chat.Web/chat.Web.csproj
new file mode 100644
index 00000000000..332d25acc5a
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat.Web/chat.Web.csproj
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>
+ </ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{C0234952-390B-4C8F-8288-C7B0BADAD80E}</ProjectGuid>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>chat.Web</RootNamespace>
+ <AssemblyName>chat.Web</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <UseIISExpress>false</UseIISExpress>
+ <SilverlightApplicationList>{78FA0B57-6672-4173-8CA3-C81FA402F4E1}|..\chat\chat.csproj|ClientBin|False</SilverlightApplicationList>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Web.DynamicData" />
+ <Reference Include="System.Web.Entity" />
+ <Reference Include="System.Web.ApplicationServices" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Web.Services" />
+ <Reference Include="System.EnterpriseServices" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="chatTestPage.aspx" />
+ <Content Include="chatTestPage.html" />
+ <Content Include="ClientBin\chat.xap" />
+ <Content Include="Silverlight.js" />
+ <Content Include="Web.config" />
+ <Content Include="Web.Debug.config">
+ <DependentUpon>Web.config</DependentUpon>
+ </Content>
+ <Content Include="Web.Release.config">
+ <DependentUpon>Web.config</DependentUpon>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>False</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>49884</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>
+ </IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>False</UseCustomServer>
+ <CustomServerUrl>
+ </CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
diff --git a/cs/demo/Glacier2/sl/chat.Web/chatTestPage.aspx b/cs/demo/Glacier2/sl/chat.Web/chatTestPage.aspx
new file mode 100644
index 00000000000..0679df38c70
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat.Web/chatTestPage.aspx
@@ -0,0 +1,74 @@
+<%@ Page Language="C#" AutoEventWireup="true" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head runat="server">
+ <title>chat</title>
+ <style type="text/css">
+ html, body {
+ height: 100%;
+ overflow: auto;
+ }
+ body {
+ padding: 0;
+ margin: 0;
+ }
+ #silverlightControlHost {
+ height: 100%;
+ text-align:center;
+ }
+ </style>
+ <script type="text/javascript" src="Silverlight.js"></script>
+ <script type="text/javascript">
+ function onSilverlightError(sender, args) {
+ var appSource = "";
+ if (sender != null && sender != 0) {
+ appSource = sender.getHost().Source;
+ }
+
+ var errorType = args.ErrorType;
+ var iErrorCode = args.ErrorCode;
+
+ if (errorType == "ImageError" || errorType == "MediaError") {
+ return;
+ }
+
+ var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
+
+ errMsg += "Code: "+ iErrorCode + " \n";
+ errMsg += "Category: " + errorType + " \n";
+ errMsg += "Message: " + args.ErrorMessage + " \n";
+
+ if (errorType == "ParserError") {
+ errMsg += "File: " + args.xamlFile + " \n";
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ else if (errorType == "RuntimeError") {
+ if (args.lineNumber != 0) {
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ errMsg += "MethodName: " + args.methodName + " \n";
+ }
+
+ throw new Error(errMsg);
+ }
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server" style="height:100%">
+ <div id="silverlightControlHost">
+ <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
+ <param name="source" value="ClientBin/chat.xap"/>
+ <param name="onError" value="onSilverlightError" />
+ <param name="background" value="white" />
+ <param name="minRuntimeVersion" value="5.0.61118.0" />
+ <param name="autoUpgrade" value="true" />
+ <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
+ <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
+ </a>
+ </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
+ </form>
+</body>
+</html>
diff --git a/cs/demo/Glacier2/sl/chat.Web/chatTestPage.html b/cs/demo/Glacier2/sl/chat.Web/chatTestPage.html
new file mode 100644
index 00000000000..b14f7516061
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat.Web/chatTestPage.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+
+<head>
+ <title>chat</title>
+ <style type="text/css">
+ html, body {
+ height: 100%;
+ overflow: auto;
+ }
+ body {
+ padding: 0;
+ margin: 0;
+ }
+ #silverlightControlHost {
+ height: 100%;
+ text-align:center;
+ }
+ </style>
+ <script type="text/javascript" src="Silverlight.js"></script>
+ <script type="text/javascript">
+ function onSilverlightError(sender, args) {
+ var appSource = "";
+ if (sender != null && sender != 0) {
+ appSource = sender.getHost().Source;
+ }
+
+ var errorType = args.ErrorType;
+ var iErrorCode = args.ErrorCode;
+
+ if (errorType == "ImageError" || errorType == "MediaError") {
+ return;
+ }
+
+ var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
+
+ errMsg += "Code: "+ iErrorCode + " \n";
+ errMsg += "Category: " + errorType + " \n";
+ errMsg += "Message: " + args.ErrorMessage + " \n";
+
+ if (errorType == "ParserError") {
+ errMsg += "File: " + args.xamlFile + " \n";
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ else if (errorType == "RuntimeError") {
+ if (args.lineNumber != 0) {
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ errMsg += "MethodName: " + args.methodName + " \n";
+ }
+
+ throw new Error(errMsg);
+ }
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server" style="height:100%">
+ <div id="silverlightControlHost">
+ <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
+ <param name="source" value="ClientBin/chat.xap"/>
+ <param name="onError" value="onSilverlightError" />
+ <param name="background" value="white" />
+ <param name="minRuntimeVersion" value="5.0.61118.0" />
+ <param name="autoUpgrade" value="true" />
+ <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
+ <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
+ </a>
+ </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
+ </form>
+</body>
+</html>
diff --git a/cs/demo/Glacier2/sl/chat/.gitignore b/cs/demo/Glacier2/sl/chat/.gitignore
new file mode 100644
index 00000000000..63fb689dfa8
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/.gitignore
@@ -0,0 +1,3 @@
+# Dummy file, so that git retains this otherwise empty directory.
+Chat.cs
+Bin/*
diff --git a/cs/demo/Glacier2/sl/chat/App.xaml b/cs/demo/Glacier2/sl/chat/App.xaml
new file mode 100644
index 00000000000..1db4dba1dc4
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="chat.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/demo/Glacier2/sl/chat/App.xaml.cs b/cs/demo/Glacier2/sl/chat/App.xaml.cs
new file mode 100644
index 00000000000..d6b572f444b
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/App.xaml.cs
@@ -0,0 +1,79 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace chat
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ _coordinator = new Coordinator();
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ this.RootVisual = new MainPage();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+
+ private Coordinator _coordinator;
+ }
+}
diff --git a/cs/demo/Glacier2/sl/chat/Chat.ice b/cs/demo/Glacier2/sl/chat/Chat.ice
new file mode 100644
index 00000000000..0d3cca58f28
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/Chat.ice
@@ -0,0 +1,28 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#pragma once
+
+#include <Glacier2/Session.ice>
+
+module Demo
+{
+
+interface ChatCallback
+{
+ void message(string data);
+};
+
+interface ChatSession extends Glacier2::Session
+{
+ ["ami"] void setCallback(ChatCallback* callback);
+ ["ami"] void say(string data);
+};
+
+};
diff --git a/cs/demo/Glacier2/sl/chat/ChatPage.xaml b/cs/demo/Glacier2/sl/chat/ChatPage.xaml
new file mode 100644
index 00000000000..59f9263b7ce
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/ChatPage.xaml
@@ -0,0 +1,44 @@
+<navigation:Page x:Class="chat.ChatPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
+ d:DesignWidth="640" d:DesignHeight="480"
+ Title="ChatPage Page">
+ <Grid>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="AUTO"></RowDefinition>
+ <RowDefinition Height="5*"></RowDefinition>
+ <RowDefinition Height="AUTO"></RowDefinition>
+ <RowDefinition Height="AUTO"></RowDefinition>
+ </Grid.RowDefinitions>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition></ColumnDefinition>
+ </Grid.ColumnDefinitions>
+
+ <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="5, 5, 5, 5">
+ <Button x:Name="btnLogout" Content="Logout" TabIndex="0" Click="btnLogoutClick" />
+ </StackPanel>
+ <!-- Define a text box to show chat messages. -->
+ <TextBox Grid.Row="1" x:Name="txtMessages"
+ FontSize="12" Text="" TextWrapping="Wrap" IsEnabled="True"
+ HorizontalScrollBarVisibility="Auto"
+ ScrollViewer.VerticalScrollBarVisibility="Auto"
+ IsReadOnly="True" TabIndex="1"/>
+
+ <!--- Define an editable text box for the user to write messages. -->
+ <TextBox Grid.Row="2"
+ Name="input"
+ IsEnabled="True"
+ TextWrapping="Wrap"
+ HorizontalScrollBarVisibility="Hidden"
+ VerticalScrollBarVisibility="Auto"
+ Background="WhiteSmoke" KeyDown="sendMessage" TabIndex="2"></TextBox>
+
+ <!-- TextBlock with the status message -->
+ <TextBlock Grid.Row="3" Name="status" VerticalAlignment="Bottom">Not connected</TextBlock>
+
+ </Grid>
+</navigation:Page>
diff --git a/cs/demo/Glacier2/sl/chat/ChatPage.xaml.cs b/cs/demo/Glacier2/sl/chat/ChatPage.xaml.cs
new file mode 100644
index 00000000000..ee8471c8cb3
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/ChatPage.xaml.cs
@@ -0,0 +1,68 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Windows.Navigation;
+
+namespace chat
+{
+ public partial class ChatPage : Page
+ {
+ public ChatPage()
+ {
+ InitializeComponent();
+ Coordinator.getInstance().setChatPage(this);
+ if (Coordinator.getInstance().getMainPage().getState() == ClientState.Connected)
+ {
+ status.Text = "Connected";
+ }
+ else
+ {
+ status.Text = "Not Connected";
+ }
+ }
+
+
+ public void appendMessage(string message)
+ {
+ txtMessages.Text += message;
+ txtMessages.SelectionLength = 0;
+ txtMessages.SelectionStart = txtMessages.Text.Length;
+ }
+
+ private void
+ sendMessage(object sender, KeyEventArgs e)
+ {
+ if(e.Key == Key.Enter)
+ {
+ string message = input.Text.Trim();
+ if(message.Length > 0)
+ {
+ Coordinator.getInstance().sendMessage(message);
+ }
+ input.Text = "";
+ }
+ }
+
+ private void btnLogoutClick(object sender, RoutedEventArgs e)
+ {
+ Coordinator.getInstance().destroySession();
+ }
+ }
+}
diff --git a/cs/demo/Glacier2/sl/chat/ConnectingPage.xaml b/cs/demo/Glacier2/sl/chat/ConnectingPage.xaml
new file mode 100644
index 00000000000..cc05c67cbfa
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/ConnectingPage.xaml
@@ -0,0 +1,13 @@
+<navigation:Page x:Class="chat.ConnectingPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
+ d:DesignWidth="640" d:DesignHeight="480"
+ Title="ConnectingPage Page">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
+ <TextBlock>Connecting</TextBlock>
+ </StackPanel>
+</navigation:Page>
diff --git a/cs/demo/Glacier2/sl/chat/ConnectingPage.xaml.cs b/cs/demo/Glacier2/sl/chat/ConnectingPage.xaml.cs
new file mode 100644
index 00000000000..39822be2941
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/ConnectingPage.xaml.cs
@@ -0,0 +1,32 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Windows.Navigation;
+
+namespace chat
+{
+ public partial class ConnectingPage : Page
+ {
+ public ConnectingPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/cs/demo/Glacier2/sl/chat/Coordinator.cs b/cs/demo/Glacier2/sl/chat/Coordinator.cs
new file mode 100644
index 00000000000..3ca4caca046
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/Coordinator.cs
@@ -0,0 +1,203 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Glacier2;
+
+namespace chat
+{
+ public enum ClientState { Disconnected, Connecting, Connected, ConnectionLost, Disconnecting }
+
+ public class Coordinator : Glacier2.SessionCallback
+ {
+ public class LoginData
+ {
+ public LoginData()
+ {
+ host = "localhost";
+ username = "test";
+ password = "";
+ }
+
+ public String host;
+ public String username;
+ public String password;
+ }
+
+ private class ChatCallbackI : Demo.ChatCallbackDisp_
+ {
+ public override void
+ message(string data, Ice.Current current)
+ {
+ Coordinator.getInstance().getChatPage().appendMessage(data + Environment.NewLine);
+ }
+ }
+
+ public Coordinator()
+ {
+ _instance = this;
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.dispatcher = delegate(System.Action action, Ice.Connection connection)
+ {
+ try
+ {
+ _loginPage.Dispatcher.BeginInvoke(action);
+ }
+ catch(Ice.CommunicatorDestroyedException ex)
+ {
+ _mainPage.setState(ClientState.ConnectionLost);
+ _mainPage.setError(ex.ToString());
+ }
+ };
+ _factory = new SessionFactoryHelper(initData, this);
+ }
+
+ public void doLogin(LoginData loginData)
+ {
+ _mainPage.setState(ClientState.Connecting);
+ _loginData = loginData;
+ //
+ // IceSSL isn't supported with Silverlight.
+ //
+ _factory.setSecure(false);
+ _factory.setRouterHost(_loginData.host);
+ _factory.setPort(4502);
+ _factory.setRouterIdentity(new Ice.Identity("router", "DemoGlacier2"));
+ _session = _factory.connect(_loginData.username, _loginData.password);
+ }
+
+ public void
+ destroySession()
+ {
+ if(_session != null)
+ {
+ _mainPage.setState(ClientState.Disconnecting);
+ _session.destroy();
+ }
+ }
+
+ public void
+ sendMessage(string message)
+ {
+ _chat.begin_say(message).whenCompleted(delegate(Ice.Exception ex)
+ {
+ _chatPage.appendMessage("<system-message> - " + ex.ToString() + Environment.NewLine);
+ });
+ }
+
+ public void connectFailed(SessionHelper session, Exception ex)
+ {
+ // If the session has been reassigned avoid the
+ // spurious callback.
+ if(session != _session)
+ {
+ return;
+ }
+ _mainPage.setState(ClientState.Disconnected);
+ _mainPage.setError("Connect Failed:" + Environment.NewLine + ex.ToString());
+ }
+
+ public void connected(SessionHelper session)
+ {
+ // If the session has been reassigned avoid the
+ // spurious callback.
+ if(session != _session)
+ {
+ return;
+ }
+
+ Ice.Object servant = new ChatCallbackI();
+
+ Demo.ChatCallbackPrx callback = Demo.ChatCallbackPrxHelper.uncheckedCast(_session.addWithUUID(servant));
+ _chat = Demo.ChatSessionPrxHelper.uncheckedCast(_session.session());
+ _chat.begin_setCallback(callback).whenCompleted(
+ delegate()
+ {
+ _mainPage.setState(ClientState.Connected);
+ },
+ delegate(Ice.Exception ex)
+ {
+ if(_session != null)
+ {
+ _session.destroy();
+ }
+ });
+ }
+
+ public void createdCommunicator(SessionHelper session)
+ {
+ }
+
+ public void disconnected(SessionHelper session)
+ {
+ // If the session has been reassigned avoid the
+ // spurious callback.
+ if(session != _session)
+ {
+ return;
+ }
+ _session = null;
+ _mainPage.setState(ClientState.Disconnected);
+ }
+
+ public void setChatPage(ChatPage page)
+ {
+ _chatPage = page;
+ }
+
+ public ChatPage getChatPage()
+ {
+ return _chatPage;
+ }
+
+ public void setLoginPage(LoginPage page)
+ {
+ _loginPage = page;
+ }
+
+ public LoginPage getLoginPage()
+ {
+ return _loginPage;
+ }
+
+ public void setMainPage(MainPage page)
+ {
+ _mainPage = page;
+ }
+
+ public MainPage getMainPage()
+ {
+ return _mainPage;
+ }
+
+ public static Coordinator getInstance()
+ {
+ return _instance;
+ }
+
+ private SessionFactoryHelper _factory;
+ private LoginData _loginData;
+ private SessionHelper _session;
+ private Demo.ChatSessionPrx _chat;
+ private MainPage _mainPage;
+ private LoginPage _loginPage;
+ private ChatPage _chatPage;
+ private static Coordinator _instance;
+ }
+}
diff --git a/cs/demo/Glacier2/sl/chat/DisconnectingPage.xaml b/cs/demo/Glacier2/sl/chat/DisconnectingPage.xaml
new file mode 100644
index 00000000000..25f1380b9a2
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/DisconnectingPage.xaml
@@ -0,0 +1,13 @@
+<navigation:Page x:Class="chat.DisconnectingPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
+ d:DesignWidth="640" d:DesignHeight="480"
+ Title="DisconnectingPage Page">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
+ <TextBlock>Disconnecting</TextBlock>
+ </StackPanel>
+</navigation:Page>
diff --git a/cs/demo/Glacier2/sl/chat/DisconnectingPage.xaml.cs b/cs/demo/Glacier2/sl/chat/DisconnectingPage.xaml.cs
new file mode 100644
index 00000000000..3243574f1d0
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/DisconnectingPage.xaml.cs
@@ -0,0 +1,32 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Windows.Navigation;
+
+namespace chat
+{
+ public partial class DisconnectingPage : Page
+ {
+ public DisconnectingPage()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/cs/demo/Glacier2/sl/chat/LoginPage.xaml b/cs/demo/Glacier2/sl/chat/LoginPage.xaml
new file mode 100644
index 00000000000..4fee9c375a4
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/LoginPage.xaml
@@ -0,0 +1,25 @@
+<navigation:Page x:Class="chat.LoginPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
+ d:DesignWidth="640" d:DesignHeight="480"
+ Title="LoginPage Page" >
+ <StackPanel VerticalAlignment="Center" Orientation="Vertical" MaxWidth="400" Margin="10, 10, 10, 10">
+ <TextBlock HorizontalAlignment="Center" Text="Chat Demo" Margin="5, 5, 5, 5"/>
+ <TextBlock HorizontalAlignment="Center" Text="Welcome! You can login with any username / password." Margin="5, 5, 5, 5"/>
+ <TextBlock Name="lblUsername" Margin="5, 5, 5, 5">Username:</TextBlock>
+ <TextBox Name="txtUsername" Margin="5, 5, 5, 5"></TextBox>
+ <TextBlock TextWrapping="NoWrap" Margin="5, 5, 5, 5">Password:</TextBlock>
+ <PasswordBox Name="txtPassword" Margin="5, 5, 5, 5"></PasswordBox>
+ <TextBlock Margin="5, 5, 5, 5">Host:</TextBlock>
+ <TextBox Name="txtHost" Text="localhost" Margin="5, 5, 5, 5"></TextBox>
+ <Button MaxWidth="120" x:Name="btnLogin" Content="Login" Click="btnLoginClick" Margin="5, 5, 5, 5"/>
+ <TextBox x:Name="txtError" Visibility="Collapsed"
+ FontSize="12" Text="" TextWrapping="Wrap" IsEnabled="True" Height="120"
+ Width="400" HorizontalScrollBarVisibility="Hidden"
+ VerticalScrollBarVisibility="Visible" IsReadOnly="True"/>
+ </StackPanel>
+</navigation:Page>
diff --git a/cs/demo/Glacier2/sl/chat/LoginPage.xaml.cs b/cs/demo/Glacier2/sl/chat/LoginPage.xaml.cs
new file mode 100644
index 00000000000..2006efd7613
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/LoginPage.xaml.cs
@@ -0,0 +1,73 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Windows.Navigation;
+
+namespace chat
+{
+ public partial class LoginPage : Page
+ {
+ public LoginPage()
+ {
+ InitializeComponent();
+
+ Coordinator.LoginData loginData = new Coordinator.LoginData();
+ txtHost.Text = loginData.host;
+ txtUsername.Text = loginData.username;
+
+ //
+ // Initialize values from previous page.
+ //
+ LoginPage previous = Coordinator.getInstance().getLoginPage();
+ if(previous != null)
+ {
+ txtHost.Text = previous.txtHost.Text;
+ txtUsername.Text = previous.txtUsername.Text;
+ txtPassword.Password = previous.txtPassword.Password;
+ txtError.Text = previous.txtError.Text;
+ }
+
+ if (String.IsNullOrEmpty(txtError.Text))
+ {
+ txtError.Visibility = System.Windows.Visibility.Collapsed;
+ }
+ else
+ {
+ txtError.Visibility = System.Windows.Visibility.Visible;
+ }
+ Coordinator.getInstance().setLoginPage(this);
+ }
+
+ string PageTitle { get{return "Login";} }
+
+ bool KeepAlive { get{return true;} }
+
+ bool CanNavigateAway { get{return true;} }
+
+ private void btnLoginClick(object sender, RoutedEventArgs e)
+ {
+ Coordinator.LoginData loginData = new Coordinator.LoginData();
+ loginData.username = txtUsername.Text;
+ loginData.password = txtPassword.Password;
+ loginData.host = txtHost.Text;
+ Coordinator.getInstance().doLogin(loginData);
+ }
+ }
+}
diff --git a/cs/demo/Glacier2/sl/chat/MainPage.xaml b/cs/demo/Glacier2/sl/chat/MainPage.xaml
new file mode 100644
index 00000000000..f2ade4f6330
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/MainPage.xaml
@@ -0,0 +1,14 @@
+<navigation:Page x:Class="chat.MainPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
+ d:DesignWidth="640" d:DesignHeight="480"
+ Title="MainPage Page">
+ <Grid x:Name="LayoutRoot">
+ <navigation:Frame
+ Source="/LoginPage.xaml" Name="mainFrame" Visibility="Visible" IsHitTestVisible="True" IsTabStop="True"/>
+ </Grid>
+</navigation:Page>
diff --git a/cs/demo/Glacier2/sl/chat/MainPage.xaml.cs b/cs/demo/Glacier2/sl/chat/MainPage.xaml.cs
new file mode 100644
index 00000000000..03cb064e118
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/MainPage.xaml.cs
@@ -0,0 +1,100 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Windows.Navigation;
+
+namespace chat
+{
+ public partial class MainPage : Page
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ Coordinator.getInstance().setMainPage(this);
+ mainFrame.JournalOwnership = JournalOwnership.OwnsJournal;
+ }
+
+ public void setState(ClientState state)
+ {
+ _state = state;
+ string page = mainFrame.Source.OriginalString;
+ switch (state)
+ {
+ case ClientState.Connected:
+ {
+ page = "/ChatPage.xaml";
+ break;
+ }
+ case ClientState.Disconnected:
+ {
+ page = "/LoginPage.xaml";
+ break;
+ }
+ case ClientState.Disconnecting:
+ {
+ page = "/DisconnectingPage.xaml";
+ break;
+ }
+ case ClientState.Connecting:
+ {
+ LoginPage loginPage = Coordinator.getInstance().getLoginPage();
+ loginPage.txtError.Text = "";
+ page = "/ConnectingPage.xaml";
+ break;
+ }
+ case ClientState.ConnectionLost:
+ {
+ ChatPage chatPage = Coordinator.getInstance().getChatPage();
+ chatPage.status.Text = "Not Connected";
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+
+ if(!mainFrame.Source.OriginalString.Equals(page))
+ {
+ mainFrame.Source = new Uri(page, UriKind.Relative);
+ }
+ }
+
+ public void setError(string msg)
+ {
+ if (_state == ClientState.Disconnected)
+ {
+ LoginPage page = Coordinator.getInstance().getLoginPage();
+ page.txtError.Text = msg;
+ }
+ else
+ {
+ Coordinator.getInstance().getChatPage().appendMessage(msg);
+ }
+ }
+
+ public ClientState getState()
+ {
+ return _state;
+ }
+
+ private ClientState _state;
+ }
+}
diff --git a/cs/demo/Glacier2/sl/chat/Properties/AppManifest.xml b/cs/demo/Glacier2/sl/chat/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/demo/Glacier2/sl/chat/Properties/AssemblyInfo.cs b/cs/demo/Glacier2/sl/chat/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..19eae768e93
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("chat")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("chat")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("fd4e649e-579d-4291-b5a4-0bebe34fe873")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/demo/Glacier2/sl/chat/bin/AppManifest.xaml b/cs/demo/Glacier2/sl/chat/bin/AppManifest.xaml
new file mode 100644
index 00000000000..d7a4d47da75
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/bin/AppManifest.xaml
@@ -0,0 +1,8 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="chat" EntryPointType="chat.App" RuntimeVersion="5.0.61118.0">
+ <Deployment.Parts>
+ <AssemblyPart x:Name="chat" Source="chat.dll" />
+ <AssemblyPart x:Name="Glacier2" Source="Glacier2.dll" />
+ <AssemblyPart x:Name="Ice" Source="Ice.dll" />
+ <AssemblyPart x:Name="System.Windows.Controls.Navigation" Source="System.Windows.Controls.Navigation.dll" />
+ </Deployment.Parts>
+</Deployment> \ No newline at end of file
diff --git a/cs/demo/Glacier2/sl/chat/bin/Glacier2.xml b/cs/demo/Glacier2/sl/chat/bin/Glacier2.xml
new file mode 100644
index 00000000000..a51ed60be7e
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/bin/Glacier2.xml
@@ -0,0 +1,2110 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>Glacier2</name>
+ </assembly>
+ <members>
+ <member name="T:Glacier2.SessionFactoryHelper">
+ <summary>
+ A helper class for using Glacier2 with GUI applications.
+
+ Applications should create a session factory for each Glacier2 router to which the application will
+ connect. To connect with the Glacier2 router, call SessionFactory.connect. The callback object is
+ notified of the various life cycle events. Once the session is torn down for whatever reason, the
+ application can use the session factory to create another connection.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.#ctor(Glacier2.SessionCallback)">
+ <summary>
+ Creates a SessionFactory object.
+ </summary>
+ <param name="callback">The callback object for notifications.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.#ctor(Ice.InitializationData,Glacier2.SessionCallback)">
+ <summary>
+ Creates a SessionFactory object.
+ </summary>
+ <param name="initData">The initialization data to use when creating the communicator.</param>
+ <param name="callback">The callback object for notifications.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.#ctor(Ice.Properties,Glacier2.SessionCallback)">
+ <summary>
+ Creates a SessionFactory object.
+ </summary>
+ <param name="properties">The properties to use when creating the communicator.</param>
+ <param name="callback">The callback object for notifications.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.setRouterIdentity(Ice.Identity)">
+ <summary>
+ Set the router object identity.
+ </summary>
+ <param name="identity">The Glacier2 router's identity.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.getRouterIdentity">
+ <summary>
+ Returns the object identity of the Glacier2 router.
+ </summary>
+ <returns> The Glacier2 router's identity.</returns>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.setRouterHost(System.String)">
+ <summary>
+ Sets the host on which the Glacier2 router runs.
+ </summary>
+ <param name="hostname">The host name (or IP address) of the router host.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.getRouterHost">
+ <summary>
+ Returns the host on which the Glacier2 router runs.
+ </summary>
+ <returns>The Glacier2 router host.</returns>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.setSecure(System.Boolean)">
+ <summary>
+ Sets whether to connect with the Glacier2 router securely.
+ </summary>
+ <param name="secure">If true, the client connects to the router
+ via SSL; otherwise, the client connects via TCP.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.getSecure">
+ <summary>
+ Returns whether the session factory will establish a secure connection to the Glacier2 router.
+ </summary>
+ <returns>The secure flag.</returns>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.setTimeout(System.Int32)">
+ <summary>
+ Sets the connect and connection timeout for the Glacier2 router.
+ </summary>
+ <param name="timeoutMillisecs">The timeout in milliseconds. A zero
+ or negative timeout value indicates that the router proxy has no
+ associated timeout.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.getTimeout">
+ <summary>
+ Returns the connect and connection timeout associated with the Glacier2 router.
+ </summary>
+ <returns>The timeout.</returns>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.setPort(System.Int32)">
+ <summary>
+ Sets the Glacier2 router port to connect to.
+ </summary>
+ <param name="port">The port. If 0, then the default port (4063 for TCP or
+ 4064 for SSL) is used.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.getPort">
+ <summary>
+ Returns the Glacier2 router port to connect to.
+ </summary>
+ <returns>The port.</returns>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.getInitializationData">
+ Returns the initialization data used to initialize the communicator.
+
+ @return The initialization data.
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.setConnectContext(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Sets the request context to use while establishing a connection to the Glacier2 router.
+ </summary>
+ <param name="context">The request context.</param>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.connect">
+ <summary>
+ Connects to the Glacier2 router using the associated SSL credentials.
+
+ Once the connection is established, SesssionCallback.connected is called on
+ the callback object; upon failure, SessionCallback.connectFailed is called
+ with the exception.
+ </summary>
+ <returns>The connected session.</returns>
+ </member>
+ <member name="M:Glacier2.SessionFactoryHelper.connect(System.String,System.String)">
+ <summary>
+ Connect the Glacier2 session using user name and password credentials.
+
+ Once the connection is established, SessionCallback.connected is called on
+ the callback object; upon failure, SessionCallback.connectFailed is called
+ with the exception.
+ </summary>
+ <param name="username">The user name.</param>
+ <param name="password">The password.</param>
+ <returns>The connected session.</returns>
+ </member>
+ <member name="T:Glacier2.SessionHelper">
+ <summary>
+ A helper class for using Glacier2 with GUI applications.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionHelper.#ctor(Glacier2.SessionCallback,Ice.InitializationData)">
+ <summary>
+ Creates a Glacier2 session.
+ </summary>
+ <param name="callback">The callback for notifications about session
+ establishment.</param>
+ <param name="initData">The Ice.InitializationData for initializing
+ the communicator.</param>
+ </member>
+ <member name="M:Glacier2.SessionHelper.destroy">
+ <summary>
+ Destroys the Glacier2 session.
+
+ Once the session has been destroyed, SessionCallback.disconnected is
+ called on the associated callback object.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionHelper.communicator">
+ <summary>
+ Returns the session's communicator object.
+ </summary>
+ <returns>The communicator.</returns>
+ </member>
+ <member name="M:Glacier2.SessionHelper.categoryForClient">
+ <summary>
+ Returns the category to be used in the identities of all of
+ the client's callback objects. Clients must use this category
+ for the router to forward callback requests to the intended
+ client.
+ </summary>
+ <returns>The category. Throws SessionNotExistException
+ No session exists</returns>
+ </member>
+ <member name="M:Glacier2.SessionHelper.addWithUUID(Ice.Object)">
+ <summary>
+ Adds a servant to the callback object adapter's Active Servant
+ Map with a UUID.
+ </summary>
+ <param name="servant">The servant to add.</param>
+ <returns>The proxy for the servant. Throws SessionNotExistException
+ if no session exists.</returns>
+ </member>
+ <member name="M:Glacier2.SessionHelper.session">
+ <summary>
+ Returns the Glacier2 session proxy. If the session hasn't been
+ established yet, or the session has already been destroyed,
+ throws SessionNotExistException.
+ </summary>
+ <returns>The session proxy, or throws SessionNotExistException
+ if no session exists.</returns>
+ </member>
+ <member name="M:Glacier2.SessionHelper.isConnected">
+ <summary>
+ Returns true if there is an active session, otherwise returns false.
+ </summary>
+ <returns>true if session exists or false if no session exists.</returns>
+ </member>
+ <member name="M:Glacier2.SessionHelper.objectAdapter">
+ <summary>
+ Returns an object adapter for callback objects, creating it if necessary.
+ </summary>
+ <return>The object adapter. throws SessionNotExistException
+ if no session exists.</return>
+ </member>
+ <member name="M:Glacier2.SessionHelper.connect(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Connects to the Glacier2 router using the associated SSL credentials.
+
+ Once the connection is established, SessionCallback.connected is called on
+ the callback object; upon failure, SessionCallback.exception is called with
+ the exception.
+ </summary>
+ <param name="context">The request context to use when creating the session.</param>
+ </member>
+ <member name="M:Glacier2.SessionHelper.connect(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Connects a Glacier2 session using user name and password credentials.
+
+ Once the connection is established, SessionCallback.connected is called on the callback object;
+ upon failure SessionCallback.exception is called with the exception.
+ </summary>
+ <param name="username">The user name.</param>
+ <param name="password">The password.</param>
+ <param name="context">The request context to use when creating the session.</param>
+ </member>
+ <member name="T:Glacier2.AMI_Router_refreshSession">
+ <summary>
+ Keep the calling client's session with this router alive.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMI_Router_refreshSession.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Glacier2.SessionCallback">
+ <summary>
+ A callback class to get notifications of status changes in the
+ Glacier2 session. All callbacks on the SessionCallback interface
+ occur in the main swing thread.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionCallback.createdCommunicator(Glacier2.SessionHelper)">
+ <summary>
+ Notifies the application that the communicator was created.
+ </summary>
+ <param name="session">The Glacier2 session.</param>
+ </member>
+ <member name="M:Glacier2.SessionCallback.connected(Glacier2.SessionHelper)">
+ <summary>
+ Notifies the application that the Glacier2 session has
+ been established.
+ </summary>
+ <param name="session">The established session.</param>
+ </member>
+ <member name="M:Glacier2.SessionCallback.disconnected(Glacier2.SessionHelper)">
+ <summary>
+ Notifies the application that the Glacier2 session has been
+ disconnected.
+ </summary>
+ <param name="session">The disconnected session.</param>
+ </member>
+ <member name="M:Glacier2.SessionCallback.connectFailed(Glacier2.SessionHelper,System.Exception)">
+ <summary>
+ Notifies the application that the Glacier2 session
+ establishment failed.
+ </summary>
+ <param name="session">The session reporting the connection
+ failure.</param>
+ <param name="ex">The exception.</param>
+ </member>
+ <member name="T:Glacier2.PermissionsVerifierOperations_">
+ <summary>
+ The Glacier2 permissions verifier.
+ This is called through the
+ process of establishing a session.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.PermissionsVerifierOperations_.checkPermissions(System.String,System.String,System.String@,Ice.Current)">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="userId">The user id for which to check permission.
+
+ </param>
+ <param name="password">The user's password.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ <returns>True if access is granted, or false otherwise.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.PermissionsVerifierOperationsNC_">
+ <summary>
+ The Glacier2 permissions verifier.
+ This is called through the
+ process of establishing a session.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.PermissionsVerifierOperationsNC_.checkPermissions(System.String,System.String,System.String@)">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="userId">The user id for which to check permission.
+
+ </param>
+ <param name="password">The user's password.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ <returns>True if access is granted, or false otherwise.</returns>
+ </member>
+ <member name="T:Glacier2.SSLPermissionsVerifierOperations_">
+ <summary>
+ The SSL Glacier2 permissions verifier.
+ This is called through the
+ process of establishing a session.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SSLPermissionsVerifierOperations_.authorize(Glacier2.SSLInfo,System.String@,Ice.Current)">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="info">The SSL information.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ <returns>True if access is granted, or false otherwise.
+
+ </returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SSLPermissionsVerifierOperationsNC_">
+ <summary>
+ The SSL Glacier2 permissions verifier.
+ This is called through the
+ process of establishing a session.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SSLPermissionsVerifierOperationsNC_.authorize(Glacier2.SSLInfo,System.String@)">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="info">The SSL information.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ <returns>True if access is granted, or false otherwise.
+
+ </returns>
+ </member>
+ <member name="T:Glacier2.PermissionsVerifierPrxHelper">
+ <summary>
+ The Glacier2 permissions verifier.
+ This is called through the
+ process of establishing a session.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.PermissionsVerifierPrxHelper.checkPermissions(System.String,System.String,System.String@)">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="userId">The user id for which to check permission.
+
+ </param>
+ <param name="password">The user's password.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ <returns>True if access is granted, or false otherwise.</returns>
+ </member>
+ <member name="M:Glacier2.PermissionsVerifierPrxHelper.checkPermissions(System.String,System.String,System.String@,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="userId">The user id for which to check permission.
+
+ </param>
+ <param name="password">The user's password.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ <returns>True if access is granted, or false otherwise.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.PermissionsVerifierPrxHelper.begin_checkPermissions(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="userId">The user id for which to check permission.
+
+ </param>
+ <param name="password">The user's password.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.PermissionsVerifierPrxHelper.checkPermissions_async(Glacier2.AMI_PermissionsVerifier_checkPermissions,System.String,System.String)">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="userId">The user id for which to check permission.
+
+ </param>
+ <param name="password">The user's password.
+
+ </param>
+ </member>
+ <member name="M:Glacier2.PermissionsVerifierPrxHelper.checkPermissions_async(Glacier2.AMI_PermissionsVerifier_checkPermissions,System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="userId">The user id for which to check permission.
+
+ </param>
+ <param name="password">The user's password.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SSLPermissionsVerifierPrxHelper">
+ <summary>
+ The SSL Glacier2 permissions verifier.
+ This is called through the
+ process of establishing a session.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SSLPermissionsVerifierPrxHelper.authorize(Glacier2.SSLInfo,System.String@)">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="info">The SSL information.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ <returns>True if access is granted, or false otherwise.
+
+ </returns>
+ </member>
+ <member name="M:Glacier2.SSLPermissionsVerifierPrxHelper.authorize(Glacier2.SSLInfo,System.String@,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="info">The SSL information.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ <returns>True if access is granted, or false otherwise.
+
+ </returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SSLPermissionsVerifierPrxHelper.begin_authorize(Glacier2.SSLInfo,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="info">The SSL information.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SSLPermissionsVerifierPrxHelper.authorize_async(Glacier2.AMI_SSLPermissionsVerifier_authorize,Glacier2.SSLInfo)">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="info">The SSL information.
+
+ </param>
+ </member>
+ <member name="M:Glacier2.SSLPermissionsVerifierPrxHelper.authorize_async(Glacier2.AMI_SSLPermissionsVerifier_authorize,Glacier2.SSLInfo,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="info">The SSL information.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.AMI_PermissionsVerifier_checkPermissions">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMI_PermissionsVerifier_checkPermissions.ice_response(System.Boolean,System.String)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) True if access is granted, or false otherwise.</param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ </member>
+ <member name="T:Glacier2.AMI_SSLPermissionsVerifier_authorize">
+ <summary>
+ Check whether a user has permission to access the router.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMI_SSLPermissionsVerifier_authorize.ice_response(System.Boolean,System.String)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) True if access is granted, or false otherwise.
+
+ </param>
+ <param name="reason">The reason why access was denied.
+
+ </param>
+ </member>
+ <member name="T:Glacier2.PermissionDeniedException">
+ <summary>
+ This exception is raised if a client is denied the ability to create
+ a session with the router.
+ </summary>
+ </member>
+ <member name="T:Glacier2.SessionNotExistException">
+ <summary>
+ This exception is raised if a client tries to destroy a session
+ with a router, but no session exists for the client.
+ </summary>
+ </member>
+ <member name="T:Glacier2.RouterOperations_">
+ <summary>
+ The Glacier2 specialization of the Ice.Router
+ interface.
+ </summary>
+ </member>
+ <member name="M:Glacier2.RouterOperations_.getCategoryForClient(Ice.Current)">
+ <summary>
+ This category must be used in the identities of all of the client's
+ callback objects.
+ This is necessary in order for the router to
+ forward callback requests to the intended client. If the Glacier2
+ server endpoints are not set, the returned category is an empty
+ string.
+
+ </summary>
+ <returns>The category.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterOperations_.createSession_async(Glacier2.AMD_Router_createSession,System.String,System.String,Ice.Current)">
+ <summary>
+ Create a per-client session with the router.
+ If a
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="userId">The user id for which to check the password.
+
+ </param>
+ <param name="password">The password for the given user id.
+
+ </param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterOperations_.createSessionFromSecureConnection_async(Glacier2.AMD_Router_createSessionFromSecureConnection,Ice.Current)">
+ <summary>
+ Create a per-client session with the router.
+ The user is
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterOperations_.refreshSession(Ice.Current)">
+ <summary>
+ Keep the calling client's session with this router alive.
+ </summary>
+ <exception name="SessionNotExistException">Raised if no session exists
+ for the calling client.</exception>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterOperations_.destroySession(Ice.Current)">
+ <summary>
+ Destroy the calling client's session with this router.
+ </summary>
+ <exception name="SessionNotExistException">Raised if no session exists
+ for the calling client.</exception>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterOperations_.getSessionTimeout(Ice.Current)">
+ <summary>
+ Get the value of the session timeout.
+ Sessions are destroyed
+ if they see no activity for this period of time.
+
+ </summary>
+ <returns>The timeout (in seconds).</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.RouterOperationsNC_">
+ <summary>
+ The Glacier2 specialization of the Ice.Router
+ interface.
+ </summary>
+ </member>
+ <member name="M:Glacier2.RouterOperationsNC_.getCategoryForClient">
+ <summary>
+ This category must be used in the identities of all of the client's
+ callback objects.
+ This is necessary in order for the router to
+ forward callback requests to the intended client. If the Glacier2
+ server endpoints are not set, the returned category is an empty
+ string.
+
+ </summary>
+ <returns>The category.</returns>
+ </member>
+ <member name="M:Glacier2.RouterOperationsNC_.createSession_async(Glacier2.AMD_Router_createSession,System.String,System.String)">
+ <summary>
+ Create a per-client session with the router.
+ If a
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="userId">The user id for which to check the password.
+
+ </param>
+ <param name="password">The password for the given user id.
+
+ </param>
+ </member>
+ <member name="M:Glacier2.RouterOperationsNC_.createSessionFromSecureConnection_async(Glacier2.AMD_Router_createSessionFromSecureConnection)">
+ <summary>
+ Create a per-client session with the router.
+ The user is
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ </member>
+ <member name="M:Glacier2.RouterOperationsNC_.refreshSession">
+ <summary>
+ Keep the calling client's session with this router alive.
+ </summary>
+ <exception name="SessionNotExistException">Raised if no session exists
+ for the calling client.</exception>
+ </member>
+ <member name="M:Glacier2.RouterOperationsNC_.destroySession">
+ <summary>
+ Destroy the calling client's session with this router.
+ </summary>
+ <exception name="SessionNotExistException">Raised if no session exists
+ for the calling client.</exception>
+ </member>
+ <member name="M:Glacier2.RouterOperationsNC_.getSessionTimeout">
+ <summary>
+ Get the value of the session timeout.
+ Sessions are destroyed
+ if they see no activity for this period of time.
+
+ </summary>
+ <returns>The timeout (in seconds).</returns>
+ </member>
+ <member name="T:Glacier2.AdminOperations_">
+ <summary>
+ The Glacier2 administrative interface.
+ This must only be
+ accessible from inside the firewall.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AdminOperations_.shutdown(Ice.Current)">
+ <summary>
+ Shut down the Glacier2 router.
+ </summary>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.AdminOperationsNC_">
+ <summary>
+ The Glacier2 administrative interface.
+ This must only be
+ accessible from inside the firewall.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AdminOperationsNC_.shutdown">
+ <summary>
+ Shut down the Glacier2 router.
+ </summary>
+ </member>
+ <member name="T:Glacier2.RouterPrxHelper">
+ <summary>
+ The Glacier2 specialization of the Ice.Router
+ interface.
+ </summary>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.createSession(System.String,System.String)">
+ <summary>
+ Create a per-client session with the router.
+ If a
+ SessionManager has been installed, a proxy to a Session
+ object is returned to the client. Otherwise, null is returned
+ and only an internal session (i.e., not visible to the client)
+ is created.
+
+ If a session proxy is returned, it must be configured to route
+ through the router that created it. This will happen automatically
+ if the router is configured as the client's default router at the
+ time the session proxy is created in the client process, otherwise
+ the client must configure the session proxy explicitly.
+
+ </summary>
+ <returns>A proxy for the newly created session, or null if no
+ SessionManager has been installed.
+
+ </returns>
+ <param name="userId">The user id for which to check the password.
+
+ </param>
+ <param name="password">The password for the given user id.
+
+ </param>
+ <exception name="PermissionDeniedException">Raised if the password for
+ the given user id is not correct, or if the user is not allowed
+ access.
+
+ </exception>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.createSession(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a per-client session with the router.
+ If a
+ SessionManager has been installed, a proxy to a Session
+ object is returned to the client. Otherwise, null is returned
+ and only an internal session (i.e., not visible to the client)
+ is created.
+
+ If a session proxy is returned, it must be configured to route
+ through the router that created it. This will happen automatically
+ if the router is configured as the client's default router at the
+ time the session proxy is created in the client process, otherwise
+ the client must configure the session proxy explicitly.
+
+ </summary>
+ <returns>A proxy for the newly created session, or null if no
+ SessionManager has been installed.
+
+ </returns>
+ <param name="userId">The user id for which to check the password.
+
+ </param>
+ <param name="password">The password for the given user id.
+
+ </param>
+ <exception name="PermissionDeniedException">Raised if the password for
+ the given user id is not correct, or if the user is not allowed
+ access.
+
+ </exception>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.createSessionFromSecureConnection">
+ <summary>
+ Create a per-client session with the router.
+ The user is
+ authenticated through the SSL certificates that have been
+ associated with the connection. If a SessionManager has been
+ installed, a proxy to a Session object is returned to the
+ client. Otherwise, null is returned and only an internal
+ session (i.e., not visible to the client) is created.
+
+ If a session proxy is returned, it must be configured to route
+ through the router that created it. This will happen automatically
+ if the router is configured as the client's default router at the
+ time the session proxy is created in the client process, otherwise
+ the client must configure the session proxy explicitly.
+
+ </summary>
+ <returns>A proxy for the newly created session, or null if no
+ SessionManager has been installed.
+
+ </returns>
+ <exception name="PermissionDeniedException">Raised if the user cannot be
+ authenticated or if the user is not allowed access.
+
+ </exception>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.createSessionFromSecureConnection(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a per-client session with the router.
+ The user is
+ authenticated through the SSL certificates that have been
+ associated with the connection. If a SessionManager has been
+ installed, a proxy to a Session object is returned to the
+ client. Otherwise, null is returned and only an internal
+ session (i.e., not visible to the client) is created.
+
+ If a session proxy is returned, it must be configured to route
+ through the router that created it. This will happen automatically
+ if the router is configured as the client's default router at the
+ time the session proxy is created in the client process, otherwise
+ the client must configure the session proxy explicitly.
+
+ </summary>
+ <returns>A proxy for the newly created session, or null if no
+ SessionManager has been installed.
+
+ </returns>
+ <exception name="PermissionDeniedException">Raised if the user cannot be
+ authenticated or if the user is not allowed access.
+
+ </exception>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.destroySession">
+ <summary>
+ Destroy the calling client's session with this router.
+ </summary>
+ <exception name="SessionNotExistException">Raised if no session exists
+ for the calling client.</exception>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.destroySession(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the calling client's session with this router.
+ </summary>
+ <exception name="SessionNotExistException">Raised if no session exists
+ for the calling client.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getCategoryForClient">
+ <summary>
+ This category must be used in the identities of all of the client's
+ callback objects.
+ This is necessary in order for the router to
+ forward callback requests to the intended client. If the Glacier2
+ server endpoints are not set, the returned category is an empty
+ string.
+
+ </summary>
+ <returns>The category.</returns>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getCategoryForClient(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ This category must be used in the identities of all of the client's
+ callback objects.
+ This is necessary in order for the router to
+ forward callback requests to the intended client. If the Glacier2
+ server endpoints are not set, the returned category is an empty
+ string.
+
+ </summary>
+ <returns>The category.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getSessionTimeout">
+ <summary>
+ Get the value of the session timeout.
+ Sessions are destroyed
+ if they see no activity for this period of time.
+
+ </summary>
+ <returns>The timeout (in seconds).</returns>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getSessionTimeout(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the value of the session timeout.
+ Sessions are destroyed
+ if they see no activity for this period of time.
+
+ </summary>
+ <returns>The timeout (in seconds).</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.refreshSession">
+ <summary>
+ Keep the calling client's session with this router alive.
+ </summary>
+ <exception name="SessionNotExistException">Raised if no session exists
+ for the calling client.</exception>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.refreshSession(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Keep the calling client's session with this router alive.
+ </summary>
+ <exception name="SessionNotExistException">Raised if no session exists
+ for the calling client.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.addProxies(Ice.ObjectPrx[])">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <returns>Proxies discarded by the router.</returns>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.addProxies(Ice.ObjectPrx[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <returns>Proxies discarded by the router.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.addProxy(Ice.ObjectPrx)">
+ <summary>
+ Add new proxy information to the router's routing table.
+
+ <para>addProxy() is deprecated, use addProxies() instead.</para>
+
+ This operation is deprecated, and only used for old
+ Ice clients (older than version 3.1).
+
+ </summary>
+ <param name="proxy">The proxy to add.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.addProxy(Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+
+ <para>addProxy() is deprecated, use addProxies() instead.</para>
+
+ This operation is deprecated, and only used for old
+ Ice clients (older than version 3.1).
+
+ </summary>
+ <param name="proxy">The proxy to add.</param>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getClientProxy">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <returns>The router's client proxy.</returns>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getClientProxy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <returns>The router's client proxy.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getServerProxy">
+ <summary>
+ Get the router's server proxy, i.e., the proxy to use for
+ forwarding requests from the server to the router.
+ </summary>
+ <returns>The router's server proxy.</returns>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getServerProxy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's server proxy, i.e., the proxy to use for
+ forwarding requests from the server to the router.
+ </summary>
+ <returns>The router's server proxy.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_createSession(System.String,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a per-client session with the router.
+ If a
+ </summary>
+ <param name="userId">The user id for which to check the password.
+
+ </param>
+ <param name="password">The password for the given user id.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_createSessionFromSecureConnection(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a per-client session with the router.
+ The user is
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_destroySession(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the calling client's session with this router.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.destroySession_async(Glacier2.AMI_Router_destroySession)">
+ <summary>
+ Destroy the calling client's session with this router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.destroySession_async(Glacier2.AMI_Router_destroySession,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the calling client's session with this router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_getCategoryForClient(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ This category must be used in the identities of all of the client's
+ callback objects.
+ This is necessary in order for the router to
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_getSessionTimeout(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the value of the session timeout.
+ Sessions are destroyed
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_refreshSession(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Keep the calling client's session with this router alive.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.refreshSession_async(Glacier2.AMI_Router_refreshSession)">
+ <summary>
+ Keep the calling client's session with this router alive.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.refreshSession_async(Glacier2.AMI_Router_refreshSession,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Keep the calling client's session with this router alive.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_addProxies(Ice.ObjectPrx[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.addProxies_async(Ice.AMI_Router_addProxies,Ice.ObjectPrx[])">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.addProxies_async(Ice.AMI_Router_addProxies,Ice.ObjectPrx[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_addProxy(Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+ This operation is deprecated, and only used for old
+ </summary>
+ <param name="proxy">The proxy to add.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ <para>addProxy() is deprecated, use addProxies() instead.</para>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_getClientProxy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getClientProxy_async(Ice.AMI_Router_getClientProxy)">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.getClientProxy_async(Ice.AMI_Router_getClientProxy,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.RouterPrxHelper.begin_getServerProxy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's server proxy, i.e., the proxy to use for
+ forwarding requests from the server to the router.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.AdminPrxHelper">
+ <summary>
+ The Glacier2 administrative interface.
+ This must only be
+ accessible from inside the firewall.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AdminPrxHelper.shutdown">
+ <summary>
+ Shut down the Glacier2 router.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AdminPrxHelper.shutdown(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Shut down the Glacier2 router.
+ </summary>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.AdminPrxHelper.begin_shutdown(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Shut down the Glacier2 router.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.AMD_Router_createSession">
+ <summary>
+ Create a per-client session with the router.
+ If a
+ SessionManager has been installed, a proxy to a Session
+ object is returned to the client. Otherwise, null is returned
+ and only an internal session (i.e., not visible to the client)
+ is created.
+
+ If a session proxy is returned, it must be configured to route
+ through the router that created it. This will happen automatically
+ if the router is configured as the client's default router at the
+ time the session proxy is created in the client process, otherwise
+ the client must configure the session proxy explicitly.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMD_Router_createSession.ice_response(Glacier2.SessionPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) A proxy for the newly created session, or null if no
+ SessionManager has been installed.
+
+ </param>
+ </member>
+ <member name="T:Glacier2.AMD_Router_createSessionFromSecureConnection">
+ <summary>
+ Create a per-client session with the router.
+ The user is
+ authenticated through the SSL certificates that have been
+ associated with the connection. If a SessionManager has been
+ installed, a proxy to a Session object is returned to the
+ client. Otherwise, null is returned and only an internal
+ session (i.e., not visible to the client) is created.
+
+ If a session proxy is returned, it must be configured to route
+ through the router that created it. This will happen automatically
+ if the router is configured as the client's default router at the
+ time the session proxy is created in the client process, otherwise
+ the client must configure the session proxy explicitly.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMD_Router_createSessionFromSecureConnection.ice_response(Glacier2.SessionPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) A proxy for the newly created session, or null if no
+ SessionManager has been installed.
+
+ </param>
+ </member>
+ <member name="T:Glacier2.AMI_Router_destroySession">
+ <summary>
+ Destroy the calling client's session with this router.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMI_Router_destroySession.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Glacier2.CannotCreateSessionException">
+ <summary>
+ This exception is raised if an attempt to create a new session
+ failed.
+ </summary>
+ </member>
+ <member name="T:Glacier2.SessionOperations_">
+ <summary>
+ A client-visible session object, which is tied to the lifecycle of
+ a Router.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionOperations_.destroy(Ice.Current)">
+ <summary>
+ Destroy the session.
+ This is called automatically when the
+ Router is destroyed.
+ </summary>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SessionOperationsNC_">
+ <summary>
+ A client-visible session object, which is tied to the lifecycle of
+ a Router.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionOperationsNC_.destroy">
+ <summary>
+ Destroy the session.
+ This is called automatically when the
+ Router is destroyed.
+ </summary>
+ </member>
+ <member name="T:Glacier2.StringSetOperations_">
+ <summary>
+ An object for managing the set of identity constraints for specific
+ parts of object identity on a
+ Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.StringSetOperations_.add(System.String[],Ice.Current)">
+ <summary>
+ Add a sequence of strings to this set of constraints.
+ Order is
+ not preserved and duplicates are implicitly removed.
+
+ </summary>
+ <param name="additions">The sequence of strings to be added.</param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.StringSetOperations_.remove(System.String[],Ice.Current)">
+ <summary>
+ Remove a sequence of strings from this set of constraints.
+ No
+ errors are returned if an entry is not found.
+
+ </summary>
+ <param name="deletions">The sequence of strings to be removed.</param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.StringSetOperations_.get(Ice.Current)">
+ <summary>
+ Returns a sequence of strings describing the constraints in this
+ set.
+ </summary>
+ <returns>The sequence of strings for this set.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.StringSetOperationsNC_">
+ <summary>
+ An object for managing the set of identity constraints for specific
+ parts of object identity on a
+ Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.StringSetOperationsNC_.add(System.String[])">
+ <summary>
+ Add a sequence of strings to this set of constraints.
+ Order is
+ not preserved and duplicates are implicitly removed.
+
+ </summary>
+ <param name="additions">The sequence of strings to be added.</param>
+ </member>
+ <member name="M:Glacier2.StringSetOperationsNC_.remove(System.String[])">
+ <summary>
+ Remove a sequence of strings from this set of constraints.
+ No
+ errors are returned if an entry is not found.
+
+ </summary>
+ <param name="deletions">The sequence of strings to be removed.</param>
+ </member>
+ <member name="M:Glacier2.StringSetOperationsNC_.get">
+ <summary>
+ Returns a sequence of strings describing the constraints in this
+ set.
+ </summary>
+ <returns>The sequence of strings for this set.</returns>
+ </member>
+ <member name="T:Glacier2.IdentitySetOperations_">
+ <summary>
+ An object for managing the set of object identity constraints on a
+ Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.IdentitySetOperations_.add(Ice.Identity[],Ice.Current)">
+ <summary>
+ Add a sequence of Ice identities to this set of constraints.
+ Order is
+ not preserved and duplicates are implicitly removed.
+
+ </summary>
+ <param name="additions">The sequence of Ice identities to be added.</param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetOperations_.remove(Ice.Identity[],Ice.Current)">
+ <summary>
+ Remove a sequence of identities from this set of constraints.
+ No
+ errors are returned if an entry is not found.
+
+ </summary>
+ <param name="deletions">The sequence of Ice identities to be removed.</param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetOperations_.get(Ice.Current)">
+ <summary>
+ Returns a sequence of identities describing the constraints in this
+ set.
+ </summary>
+ <returns>The sequence of Ice identities for this set.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.IdentitySetOperationsNC_">
+ <summary>
+ An object for managing the set of object identity constraints on a
+ Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.IdentitySetOperationsNC_.add(Ice.Identity[])">
+ <summary>
+ Add a sequence of Ice identities to this set of constraints.
+ Order is
+ not preserved and duplicates are implicitly removed.
+
+ </summary>
+ <param name="additions">The sequence of Ice identities to be added.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetOperationsNC_.remove(Ice.Identity[])">
+ <summary>
+ Remove a sequence of identities from this set of constraints.
+ No
+ errors are returned if an entry is not found.
+
+ </summary>
+ <param name="deletions">The sequence of Ice identities to be removed.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetOperationsNC_.get">
+ <summary>
+ Returns a sequence of identities describing the constraints in this
+ set.
+ </summary>
+ <returns>The sequence of Ice identities for this set.</returns>
+ </member>
+ <member name="T:Glacier2.SessionControlOperations_">
+ <summary>
+ An administrative session control object, which is tied to the
+ lifecycle of a Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionControlOperations_.categories(Ice.Current)">
+ <summary>
+ Access the object that manages the allowable categories
+ for object identities for this session.
+ </summary>
+ <returns>A StringSet object.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlOperations_.adapterIds(Ice.Current)">
+ <summary>
+ Access the object that manages the allowable adapter identities
+ for objects for this session.
+ </summary>
+ <returns>A StringSet object.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlOperations_.identities(Ice.Current)">
+ <summary>
+ Access the object that manages the allowable object identities
+ for this session.
+ </summary>
+ <returns>An IdentitySet object.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlOperations_.getSessionTimeout(Ice.Current)">
+ <summary>
+ Get the session timeout.
+ </summary>
+ <returns>The timeout.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlOperations_.destroy(Ice.Current)">
+ <summary>
+ Destroy the associated session.
+ </summary>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SessionControlOperationsNC_">
+ <summary>
+ An administrative session control object, which is tied to the
+ lifecycle of a Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionControlOperationsNC_.categories">
+ <summary>
+ Access the object that manages the allowable categories
+ for object identities for this session.
+ </summary>
+ <returns>A StringSet object.</returns>
+ </member>
+ <member name="M:Glacier2.SessionControlOperationsNC_.adapterIds">
+ <summary>
+ Access the object that manages the allowable adapter identities
+ for objects for this session.
+ </summary>
+ <returns>A StringSet object.</returns>
+ </member>
+ <member name="M:Glacier2.SessionControlOperationsNC_.identities">
+ <summary>
+ Access the object that manages the allowable object identities
+ for this session.
+ </summary>
+ <returns>An IdentitySet object.</returns>
+ </member>
+ <member name="M:Glacier2.SessionControlOperationsNC_.getSessionTimeout">
+ <summary>
+ Get the session timeout.
+ </summary>
+ <returns>The timeout.</returns>
+ </member>
+ <member name="M:Glacier2.SessionControlOperationsNC_.destroy">
+ <summary>
+ Destroy the associated session.
+ </summary>
+ </member>
+ <member name="T:Glacier2.SessionManagerOperations_">
+ <summary>
+ The session manager for username/password authenticated users that
+ is responsible for managing Session objects.
+ New session objects
+ are created by the Router object calling on an application-provided
+ session manager. If no session manager is provided by the application,
+ no client-visible sessions are passed to the client.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionManagerOperations_.create(System.String,Glacier2.SessionControlPrx,Ice.Current)">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="userId">The user id for the session.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <returns>A proxy to the newly created session.
+
+ </returns>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SessionManagerOperationsNC_">
+ <summary>
+ The session manager for username/password authenticated users that
+ is responsible for managing Session objects.
+ New session objects
+ are created by the Router object calling on an application-provided
+ session manager. If no session manager is provided by the application,
+ no client-visible sessions are passed to the client.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionManagerOperationsNC_.create(System.String,Glacier2.SessionControlPrx)">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="userId">The user id for the session.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <returns>A proxy to the newly created session.
+
+ </returns>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ </member>
+ <member name="T:Glacier2.SSLSessionManagerOperations_">
+ <summary>
+ The session manager for SSL authenticated users that is
+ responsible for managing Session objects.
+ New session objects are
+ created by the Router object calling on an application-provided
+ session manager. If no session manager is provided by the
+ application, no client-visible sessions are passed to the client.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SSLSessionManagerOperations_.create(Glacier2.SSLInfo,Glacier2.SessionControlPrx,Ice.Current)">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="info">The SSL info.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <returns>A proxy to the newly created session.
+
+ </returns>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SSLSessionManagerOperationsNC_">
+ <summary>
+ The session manager for SSL authenticated users that is
+ responsible for managing Session objects.
+ New session objects are
+ created by the Router object calling on an application-provided
+ session manager. If no session manager is provided by the
+ application, no client-visible sessions are passed to the client.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SSLSessionManagerOperationsNC_.create(Glacier2.SSLInfo,Glacier2.SessionControlPrx)">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="info">The SSL info.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <returns>A proxy to the newly created session.
+
+ </returns>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ </member>
+ <member name="T:Glacier2.SessionPrxHelper">
+ <summary>
+ A client-visible session object, which is tied to the lifecycle of
+ a Router.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionPrxHelper.destroy">
+ <summary>
+ Destroy the session.
+ This is called automatically when the
+ Router is destroyed.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionPrxHelper.destroy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the session.
+ This is called automatically when the
+ Router is destroyed.
+ </summary>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionPrxHelper.begin_destroy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the session.
+ This is called automatically when the
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionPrxHelper.destroy_async(Glacier2.AMI_Session_destroy)">
+ <summary>
+ Destroy the session.
+ This is called automatically when the
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ </member>
+ <member name="M:Glacier2.SessionPrxHelper.destroy_async(Glacier2.AMI_Session_destroy,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the session.
+ This is called automatically when the
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.StringSetPrxHelper">
+ <summary>
+ An object for managing the set of identity constraints for specific
+ parts of object identity on a
+ Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.add(System.String[])">
+ <summary>
+ Add a sequence of strings to this set of constraints.
+ Order is
+ not preserved and duplicates are implicitly removed.
+
+ </summary>
+ <param name="additions">The sequence of strings to be added.</param>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.add(System.String[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add a sequence of strings to this set of constraints.
+ Order is
+ not preserved and duplicates are implicitly removed.
+
+ </summary>
+ <param name="additions">The sequence of strings to be added.</param>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.get">
+ <summary>
+ Returns a sequence of strings describing the constraints in this
+ set.
+ </summary>
+ <returns>The sequence of strings for this set.</returns>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.get(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns a sequence of strings describing the constraints in this
+ set.
+ </summary>
+ <returns>The sequence of strings for this set.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.remove(System.String[])">
+ <summary>
+ Remove a sequence of strings from this set of constraints.
+ No
+ errors are returned if an entry is not found.
+
+ </summary>
+ <param name="deletions">The sequence of strings to be removed.</param>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.remove(System.String[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Remove a sequence of strings from this set of constraints.
+ No
+ errors are returned if an entry is not found.
+
+ </summary>
+ <param name="deletions">The sequence of strings to be removed.</param>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.begin_add(System.String[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add a sequence of strings to this set of constraints.
+ Order is
+ </summary>
+ <param name="additions">The sequence of strings to be added.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.begin_get(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns a sequence of strings describing the constraints in this
+ set.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.StringSetPrxHelper.begin_remove(System.String[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Remove a sequence of strings from this set of constraints.
+ No
+ </summary>
+ <param name="deletions">The sequence of strings to be removed.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.IdentitySetPrxHelper">
+ <summary>
+ An object for managing the set of object identity constraints on a
+ Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.add(Ice.Identity[])">
+ <summary>
+ Add a sequence of Ice identities to this set of constraints.
+ Order is
+ not preserved and duplicates are implicitly removed.
+
+ </summary>
+ <param name="additions">The sequence of Ice identities to be added.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.add(Ice.Identity[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add a sequence of Ice identities to this set of constraints.
+ Order is
+ not preserved and duplicates are implicitly removed.
+
+ </summary>
+ <param name="additions">The sequence of Ice identities to be added.</param>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.get">
+ <summary>
+ Returns a sequence of identities describing the constraints in this
+ set.
+ </summary>
+ <returns>The sequence of Ice identities for this set.</returns>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.get(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns a sequence of identities describing the constraints in this
+ set.
+ </summary>
+ <returns>The sequence of Ice identities for this set.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.remove(Ice.Identity[])">
+ <summary>
+ Remove a sequence of identities from this set of constraints.
+ No
+ errors are returned if an entry is not found.
+
+ </summary>
+ <param name="deletions">The sequence of Ice identities to be removed.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.remove(Ice.Identity[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Remove a sequence of identities from this set of constraints.
+ No
+ errors are returned if an entry is not found.
+
+ </summary>
+ <param name="deletions">The sequence of Ice identities to be removed.</param>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.begin_add(Ice.Identity[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add a sequence of Ice identities to this set of constraints.
+ Order is
+ </summary>
+ <param name="additions">The sequence of Ice identities to be added.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.begin_get(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns a sequence of identities describing the constraints in this
+ set.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.IdentitySetPrxHelper.begin_remove(Ice.Identity[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Remove a sequence of identities from this set of constraints.
+ No
+ </summary>
+ <param name="deletions">The sequence of Ice identities to be removed.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SessionControlPrxHelper">
+ <summary>
+ An administrative session control object, which is tied to the
+ lifecycle of a Session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.adapterIds">
+ <summary>
+ Access the object that manages the allowable adapter identities
+ for objects for this session.
+ </summary>
+ <returns>A StringSet object.</returns>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.adapterIds(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Access the object that manages the allowable adapter identities
+ for objects for this session.
+ </summary>
+ <returns>A StringSet object.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.categories">
+ <summary>
+ Access the object that manages the allowable categories
+ for object identities for this session.
+ </summary>
+ <returns>A StringSet object.</returns>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.categories(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Access the object that manages the allowable categories
+ for object identities for this session.
+ </summary>
+ <returns>A StringSet object.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.destroy">
+ <summary>
+ Destroy the associated session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.destroy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the associated session.
+ </summary>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.getSessionTimeout">
+ <summary>
+ Get the session timeout.
+ </summary>
+ <returns>The timeout.</returns>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.getSessionTimeout(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the session timeout.
+ </summary>
+ <returns>The timeout.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.identities">
+ <summary>
+ Access the object that manages the allowable object identities
+ for this session.
+ </summary>
+ <returns>An IdentitySet object.</returns>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.identities(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Access the object that manages the allowable object identities
+ for this session.
+ </summary>
+ <returns>An IdentitySet object.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.begin_adapterIds(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Access the object that manages the allowable adapter identities
+ for objects for this session.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.begin_categories(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Access the object that manages the allowable categories
+ for object identities for this session.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.begin_destroy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the associated session.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.destroy_async(Glacier2.AMI_SessionControl_destroy)">
+ <summary>
+ Destroy the associated session.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.destroy_async(Glacier2.AMI_SessionControl_destroy,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Destroy the associated session.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.begin_getSessionTimeout(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the session timeout.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionControlPrxHelper.begin_identities(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Access the object that manages the allowable object identities
+ for this session.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SessionManagerPrxHelper">
+ <summary>
+ The session manager for username/password authenticated users that
+ is responsible for managing Session objects.
+ New session objects
+ are created by the Router object calling on an application-provided
+ session manager. If no session manager is provided by the application,
+ no client-visible sessions are passed to the client.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SessionManagerPrxHelper.create(System.String,Glacier2.SessionControlPrx)">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="userId">The user id for the session.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <returns>A proxy to the newly created session.
+
+ </returns>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ </member>
+ <member name="M:Glacier2.SessionManagerPrxHelper.create(System.String,Glacier2.SessionControlPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="userId">The user id for the session.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <returns>A proxy to the newly created session.
+
+ </returns>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionManagerPrxHelper.begin_create(System.String,Glacier2.SessionControlPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="userId">The user id for the session.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SessionManagerPrxHelper.create_async(Glacier2.AMI_SessionManager_create,System.String,Glacier2.SessionControlPrx)">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="userId">The user id for the session.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ </member>
+ <member name="M:Glacier2.SessionManagerPrxHelper.create_async(Glacier2.AMI_SessionManager_create,System.String,Glacier2.SessionControlPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="userId">The user id for the session.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.SSLSessionManagerPrxHelper">
+ <summary>
+ The session manager for SSL authenticated users that is
+ responsible for managing Session objects.
+ New session objects are
+ created by the Router object calling on an application-provided
+ session manager. If no session manager is provided by the
+ application, no client-visible sessions are passed to the client.
+
+ </summary>
+ </member>
+ <member name="M:Glacier2.SSLSessionManagerPrxHelper.create(Glacier2.SSLInfo,Glacier2.SessionControlPrx)">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="info">The SSL info.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <returns>A proxy to the newly created session.
+
+ </returns>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ </member>
+ <member name="M:Glacier2.SSLSessionManagerPrxHelper.create(Glacier2.SSLInfo,Glacier2.SessionControlPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="info">The SSL info.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <returns>A proxy to the newly created session.
+
+ </returns>
+ <exception name="CannotCreateSessionException">Raised if the session
+ cannot be created.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SSLSessionManagerPrxHelper.begin_create(Glacier2.SSLInfo,Glacier2.SessionControlPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="info">The SSL info.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Glacier2.SSLSessionManagerPrxHelper.create_async(Glacier2.AMI_SSLSessionManager_create,Glacier2.SSLInfo,Glacier2.SessionControlPrx)">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="info">The SSL info.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ </member>
+ <member name="M:Glacier2.SSLSessionManagerPrxHelper.create_async(Glacier2.AMI_SSLSessionManager_create,Glacier2.SSLInfo,Glacier2.SessionControlPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Create a new session.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="info">The SSL info.
+
+ </param>
+ <param name="control">A proxy to the session control object.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Glacier2.AMI_Session_destroy">
+ <summary>
+ Destroy the session.
+ This is called automatically when the
+ Router is destroyed.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMI_Session_destroy.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Glacier2.AMI_SessionControl_destroy">
+ <summary>
+ Destroy the associated session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMI_SessionControl_destroy.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Glacier2.AMI_SessionManager_create">
+ <summary>
+ Create a new session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMI_SessionManager_create.ice_response(Glacier2.SessionPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) A proxy to the newly created session.
+
+ </param>
+ </member>
+ <member name="T:Glacier2.AMI_SSLSessionManager_create">
+ <summary>
+ Create a new session.
+ </summary>
+ </member>
+ <member name="M:Glacier2.AMI_SSLSessionManager_create.ice_response(Glacier2.SessionPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) A proxy to the newly created session.
+
+ </param>
+ </member>
+ </members>
+</doc>
diff --git a/cs/demo/Glacier2/sl/chat/bin/Ice.xml b/cs/demo/Glacier2/sl/chat/bin/Ice.xml
new file mode 100644
index 00000000000..6ca223cc560
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/bin/Ice.xml
@@ -0,0 +1,5815 @@
+<?xml version="1.0"?>
+<doc>
+ <assembly>
+ <name>Ice</name>
+ </assembly>
+ <members>
+ <member name="T:Ice.AMDCallback">
+ <summary>
+ AMDCallback is the interface from which all AMD callbacks are derived.
+ </summary>
+ </member>
+ <member name="M:Ice.AMDCallback.ice_exception(System.Exception)">
+ <summary>
+ Indicates to the Ice run time that an operation completed
+ with a run-time exception.
+ </summary>
+ <param name="ex">The encoded Ice run-time exception. Note that, if ex
+ is a user exception, the caller receives UnknownUserException.
+ Use ice_response to raise user exceptions.</param>
+ </member>
+ <member name="M:Ice.ObjectFactory.create(System.String)">
+ <summary>
+ Create a new object for a given object type.
+ The type is the
+ absolute Slice type id, i.e., the id relative to the
+ unnamed top-level Slice module. For example, the absolute
+ Slice type id for interfaces of type Bar in the module
+ Foo is ::Foo::Bar.
+
+ The leading "::" is required.
+
+ </summary>
+ <param name="type">The object type.
+
+ </param>
+ <returns>The object created for the given type, or nil if the
+ factory is unable to create the object.</returns>
+ </member>
+ <member name="M:Ice.ObjectFactory.destroy">
+ <summary>
+ Called when the factory is removed from the communicator, or if
+ the communicator is destroyed.
+ </summary>
+ </member>
+ <member name="M:Ice.Communicator.destroy">
+ <summary>
+ Destroy the communicator.
+ This operation calls shutdown
+ implicitly. Calling destroy cleans up memory, and shuts down
+ this communicator's client functionality and destroys all object
+ adapters. Subsequent calls to destroy are ignored.
+
+ </summary>
+ </member>
+ <member name="M:Ice.Communicator.shutdown">
+ <summary>
+ Shuts down this communicator's server functionality, which
+ includes the deactivation of all object adapters.
+ (Attempts to use
+ a deactivated object adapter raise ObjectAdapterDeactivatedException.)
+ Subsequent calls to shutdown are ignored.
+
+ After shutdown returns, no new requests are
+ processed. However, requests that have been started before
+ shutdown was called might still be active. You can use
+ waitForShutdown to wait for the completion of all
+ requests.
+
+ </summary>
+ </member>
+ <member name="M:Ice.Communicator.waitForShutdown">
+ <summary>
+ Wait until the application has called shutdown (or destroy).
+ On the server side, this operation blocks the calling thread
+ until all currently-executing operations have completed.
+ On the client side, the operation simply block until another
+ thread has called shutdown or destroy.
+
+ A typical use of this operation is to call it
+ from the main thread, which then waits until some other thread
+ calls shutdown. After shut-down is complete, the main thread
+ returns and can do some cleanup work before it finally calls
+ destroy to shut down the client functionality, and then
+ exits the application.
+
+ </summary>
+ </member>
+ <member name="M:Ice.Communicator.isShutdown">
+ <summary>
+ Check whether communicator has been shut down.
+ </summary>
+ <returns>True if the communicator has been shut down; false otherwise.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.stringToProxy(System.String)">
+ <summary>
+ Convert a stringified proxy into a proxy.
+ For example,
+ MyCategory/MyObject:tcp -h some_host -p
+ 10000 creates a proxy that refers to the Ice object
+ having an identity with a name "MyObject" and a category
+ "MyCategory", with the server running on host "some_host", port
+ 10000. If the stringified proxy does not parse correctly, the
+ operation throws one of ProxyParseException,
+ EndpointParseException, or IdentityParseException.
+ An appendix in the Ice manual provides a detailed description
+ of the syntax supported by stringified proxies.
+
+ </summary>
+ <param name="str">The stringified proxy to convert into a proxy.
+
+ </param>
+ <returns>The proxy, or nil if str is an empty string.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.proxyToString(Ice.ObjectPrx)">
+ <summary>
+ Convert a proxy into a string.
+ </summary>
+ <param name="obj">The proxy to convert into a stringified proxy.
+
+ </param>
+ <returns>The stringified proxy, or an empty string if
+ obj is nil.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.propertyToProxy(System.String)">
+ <summary>
+ Convert a set of proxy properties into a proxy.
+ The "base"
+ name supplied in the property argument refers to a
+ property containing a stringified proxy, such as
+ MyProxy=id:tcp -h localhost -p 10000. Additional
+ properties configure local settings for the proxy, such as
+ MyProxy.PreferSecure=1. The "Properties"
+ appendix in the Ice manual describes each of the supported
+ proxy properties.
+
+ </summary>
+ <param name="property">The base property name.
+
+ </param>
+ <returns>The proxy.</returns>
+ </member>
+ <member name="M:Ice.Communicator.proxyToProperty(Ice.ObjectPrx,System.String)">
+ <summary>
+ Convert a proxy to a set of proxy properties.
+ </summary>
+ <param name="proxy">The proxy.
+
+ </param>
+ <param name="property">The base property name.
+
+ </param>
+ <returns>The property set.</returns>
+ </member>
+ <member name="M:Ice.Communicator.stringToIdentity(System.String)">
+ <summary>
+ Convert a string into an identity.
+ If the string does not parse
+ correctly, the operation throws IdentityParseException.
+
+ </summary>
+ <param name="str">The string to convert into an identity.
+
+ </param>
+ <returns>The identity.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.identityToString(Ice.Identity)">
+ <summary>
+ Convert an identity into a string.
+ </summary>
+ <param name="ident">The identity to convert into a string.
+
+ </param>
+ <returns>The "stringified" identity.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.createObjectAdapter(System.String)">
+ <summary>
+ Create a new object adapter.
+ The endpoints for the object
+ adapter are taken from the property name.Endpoints.
+
+ It is legal to create an object adapter with the empty string as
+ its name. Such an object adapter is accessible via bidirectional
+ connections or by collocated invocations that originate from the
+ same communicator as is used by the adapter.
+
+ Attempts to create a named object adapter for which no configuration
+ can be found raise InitializationException.
+
+ </summary>
+ <param name="name">The object adapter name.
+
+ </param>
+ <returns>The new object adapter.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.createObjectAdapterWithEndpoints(System.String,System.String)">
+ <summary>
+ Create a new object adapter with endpoints.
+ This operation sets
+ the property name.Endpoints,
+ and then calls createObjectAdapter. It is provided as a
+ convenience function.
+
+ Calling this operation with an empty name will result in a
+ UUID being generated for the name.
+
+ </summary>
+ <param name="name">The object adapter name.
+
+ </param>
+ <param name="endpoints">The endpoints for the object adapter.
+
+ </param>
+ <returns>The new object adapter.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.createObjectAdapterWithRouter(System.String,Ice.RouterPrx)">
+ <summary>
+ Create a new object adapter with a router.
+ This operation
+ creates a routed object adapter.
+
+ Calling this operation with an empty name will result in a
+ UUID being generated for the name.
+
+ </summary>
+ <param name="name">The object adapter name.
+
+ </param>
+ <param name="rtr">The router.
+
+ </param>
+ <returns>The new object adapter.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.addObjectFactory(Ice.ObjectFactory,System.String)">
+ <summary>
+ Add a servant factory to this communicator.
+ Installing a
+ factory with an id for which a factory is already registered
+ throws AlreadyRegisteredException.
+
+ When unmarshaling an Ice object, the Ice run-time reads the
+ most-derived type id off the wire and attempts to create an
+ instance of the type using a factory. If no instance is created,
+ either because no factory was found, or because all factories
+ returned nil, the object is sliced to the next most-derived type
+ and the process repeats. If no factory is found that can create an
+ instance, the Ice run-time throws NoObjectFactoryException.
+
+ The following order is used to locate a factory for a type:
+
+
+
+ The Ice run-time looks for a factory registered
+ specifically for the type.
+
+ If no instance has been created, the Ice run-time looks
+ for the default factory, which is registered with an empty type id.
+
+
+ If no instance has been created by any of the preceding
+ steps, the Ice run-time looks for a factory that may have been
+ statically generated by the language mapping for non-abstract classes.
+
+
+
+
+ </summary>
+ <param name="factory">The factory to add.
+
+ </param>
+ <param name="id">The type id for which the factory can create instances, or
+ an empty string for the default factory.
+
+ </param>
+ </member>
+ <member name="M:Ice.Communicator.findObjectFactory(System.String)">
+ <summary>
+ Find a servant factory registered with this communicator.
+ </summary>
+ <param name="id">The type id for which the factory can create instances,
+ or an empty string for the default factory.
+
+ </param>
+ <returns>The servant factory, or null if no servant factory was
+ found for the given id.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.getImplicitContext">
+ <summary>
+ Get the implicit context associated with this communicator.
+ </summary>
+ <returns>The implicit context associated with this communicator;
+ returns null when the property Ice.ImplicitContext is not set
+ or is set to None.</returns>
+ </member>
+ <member name="M:Ice.Communicator.getProperties">
+ <summary>
+ Get the properties for this communicator.
+ </summary>
+ <returns>This communicator's properties.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.getLogger">
+ <summary>
+ Get the logger for this communicator.
+ </summary>
+ <returns>This communicator's logger.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.getStats">
+ <summary>
+ Get the statistics callback object for this communicator.
+ </summary>
+ <returns>This communicator's statistics callback object.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.getDefaultRouter">
+ <summary>
+ Get the default router this communicator.
+ </summary>
+ <returns>The default router for this communicator.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.setDefaultRouter(Ice.RouterPrx)">
+ <summary>
+ Set a default router for this communicator.
+ All newly
+ created proxies will use this default router. To disable the
+ default router, null can be used. Note that this
+ operation has no effect on existing proxies.
+
+ You can also set a router for an individual proxy
+ by calling the operation ice_router on the proxy.
+
+ </summary>
+ <param name="rtr">The default router to use for this communicator.
+
+ </param>
+ </member>
+ <member name="M:Ice.Communicator.getDefaultLocator">
+ <summary>
+ Get the default locator this communicator.
+ </summary>
+ <returns>The default locator for this communicator.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.setDefaultLocator(Ice.LocatorPrx)">
+ <summary>
+ Set a default Ice locator for this communicator.
+ All newly
+ created proxy and object adapters will use this default
+ locator. To disable the default locator, null can be used.
+ Note that this operation has no effect on existing proxies or
+ object adapters.
+
+ You can also set a locator for an individual proxy
+ by calling the operation ice_locator on the proxy, or for an
+ object adapter by calling the operation setLocator on the
+ object adapter.
+
+ </summary>
+ <param name="loc">The default locator to use for this communicator.
+
+ </param>
+ </member>
+ <member name="M:Ice.Communicator.getPluginManager">
+ <summary>
+ Get the plug-in manager for this communicator.
+ </summary>
+ <returns>This communicator's plug-in manager.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Communicator.flushBatchRequests">
+ <summary>
+ Flush any pending batch requests for this communicator.
+ This causes all batch requests that were sent via proxies
+ obtained via this communicator to be sent to the server.
+ </summary>
+ </member>
+ <member name="M:Ice.Communicator.getAdmin">
+ <summary>
+ Get a proxy to the main facet of the Admin object.
+ When Ice.Admin.DelayCreation
+ is greater than 0, it is necessary to call getAdmin() after the communicator is
+ initialized to create the Admin object. Otherwise, the Admin object is created
+ automatically after all the plug-ins are initialized.
+
+ </summary>
+ <returns>The main ("") facet of the Admin object; a null proxy if no
+ Admin object is configured.</returns>
+ </member>
+ <member name="M:Ice.Communicator.addAdminFacet(Ice.Object,System.String)">
+ <summary>
+ Add a new facet to the Admin object.
+ Adding a servant with a facet that is already registered
+ throws AlreadyRegisteredException.
+
+ </summary>
+ <param name="servant">The servant that implements the new Admin facet.
+ </param>
+ <param name="facet">The new Admin facet.</param>
+ </member>
+ <member name="M:Ice.Communicator.removeAdminFacet(System.String)">
+ <summary>
+ Remove the following facet to the Admin object.
+ Removing a facet that was not previously registered throws
+ NotRegisteredException.
+
+ </summary>
+ <param name="facet">The Admin facet.
+ </param>
+ <returns>The servant associated with this Admin facet</returns>
+ </member>
+ <member name="T:Ice.AMI_Router_getClientProxy">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ </member>
+ <member name="M:Ice.AMICallbackBase.ice_exception(Ice.Exception)">
+ <summary>
+ The Ice run time calls ice_exception when an asynchronous operation invocation
+ raises an Ice run-time exception.
+ </summary>
+ <param name="ex">The encoded Ice run-time exception raised by the operation.</param>
+ </member>
+ <member name="M:Ice.AMI_Router_getClientProxy.ice_response(Ice.ObjectPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) The router's client proxy.</param>
+ </member>
+ <member name="T:Ice.AMI_Router_addProxies">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_Router_addProxies.ice_response(Ice.ObjectPrx[])">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) Proxies discarded by the router.</param>
+ </member>
+ <member name="M:Ice.Connection.close(System.Boolean)">
+ <summary>
+ Close a connection, either gracefully or forcefully.
+ If a
+ connection is closed forcefully, it closes immediately, without
+ sending the relevant close connection protocol messages to the
+ peer and waiting for the peer to acknowledge these protocol
+ messages.
+
+ </summary>
+ <param name="force">If true, close forcefully. Otherwise the
+ connection is closed gracefully.</param>
+ </member>
+ <member name="M:Ice.Connection.createProxy(Ice.Identity)">
+ <summary>
+ Create a special proxy that always uses this connection.
+ This
+ can be used for callbacks from a server to a client if the
+ server cannot directly establish a connection to the client,
+ for example because of firewalls. In this case, the server
+ would create a proxy using an already established connection
+ from the client.
+
+ </summary>
+ <param name="id">The identity for which a proxy is to be created.
+
+ </param>
+ <returns>A proxy that matches the given identity and uses this
+ connection.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Connection.setAdapter(Ice.ObjectAdapter)">
+ <summary>
+ Explicitly set an object adapter that dispatches requests that
+ are received over this connection.
+ A client can invoke an
+ operation on a server using a proxy, and then set an object
+ adapter for the outgoing connection that is used by the proxy
+ in order to receive callbacks. This is useful if the server
+ cannot establish a connection back to the client, for example
+ because of firewalls.
+
+ </summary>
+ <param name="adapter">The object adapter that should be used by this
+ connection to dispatch requests. The object adapter must be
+ activated. When the object adapter is deactivated, it is
+ automatically removed from the connection.
+
+ </param>
+ </member>
+ <member name="M:Ice.Connection.getAdapter">
+ <summary>
+ Get the object adapter that dispatches requests for this
+ connection.
+ </summary>
+ <returns>The object adapter that dispatches requests for the
+ connection, or null if no adapter is set.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Connection.getEndpoint">
+ <summary>
+ Get the endpoint from which the connection was created.
+ </summary>
+ <returns>The endpoint from which the connection was created.</returns>
+ </member>
+ <member name="M:Ice.Connection.flushBatchRequests">
+ <summary>
+ Flush any pending batch requests for this connection.
+ This
+ causes all batch requests that were sent via proxies that use
+ this connection to be sent to the server.
+ </summary>
+ </member>
+ <member name="M:Ice.Connection.type">
+ <summary>
+ Return the connection type.
+ This corresponds to the endpoint
+ type, i.e., "tcp", "udp", etc.
+
+ </summary>
+ <returns>The type of the connection.</returns>
+ </member>
+ <member name="M:Ice.Connection.timeout">
+ <summary>
+ Get the timeout for the connection.
+ </summary>
+ <returns>The connection's timeout.</returns>
+ </member>
+ <member name="M:Ice.Connection.ice_toString_">
+ <summary>
+ Return a description of the connection as human readable text,
+ suitable for logging or error messages.
+ </summary>
+ <returns>The description of the connection as human readable
+ text.</returns>
+ </member>
+ <member name="M:Ice.Connection.getInfo">
+ <summary>
+ Returns the connection information.
+ </summary>
+ <returns>The connection information.</returns>
+ </member>
+ <member name="T:Ice.Request">
+ <summary>
+ Interface for incoming requests.
+ </summary>
+ </member>
+ <member name="M:Ice.Request.isCollocated">
+ <summary>
+ Returns whether this request is collocated.
+ </summary>
+ <returns>True if the invocation was made via proxy created by the same communicator
+ that hosts the target's object adapter; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.Request.getCurrent">
+ <summary>
+ Returns the {@link Current} object for this the request.
+ </summary>
+ <returns>The Current object for this request.</returns>
+ </member>
+ <member name="T:Ice.DispatchInterceptor">
+ <summary>
+ Base class that allows a server intercept incoming requests.
+ The application must derive a concrete class from DispatchInterceptor
+ that implements the DispatchInterceptor.dispatch operation. An instance of this derived
+ class can be registered with an object adapter like any other servant.
+ A dispatch interceptor is useful particularly to automatically retry requests
+ that have failed due to a recoverable error condition.
+ </summary>
+ </member>
+ <member name="T:Ice.ObjectImpl">
+ <summary>
+ Base class for all Slice classes.
+ </summary>
+ </member>
+ <member name="T:Ice.Object">
+ <summary>
+ the base interface for servants.
+ </summary>
+ </member>
+ <member name="M:Ice.Object.ice_hash">
+ <summary>
+ This method is deprecated. Use GetHashCode instead.
+ </summary>
+ </member>
+ <member name="M:Ice.Object.ice_isA(System.String)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+
+ <param name="s">The type ID of the Slice interface to test against.</param>
+ <returns>True if this object has the interface
+ specified by s or derives from the interface specified by s.</returns>
+ </member>
+ <member name="M:Ice.Object.ice_isA(System.String,Ice.Current)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+
+ <param name="s">The type ID of the Slice interface to test against.</param>
+ <param name="current">The Current object for the invocation.</param>
+ <returns>True if this object has the interface
+ specified by s or derives from the interface specified by s.</returns>
+ </member>
+ <member name="M:Ice.Object.ice_ping">
+ <summary>
+ Tests whether this object can be reached.
+ </summary>
+ </member>
+ <member name="M:Ice.Object.ice_ping(Ice.Current)">
+ <summary>
+ Tests whether this object can be reached.
+ </summary>
+ <param name="current">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.Object.ice_ids">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by this object.
+ </summary>
+ <returns>The Slice type IDs of the interfaces supported by this object, in base-to-derived
+ order. The first element of the returned array is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.Object.ice_ids(Ice.Current)">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by this object.
+ </summary>
+ <param name="current">The Current object for the invocation.</param>
+ <returns>The Slice type IDs of the interfaces supported by this object, in base-to-derived
+ order. The first element of the returned array is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.Object.ice_id">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by this object.
+ </summary>
+ <returns>The Slice type ID of the most-derived interface.</returns>
+ </member>
+ <member name="M:Ice.Object.ice_id(Ice.Current)">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by this object.
+ </summary>
+ <param name="current">The Current object for the invocation.</param>
+ <returns>The Slice type ID of the most-derived interface.</returns>
+ </member>
+ <member name="M:Ice.Object.ice_preMarshal">
+ <summary>
+ The Ice run time invokes this method prior to marshaling an object's data members. This allows a subclass
+ to override this method in order to validate its data members.
+ </summary>
+ </member>
+ <member name="M:Ice.Object.ice_postUnmarshal">
+ <summary>
+ This Ice run time invokes this method vafter unmarshaling an object's data members. This allows a
+ subclass to override this method in order to perform additional initialization.
+ </summary>
+ </member>
+ <member name="M:Ice.Object.ice_dispatch(Ice.Request,Ice.DispatchInterceptorAsyncCallback)">
+ <summary>
+ Dispatches an invocation to a servant. This method is used by dispatch interceptors to forward an invocation
+ to a servant (or to another interceptor).
+ </summary>
+ <param name="request">The details of the invocation.</param>
+ <param name="cb">The callback object for asynchchronous dispatch. For synchronous dispatch,
+ the callback object must be null.</param>
+ <returns>The dispatch status for the operation.</returns>
+ </member>
+ <member name="M:Ice.Object.ice_dispatch(Ice.Request)">
+ <summary>
+ Dispatches an invocation to a servant. This method is used by dispatch interceptors to forward an invocation
+ to a servant (or to another interceptor).
+ </summary>
+ <param name="request">The details of the invocation.</param>
+ <returns>The dispatch status for the operation.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.#ctor">
+ <summary>
+ Instantiates an Ice object.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_hash">
+ <summary>
+ This method is deprecated. Use GetHashCode instead.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectImpl.Clone">
+ <summary>
+ Returns a copy of the object. The cloned object contains field-for-field copies
+ of the state.
+ </summary>
+ <returns>The cloned object.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_isA(System.String)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="s">The type ID of the Slice interface to test against.</param>
+ <returns>The return value is true if s is ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_isA(System.String,Ice.Current)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="s">The type ID of the Slice interface to test against.</param>
+ <param name="current">The Current object for the invocation.</param>
+ <returns>The return value is true if s is ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_ping">
+ <summary>
+ Tests whether this object can be reached.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_ping(Ice.Current)">
+ <summary>
+ Tests whether this object can be reached.
+ <param name="current">The Current object for the invocation.</param>
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_ids">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by this object.
+ </summary>
+ <returns>An array whose only element is ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_ids(Ice.Current)">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by this object.
+ </summary>
+ <param name="current">The Current object for the invocation.</param>
+ <returns>An array whose only element is ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_id">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by this object.
+ </summary>
+ <returns>The return value is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_id(Ice.Current)">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by this object.
+ </summary>
+ <param name="current">The Current object for the invocation.</param>
+ <returns>The return value is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_staticId">
+ <summary>
+ Returns the Slice type ID of the interface supported by this object.
+ </summary>
+ <returns>The return value is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_preMarshal">
+ <summary>
+ The Ice run time invokes this method prior to marshaling an object's data members. This allows a subclass
+ to override this method in order to validate its data members.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_postUnmarshal">
+ <summary>
+ This Ice run time invokes this method vafter unmarshaling an object's data members. This allows a
+ subclass to override this method in order to perform additional initialization.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_dispatch(Ice.Request,Ice.DispatchInterceptorAsyncCallback)">
+ <summary>
+ Dispatches an invocation to a servant. This method is used by dispatch interceptors to forward an invocation
+ to a servant (or to another interceptor).
+ </summary>
+ <param name="request">The details of the invocation.</param>
+ <param name="cb">The callback object for asynchchronous dispatch. For synchronous dispatch, the
+ callback object must be null.</param>
+ <returns>The dispatch status for the operation.</returns>
+ </member>
+ <member name="M:Ice.ObjectImpl.ice_dispatch(Ice.Request)">
+ <summary>
+ Dispatches an invocation to a servant. This method is used by dispatch interceptors to forward an invocation
+ to a servant (or to another interceptor).
+ </summary>
+ <param name="request">The details of the invocation.</param>
+ <returns>The dispatch status for the operation.</returns>
+ </member>
+ <member name="M:Ice.DispatchInterceptor.dispatch(Ice.Request)">
+ <summary>
+ Called by the Ice run time to dispatch an incoming request. The implementation
+ of <code>dispatch</code> must dispatch the request to the actual servant.
+ </summary>
+ <param name="request">The details of the incoming request.</param>
+ <returns>For synchronous dispatch, the return value must be whatever is
+ returned ice_dispatch. For asynchronous dispatch, the return
+ value must be DispatchAsync.</returns>
+ </member>
+ <member name="M:Ice.Endpoint.ice_toString_">
+ <summary>
+ Return a string representation of the endpoint.
+ </summary>
+ <returns>The string representation of the endpoint.</returns>
+ </member>
+ <member name="M:Ice.Endpoint.getInfo">
+ <summary>
+ Returns the endpoint information.
+ </summary>
+ <returns>The endpoint information class.</returns>
+ </member>
+ <member name="T:Ice.Exception">
+ <summary>
+ Base class for Ice exceptions.
+ </summary>
+ </member>
+ <member name="M:Ice.Exception.Clone">
+ <summary>
+ Creates and returns a copy of this exception.
+ </summary>
+ <returns>A copy of this exception.</returns>
+ </member>
+ <member name="M:Ice.Exception.#ctor">
+ <summary>
+ Creates a default-initialized exception.
+ </summary>
+ </member>
+ <member name="M:Ice.Exception.#ctor(System.Exception)">
+ <summary>
+ Creates a default-initialized exception and sets the InnerException
+ property to the passed exception.
+ </summary>
+ <param name="ex">The inner exception.</param>
+ </member>
+ <member name="M:Ice.Exception.ice_name">
+ <summary>
+ Returns the name of this exception.
+ </summary>
+ <returns>The name of this exception.</returns>
+ </member>
+ <member name="M:Ice.Exception.ToString">
+ <summary>
+ Returns a string representation of this exception, including
+ any inner exceptions.
+ </summary>
+ <returns>The string representation of this exception.</returns>
+ </member>
+ <member name="T:Ice.LocalException">
+ <summary>
+ Base class for local exceptions.
+ </summary>
+ </member>
+ <member name="M:Ice.LocalException.#ctor">
+ <summary>
+ Creates a default-initialized local exception.
+ </summary>
+ </member>
+ <member name="M:Ice.LocalException.#ctor(System.Exception)">
+ <summary>
+ Creates a default-initialized local exception and sets the InnerException
+ property to the passed exception.
+ </summary>
+ <param name="ex">The inner exception.</param>
+ </member>
+ <member name="T:Ice.SystemException">
+ <summary>
+ Base class for Ice run-time exceptions.
+ </summary>
+ </member>
+ <member name="M:Ice.SystemException.#ctor">
+ <summary>
+ Creates a default-initialized run-time exception.
+ </summary>
+ </member>
+ <member name="M:Ice.SystemException.#ctor(System.Exception)">
+ <summary>
+ Creates a default-initialized run-time exception and sets the InnerException
+ property to the passed exception.
+ </summary>
+ <param name="ex">The inner exception.</param>
+ </member>
+ <member name="T:Ice.UserException">
+ <summary>
+ Base class for Slice user exceptions.
+ </summary>
+ </member>
+ <member name="M:Ice.UserException.#ctor">
+ <summary>
+ Creates a default-initialized user exception.
+ </summary>
+ </member>
+ <member name="M:Ice.UserException.#ctor(System.Exception)">
+ <summary>
+ Creates a default-initialized user exception and sets the InnerException
+ property to the passed exception.
+ </summary>
+ <param name="ex">The inner exception.</param>
+ </member>
+ <member name="M:Ice.ImplicitContext.getContext">
+ <summary>
+ Get a copy of the underlying context.
+ </summary>
+ <returns>A copy of the underlying context.</returns>
+ </member>
+ <member name="M:Ice.ImplicitContext.setContext(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the underlying context.
+ </summary>
+ <param name="newContext">The new context.</param>
+ </member>
+ <member name="M:Ice.ImplicitContext.containsKey(System.String)">
+ <summary>
+ Check if this key has an associated value in the underlying context.
+ </summary>
+ <param name="key">The key.
+
+ </param>
+ <returns>True if the key has an associated value, False otherwise.</returns>
+ </member>
+ <member name="M:Ice.ImplicitContext.get(System.String)">
+ <summary>
+ Get the value associated with the given key in the underlying context.
+ Returns an empty string if no value is associated with the key.
+ containsKey allows you to distinguish between an empty-string value and
+ no value at all.
+
+ </summary>
+ <param name="key">The key.
+
+ </param>
+ <returns>The value associated with the key.</returns>
+ </member>
+ <member name="M:Ice.ImplicitContext.put(System.String,System.String)">
+ <summary>
+ Create or update a key/value entry in the underlying context.
+ </summary>
+ <param name="key">The key.
+
+ </param>
+ <param name="value">The value.
+
+ </param>
+ <returns>The previous value associated with the key, if any.</returns>
+ </member>
+ <member name="M:Ice.ImplicitContext.remove(System.String)">
+ <summary>
+ Remove the entry for the given key in the underlying context.
+ </summary>
+ <param name="key">The key.
+
+ </param>
+ <returns>The value associated with the key, if any.</returns>
+ </member>
+ <member name="T:Ice.AMD_Object_ice_invoke">
+ <summary>
+ Callback interface for Blobject AMD servants.
+ </summary>
+ </member>
+ <member name="M:Ice.AMD_Object_ice_invoke.ice_response(System.Boolean,System.Byte[])">
+ <summary>
+ Indicates to the Ice run time that an operation
+ completed.
+ </summary>
+ <param name="ok">True indicates that the operation
+ completed successfully; false indicates that the
+ operation raised a user exception.</param>
+ <param name="outParams">The encoded out-parameters for the operation or,
+ if ok is false, the encoded user exception.</param>
+ </member>
+ <member name="T:Ice.LocalObject">
+ <summary>
+ This interface is deprecated. use System.Object (or nothing) instead.
+ </summary>
+ </member>
+ <member name="T:Ice.LocalObjectImpl">
+ <summary>
+ This class is deprecated. Use System.Object (or nothing) instead.
+ </summary>
+ </member>
+ <member name="T:Ice.AMI_Locator_findObjectById">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_Locator_findObjectById.ice_response(Ice.ObjectPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) The proxy, or null if the object is not active.
+
+ </param>
+ </member>
+ <member name="T:Ice.AMI_Locator_findAdapterById">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_Locator_findAdapterById.ice_response(Ice.ObjectPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) The adapter proxy, or null if the adapter is not active.
+
+ </param>
+ </member>
+ <member name="M:Ice.Logger.print(System.String)">
+ <summary>
+ Print a message.
+ The message is printed literally, without
+ any decorations such as executable name or time stamp.
+ </summary>
+ </member>
+ <member name="M:Ice.Logger.trace(System.String,System.String)">
+ <summary>
+ Log a trace message.
+ </summary>
+ <param name="category">The trace category.
+
+ </param>
+ <param name="message">The trace message to log.</param>
+ </member>
+ <member name="M:Ice.Logger.warning(System.String)">
+ <summary>
+ Log a warning message.
+ </summary>
+ <param name="message">The warning message to log.
+
+ </param>
+ </member>
+ <member name="M:Ice.Logger.error(System.String)">
+ <summary>
+ Log an error message.
+ </summary>
+ <param name="message">The error message to log.
+
+ </param>
+ </member>
+ <member name="M:Ice.Logger.cloneWithPrefix(System.String)">
+ <summary>
+ Returns a clone of the logger with a new prefix.
+ </summary>
+ <param name="prefix">The new prefix for the logger.</param>
+ </member>
+ <member name="T:Ice.LoggerPlugin">
+ <summary>
+ Class to support custom loggers. Applications using a custom logger
+ instantiate a LoggerPlugin with a custom logger and
+ return the instance from their PluginFactory implementation.
+ </summary>
+ </member>
+ <member name="M:Ice.Plugin.initialize">
+ <summary>
+ Perform any necessary initialization steps.
+ </summary>
+ </member>
+ <member name="M:Ice.Plugin.destroy">
+ <summary>
+ Called when the communicator is being destroyed.
+ </summary>
+ </member>
+ <member name="M:Ice.LoggerPlugin.#ctor(Ice.Communicator,Ice.Logger)">
+ <summary>
+ Installs a custom logger for a communicator.
+ </summary>
+ <param name="communicator">The communicator using the custom logger.</param>
+ <param name="logger">The custom logger for the communicator.</param>
+ </member>
+ <member name="M:Ice.LoggerPlugin.initialize">
+ <summary>
+ Called by the Ice run time during communicator initialization. The derived class
+ can override this method to perform any initialization that might be required
+ by a custom logger.
+ </summary>
+ </member>
+ <member name="M:Ice.LoggerPlugin.destroy">
+ <summary>
+ Called by the Ice run time when the communicator is destroyed. The derived class
+ can override this method to perform any finalization that might be required
+ by a custom logger.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectAdapter.getName">
+ <summary>
+ Get the name of this object adapter.
+ </summary>
+ <returns>This object adapter's name.</returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.getCommunicator">
+ <summary>
+ Get the communicator this object adapter belongs to.
+ </summary>
+ <returns>This object adapter's communicator.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.activate">
+ <summary>
+ Activate all endpoints that belong to this object adapter.
+ After activation, the object adapter can dispatch requests
+ received through its endpoints.
+
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectAdapter.hold">
+ <summary>
+ Temporarily hold receiving and dispatching requests.
+ The object
+ adapter can be reactivated with the activate operation.
+
+ Holding is not immediate, i.e., after hold
+ returns, the object adapter might still be active for some
+ time. You can use waitForHold to wait until holding is
+ complete.
+
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectAdapter.waitForHold">
+ <summary>
+ Wait until the object adapter holds requests.
+ Calling hold
+ initiates holding of requests, and waitForHold only returns
+ when holding of requests has been completed.
+
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectAdapter.deactivate">
+ <summary>
+ Deactivate all endpoints that belong to this object adapter.
+ After deactivation, the object adapter stops receiving
+ requests through its endpoints. Object adapters that have been
+ deactivated must not be reactivated again, and cannot be used
+ otherwise. Attempts to use a deactivated object adapter raise
+ ObjectAdapterDeactivatedException; however, attempts to
+ deactivate an already deactivated object adapter are
+ ignored and do nothing. Once deactivated, it is possible to
+ destroy the adapter to clean up resources and then create and
+ activate a new adapter with the same name.
+
+ After deactivate returns, no new requests
+ are processed by the object adapter. However, requests that
+ have been started before deactivate was called might
+ still be active. You can use waitForDeactivate to wait
+ for the completion of all requests for this object adapter.
+
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectAdapter.waitForDeactivate">
+ <summary>
+ Wait until the object adapter has deactivated.
+ Calling
+ deactivate initiates object adapter deactivation, and
+ waitForDeactivate only returns when deactivation has
+ been completed.
+
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectAdapter.isDeactivated">
+ <summary>
+ Check whether object adapter has been deactivated.
+ </summary>
+ <returns>Whether adapter has been deactivated.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.destroy">
+ <summary>
+ Destroys the object adapter and cleans up all resources held by
+ the object adapter.
+ If the object adapter has not yet been
+ deactivated, destroy implicitly initiates the deactivation
+ and waits for it to finish. Subsequent calls to destroy are
+ ignored. Once destroy has returned, it is possible to create
+ another object adapter with the same name.
+
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectAdapter.add(Ice.Object,Ice.Identity)">
+ <summary>
+ Add a servant to this object adapter's Active Servant Map.
+ Note
+ that one servant can implement several Ice objects by registering
+ the servant with multiple identities. Adding a servant with an
+ identity that is in the map already throws AlreadyRegisteredException.
+
+ </summary>
+ <param name="servant">The servant to add.
+
+ </param>
+ <param name="id">The identity of the Ice object that is implemented by
+ the servant.
+
+ </param>
+ <returns>A proxy that matches the given identity and this object
+ adapter.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.addFacet(Ice.Object,Ice.Identity,System.String)">
+ <summary>
+ Like add, but with a facet.
+ Calling add(servant, id)
+ is equivalent to calling addFacet with an empty facet.
+
+ </summary>
+ <param name="servant">The servant to add.
+
+ </param>
+ <param name="id">The identity of the Ice object that is implemented by
+ the servant.
+
+ </param>
+ <param name="facet">The facet. An empty facet means the default facet.
+
+ </param>
+ <returns>A proxy that matches the given identity, facet, and
+ this object adapter.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.addWithUUID(Ice.Object)">
+ <summary>
+ Add a servant to this object adapter's Active Servant Map,
+ using an automatically generated UUID as its identity.
+ Note that
+ the generated UUID identity can be accessed using the proxy's
+ ice_getIdentity operation.
+
+ </summary>
+ <param name="servant">The servant to add.
+
+ </param>
+ <returns>A proxy that matches the generated UUID identity and
+ this object adapter.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.addFacetWithUUID(Ice.Object,System.String)">
+ <summary>
+ Like addWithUUID, but with a facet.
+ Calling
+ addWithUUID(servant) is equivalent to calling
+ addFacetWithUUID with an empty facet.
+
+ </summary>
+ <param name="servant">The servant to add.
+
+ </param>
+ <param name="facet">The facet. An empty facet means the default
+ facet.
+
+ </param>
+ <returns>A proxy that matches the generated UUID identity,
+ facet, and this object adapter.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.addDefaultServant(Ice.Object,System.String)">
+ <summary>
+ Add a default servant to handle requests for a specific
+ category.
+ Adding a default servant for a category for
+ which a default servant is already registered throws
+ AlreadyRegisteredException. To dispatch operation
+ calls on servants, the object adapter tries to find a servant
+ for a given Ice object identity and facet in the following
+ order:
+
+
+
+ The object adapter tries to find a servant for the identity
+ and facet in the Active Servant Map.
+
+ If no servant has been found in the Active Servant Map, the
+ object adapter tries to find a default servant for the category
+ component of the identity.
+
+ If no servant has been found by any of the preceding steps,
+ the object adapter tries to find a default servant for an empty
+ category, regardless of the category contained in the identity.
+
+ If no servant has been found by any of the preceding steps,
+ the object adapter gives up and the caller receives
+ ObjectNotExistException or FacetNotExistException.
+
+
+
+ </summary>
+ <param name="servant">The default servant.
+
+ </param>
+ <param name="category">The category for which the default servant is
+ registered. An empty category means it will handle all categories.
+
+ </param>
+ </member>
+ <member name="M:Ice.ObjectAdapter.remove(Ice.Identity)">
+ <summary>
+ Remove a servant (that is, the default facet) from the object
+ adapter's Active Servant Map.
+ </summary>
+ <param name="id">The identity of the Ice object that is implemented by
+ the servant. If the servant implements multiple Ice objects,
+ remove has to be called for all those Ice objects.
+ Removing an identity that is not in the map throws
+ NotRegisteredException.
+
+ </param>
+ <returns>The removed servant.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.removeFacet(Ice.Identity,System.String)">
+ <summary>
+ Like remove, but with a facet.
+ Calling remove(id)
+ is equivalent to calling removeFacet with an empty facet.
+
+ </summary>
+ <param name="id">The identity of the Ice object that is implemented by
+ the servant.
+
+ </param>
+ <param name="facet">The facet. An empty facet means the default facet.
+
+ </param>
+ <returns>The removed servant.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.removeAllFacets(Ice.Identity)">
+ <summary>
+ Remove all facets with the given identity from the Active
+ Servant Map.
+ The operation completely removes the Ice object,
+ including its default facet. Removing an identity that
+ is not in the map throws NotRegisteredException.
+
+ </summary>
+ <param name="id">The identity of the Ice object to be removed.
+
+ </param>
+ <returns>A collection containing all the facet names and
+ servants of the removed Ice object.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.removeDefaultServant(System.String)">
+ <summary>
+ Remove the default servant for a specific category.
+ Attempting
+ to remove a default servant for a category that is not
+ registered throws NotRegisteredException.
+
+ </summary>
+ <param name="category">The category of the default servant to remove.
+
+ </param>
+ <returns>The default servant.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.find(Ice.Identity)">
+ <summary>
+ Look up a servant in this object adapter's Active Servant Map
+ by the identity of the Ice object it implements.
+ This operation only tries to look up a servant in
+ the Active Servant Map. It does not attempt to find a servant
+ by using any installed ServantLocator.
+
+ </summary>
+ <param name="id">The identity of the Ice object for which the servant
+ should be returned.
+
+ </param>
+ <returns>The servant that implements the Ice object with the
+ given identity, or null if no such servant has been found.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.findFacet(Ice.Identity,System.String)">
+ <summary>
+ Like find, but with a facet.
+ Calling find(id)
+ is equivalent to calling findFacet with an empty
+ facet.
+
+ </summary>
+ <param name="id">The identity of the Ice object for which the
+ servant should be returned.
+
+ </param>
+ <param name="facet">The facet. An empty facet means the default
+ facet.
+
+ </param>
+ <returns>The servant that implements the Ice object with the
+ given identity and facet, or null if no such servant has been
+ found.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.findAllFacets(Ice.Identity)">
+ <summary>
+ Find all facets with the given identity in the Active Servant
+ Map.
+ </summary>
+ <param name="id">The identity of the Ice object for which the facets
+ should be returned.
+
+ </param>
+ <returns>A collection containing all the facet names and
+ servants that have been found, or an empty map if there is no
+ facet for the given identity.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.findByProxy(Ice.ObjectPrx)">
+ <summary>
+ Look up a servant in this object adapter's Active Servant Map,
+ given a proxy.
+ This operation only tries to lookup a servant in
+ the Active Servant Map. It does not attempt to find a servant
+ by using any installed ServantLocator.
+
+ </summary>
+ <param name="proxy">The proxy for which the servant should be returned.
+
+ </param>
+ <returns>The servant that matches the proxy, or null if no such
+ servant has been found.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.addServantLocator(Ice.ServantLocator,System.String)">
+ <summary>
+ Add a Servant Locator to this object adapter.
+ Adding a servant
+ locator for a category for which a servant locator is already
+ registered throws AlreadyRegisteredException. To dispatch
+ operation calls on servants, the object adapter tries to find a
+ servant for a given Ice object identity and facet in the
+ following order:
+
+
+
+ The object adapter tries to find a servant for the identity
+ and facet in the Active Servant Map.
+
+ If no servant has been found in the Active Servant Map,
+ the object adapter tries to find a servant locator for the
+ category component of the identity. If a locator is found, the
+ object adapter tries to find a servant using this locator.
+
+ If no servant has been found by any of the preceding steps,
+ the object adapter tries to find a locator for an empty category,
+ regardless of the category contained in the identity. If a
+ locator is found, the object adapter tries to find a servant
+ using this locator.
+
+ If no servant has been found by any of the preceding steps,
+ the object adapter gives up and the caller receives
+ ObjectNotExistException or FacetNotExistException.
+
+
+
+ Only one locator for the empty category can be
+ installed.
+
+ </summary>
+ <param name="locator">The locator to add.
+
+ </param>
+ <param name="category">The category for which the Servant Locator can
+ locate servants, or an empty string if the Servant Locator does
+ not belong to any specific category.
+
+ </param>
+ </member>
+ <member name="M:Ice.ObjectAdapter.removeServantLocator(System.String)">
+ <summary>
+ Remove a Servant Locator from this object adapter.
+ </summary>
+ <param name="category">The category for which the Servant Locator can
+ locate servants, or an empty string if the Servant Locator does
+ not belong to any specific category.
+
+ </param>
+ <returns>The Servant Locator, or throws NotRegisteredException
+ if no Servant Locator was found for the given category.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.findServantLocator(System.String)">
+ <summary>
+ Find a Servant Locator installed with this object adapter.
+ </summary>
+ <param name="category">The category for which the Servant Locator can
+ locate servants, or an empty string if the Servant Locator does
+ not belong to any specific category.
+
+ </param>
+ <returns>The Servant Locator, or null if no Servant Locator was
+ found for the given category.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.findDefaultServant(System.String)">
+ <summary>
+ Find the default servant for a specific category.
+ </summary>
+ <param name="category">The category of the default servant to find.
+
+ </param>
+ <returns>The default servant or null if no default servant was
+ registered for the category.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.createProxy(Ice.Identity)">
+ <summary>
+ Create a proxy for the object with the given identity.
+ If this
+ object adapter is configured with an adapter id, the return
+ value is an indirect proxy that refers to the adapter id. If
+ a replica group id is also defined, the return value is an
+ indirect proxy that refers to the replica group id. Otherwise,
+ if no adapter id is defined, the return value is a direct
+ proxy containing this object adapter's published endpoints.
+
+ </summary>
+ <param name="id">The object's identity.
+
+ </param>
+ <returns>A proxy for the object with the given identity.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.createDirectProxy(Ice.Identity)">
+ <summary>
+ Create a direct proxy for the object with the given identity.
+ The returned proxy contains this object adapter's published
+ endpoints.
+
+ </summary>
+ <param name="id">The object's identity.
+
+ </param>
+ <returns>A proxy for the object with the given identity.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.createIndirectProxy(Ice.Identity)">
+ <summary>
+ Create an indirect proxy for the object with the given identity.
+ If this object adapter is configured with an adapter id, the
+ return value refers to the adapter id. Otherwise, the return
+ value contains only the object identity.
+
+ </summary>
+ <param name="id">The object's identity.
+
+ </param>
+ <returns>A proxy for the object with the given identity.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.setLocator(Ice.LocatorPrx)">
+ <summary>
+ Set an Ice locator for this object adapter.
+ By doing so, the
+ object adapter will register itself with the locator registry
+ when it is activated for the first time. Furthermore, the proxies
+ created by this object adapter will contain the adapter name
+ instead of its endpoints.
+
+ </summary>
+ <param name="loc">The locator used by this object adapter.
+
+ </param>
+ </member>
+ <member name="M:Ice.ObjectAdapter.refreshPublishedEndpoints">
+ <summary>
+ Refresh the set of published endpoints.
+ The run time re-reads
+ the PublishedEndpoints property if it is set and re-reads the
+ list of local interfaces if the adapter is configured to listen
+ on all endpoints. This operation is useful to refresh the endpoint
+ information that is published in the proxies that are created by
+ an object adapter if the network interfaces used by a host changes.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectAdapter.getEndpoints">
+ <summary>
+ Get the set of endpoints configured with this object adapter.
+ </summary>
+ <returns>The set of endpoints.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ObjectAdapter.getPublishedEndpoints">
+ <summary>
+ Get the set of endpoints that proxies created by this object
+ adapter will contain.
+ </summary>
+ <returns>The set of published endpoints.
+
+ </returns>
+ </member>
+ <member name="T:Ice.DispatchStatus">
+ <summary>
+ Indicates the status of operation dispatch.
+ </summary>
+ </member>
+ <member name="F:Ice.DispatchStatus.DispatchOK">
+ <summary>
+ Indicates that an operation was dispatched synchronously and successfully.
+ </summary>
+ </member>
+ <member name="F:Ice.DispatchStatus.DispatchUserException">
+ <summary>
+ Indicates that an operation was dispatched synchronously and raised a user exception.
+ </summary>
+ </member>
+ <member name="F:Ice.DispatchStatus.DispatchAsync">
+ <summary>
+ Indicates that an operation was dispatched asynchronously.
+ </summary>
+ </member>
+ <member name="T:Ice.Blobject">
+ <summary>
+ Base class for dynamic dispatch servants. A server application
+ derives a concrete servant class from Blobject that
+ implements the Blobject.ice_invoke method.
+ </summary>
+ </member>
+ <member name="M:Ice.Blobject.ice_invoke(System.Byte[],System.Byte[]@,Ice.Current)">
+ <summary>
+ Dispatch an incoming request.
+ </summary>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="outParams">The encoded out-paramaters and return value
+ for the operation. The return value follows any out-parameters.</param>
+ <param name="current">The Current object to pass to the operation.</param>
+ <returns>If the operation completed successfully, the return value
+ is true. If the operation raises a user exception,
+ the return value is false; in this case, outParams
+ must contain the encoded user exception. If the operation raises an
+ Ice run-time exception, it must throw it directly.</returns>
+ </member>
+ <member name="M:Ice.EndpointInfo.type">
+ <summary>
+ Returns the type of the endpoint.
+ </summary>
+ </member>
+ <member name="M:Ice.EndpointInfo.datagram">
+ <summary>
+ Returns true if this endpoint is a datagram endpoint.
+ </summary>
+ </member>
+ <member name="M:Ice.EndpointInfo.secure">
+ <summary>
+ Returns true if this endpoint is a secure endpoint.
+ </summary>
+ </member>
+ <member name="T:Ice.AsyncCallback">
+
+ <summary>
+ Callback that requires the application to down-cast the proxy.
+ </summary>
+
+ </member>
+ <member name="T:Ice.OnewayCallback">
+
+ <summary>
+ Callback for the successful completion of an operation
+ that returns no data.
+ </summary>
+
+ </member>
+ <member name="T:Ice.SentCallback">
+
+ <summary>
+ Callback for the successful completion of an operation
+ that returns no data.
+ </summary>
+
+ </member>
+ <member name="T:Ice.ExceptionCallback">
+
+ <summary>
+ Called when an invocation raises an exception.
+ </summary>
+
+ </member>
+ <member name="T:Ice.AsyncResult">
+
+ <summary>
+ <!-- TODO -->
+ </summary>
+ </member>
+ <member name="T:Ice.AMISentCallback">
+ <summary>
+ Deprecated callback interface for AMI invocations. This is useful
+ for applications that send asynchronous invocations that
+ might not be sent for some time and, therefore, are
+ queued in the Ice run time for transmission.
+ The Ice run time calls ice_sent if an
+ an AMI invocation cannot be written to the transport and was
+ queued for later transmission. Applications that need to
+ implement flow control for AMI invocations can implement
+ this interface on the corresponding AMI callback object.
+ </summary>
+ </member>
+ <member name="M:Ice.AMISentCallback.ice_sent">
+ <summary>
+ Indicates to the caller of an AMI operation that
+ the invocation was queued for later transmission.
+ </summary>
+ </member>
+ <member name="T:Ice.ReadObjectCallback">
+ <summary>
+ Callback class to inform an application when a Slice class has been unmarshaled
+ from an input stream.
+ </summary>
+ </member>
+ <member name="M:Ice.ReadObjectCallback.invoke(Ice.Object)">
+ <summary>
+ The Ice run time calls this method when it has fully unmarshaled the state
+ of a Slice class.
+ </summary>
+ <param name="obj">The unmarshaled Slice class.</param>
+ </member>
+ <member name="T:Ice.ProcessOperations_">
+ <summary>
+ An administrative interface for process management.
+ Managed servers must
+ implement this interface.
+
+ A servant implementing this interface is a potential target
+ for denial-of-service attacks, therefore proper security precautions
+ should be taken. For example, the servant can use a UUID to make its
+ identity harder to guess, and be registered in an object adapter with
+ a secured endpoint.
+ </summary>
+ </member>
+ <member name="M:Ice.ProcessOperations_.shutdown(Ice.Current)">
+ <summary>
+ Initiate a graceful shut-down.
+ </summary>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.ProcessOperations_.writeMessage(System.String,System.Int32,Ice.Current)">
+ <summary>
+ Write a message on the process' stdout or stderr.
+ </summary>
+ <param name="message">The message.
+
+ </param>
+ <param name="fd">1 for stdout, 2 for stderr.</param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Ice.ProcessOperationsNC_">
+ <summary>
+ An administrative interface for process management.
+ Managed servers must
+ implement this interface.
+
+ A servant implementing this interface is a potential target
+ for denial-of-service attacks, therefore proper security precautions
+ should be taken. For example, the servant can use a UUID to make its
+ identity harder to guess, and be registered in an object adapter with
+ a secured endpoint.
+ </summary>
+ </member>
+ <member name="M:Ice.ProcessOperationsNC_.shutdown">
+ <summary>
+ Initiate a graceful shut-down.
+ </summary>
+ </member>
+ <member name="M:Ice.ProcessOperationsNC_.writeMessage(System.String,System.Int32)">
+ <summary>
+ Write a message on the process' stdout or stderr.
+ </summary>
+ <param name="message">The message.
+
+ </param>
+ <param name="fd">1 for stdout, 2 for stderr.</param>
+ </member>
+ <member name="T:Ice.PropertiesAdminOperations_">
+ <summary>
+ The PropertiesAdmin interface provides remote access to the properties
+ of a communicator.
+ </summary>
+ </member>
+ <member name="M:Ice.PropertiesAdminOperations_.getProperty(System.String,Ice.Current)">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ string is returned.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <returns>The property value.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.PropertiesAdminOperations_.getPropertiesForPrefix(System.String,Ice.Current)">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ prefix is an empty string,
+ then all properties are returned.
+
+ </summary>
+ <param name="prefix">The prefix to search for (empty string if none).
+ </param>
+ <returns>The matching property set.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Ice.PropertiesAdminOperationsNC_">
+ <summary>
+ The PropertiesAdmin interface provides remote access to the properties
+ of a communicator.
+ </summary>
+ </member>
+ <member name="M:Ice.PropertiesAdminOperationsNC_.getProperty(System.String)">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ string is returned.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <returns>The property value.</returns>
+ </member>
+ <member name="M:Ice.PropertiesAdminOperationsNC_.getPropertiesForPrefix(System.String)">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ prefix is an empty string,
+ then all properties are returned.
+
+ </summary>
+ <param name="prefix">The prefix to search for (empty string if none).
+ </param>
+ <returns>The matching property set.</returns>
+ </member>
+ <member name="M:Ice.Properties.getProperty(System.String)">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ string is returned.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <returns>The property value.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Properties.getPropertyWithDefault(System.String,System.String)">
+ <summary>
+ Get a property by key.
+ If the property is not set, the
+ given default value is returned.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <param name="value">The default value to use if the property does not
+ exist.
+
+ </param>
+ <returns>The property value or the default value.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Properties.getPropertyAsInt(System.String)">
+ <summary>
+ Get a property as an integer.
+ If the property is not set, 0
+ is returned.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <returns>The property value interpreted as an integer.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Properties.getPropertyAsIntWithDefault(System.String,System.Int32)">
+ <summary>
+ Get a property as an integer.
+ If the property is not set, the
+ given default value is returned.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <param name="value">The default value to use if the property does not
+ exist.
+
+ </param>
+ <returns>The property value interpreted as an integer, or the
+ default value.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Properties.getPropertyAsList(System.String)">
+ <summary>
+ Get a property as a list of strings.
+ If the property is not set,
+ an empty list is returned. The strings in the list can contain
+ whitespace if they are enclosed in single or double quotes.
+ If quotes are mismatched, an empty list is returned.
+ Within single quotes or double-quotes, you can escape the
+ quote in question with \, e.g. O'Reilly can be written as
+ O'Reilly, "O'Reilly" or 'O\'Reilly'.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <returns>The property value interpreted as a list of strings.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Properties.getPropertyAsListWithDefault(System.String,System.String[])">
+ <summary>
+ Get a property as a list of strings.
+ If the property is not set,
+ the default list is returned. The strings in the list can contain
+ whitespace if they are enclosed in single or double quotes.
+ If quotes are mismatched, the default list is returned.
+ Within single quotes or double-quotes, you can escape the
+ quote in question with \, e.g. O'Reilly can be written as
+ O'Reilly, "O'Reilly" or 'O\'Reilly'.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <param name="value">The default value to use if the property is not set.
+
+ </param>
+ <returns>The property value interpreted as list of strings, or the
+ default value.
+
+ </returns>
+ </member>
+ <member name="M:Ice.Properties.getPropertiesForPrefix(System.String)">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ prefix is an empty string,
+ then all properties are returned.
+
+ </summary>
+ <param name="prefix">The prefix to search for (empty string if none).
+ </param>
+ <returns>The matching property set.</returns>
+ </member>
+ <member name="M:Ice.Properties.setProperty(System.String,System.String)">
+ <summary>
+ Set a property.
+ To unset a property, set it to
+ the empty string.
+
+ </summary>
+ <param name="key">The property key.
+ </param>
+ <param name="value">The property value.
+
+ </param>
+ </member>
+ <member name="M:Ice.Properties.getCommandLineOptions">
+ <summary>
+ Get a sequence of command-line options that is equivalent to
+ this property set.
+ Each element of the returned sequence is
+ a command-line option of the form
+ --key=value.
+
+ </summary>
+ <returns>The command line options for this property set.</returns>
+ </member>
+ <member name="M:Ice.Properties.parseCommandLineOptions(System.String,System.String[])">
+ <summary>
+ Convert a sequence of command-line options into properties.
+ All options that begin with
+ --prefix. are
+ converted into properties. If the prefix is empty, all options
+ that begin with -- are converted to properties.
+
+ </summary>
+ <param name="prefix">The property prefix, or an empty string to
+ convert all options starting with --.
+
+ </param>
+ <param name="options">The command-line options.
+
+ </param>
+ <returns>The command-line options that do not start with the specified
+ prefix, in their original order.</returns>
+ </member>
+ <member name="M:Ice.Properties.parseIceCommandLineOptions(System.String[])">
+ <summary>
+ Convert a sequence of command-line options into properties.
+ All options that begin with one of the following prefixes
+ are converted into properties: --Ice, --IceBox, --IceGrid,
+ --IcePatch2, --IceSSL, --IceStorm, --Freeze, and --Glacier2.
+
+ </summary>
+ <param name="options">The command-line options.
+
+ </param>
+ <returns>The command-line options that do not start with one of
+ the listed prefixes, in their original order.</returns>
+ </member>
+ <member name="M:Ice.Properties.load(System.String)">
+ <summary>
+ Load properties from a file.
+ </summary>
+ <param name="file">The property file.</param>
+ </member>
+ <member name="M:Ice.Properties.ice_clone_">
+ <summary>
+ Create a copy of this property set.
+ </summary>
+ <returns>A copy of this property set.</returns>
+ </member>
+ <member name="T:Ice.Callback_Object_ice_isA">
+ <summary>
+ Delegate for a successful <code>ice_isA</code> invocation.
+ <param name="ret__">True if the remote object supports the type, false otherwise.</param>
+ </summary>
+ </member>
+ <member name="T:Ice.Callback_Object_ice_ids">
+ <summary>
+ Delegate for a successful <code>ice_ids</code> invocation.
+ <param name="ret__">The array of Slice type ids supported by the remote object.</param>
+ </summary>
+ </member>
+ <member name="T:Ice.Callback_Object_ice_id">
+ <summary>
+ Delegate for a successful <code>ice_id</code> invocation.
+ <param name="ret__">The Slice type id of the most-derived interface supported by the remote object.</param>
+ </summary>
+ </member>
+ <member name="T:Ice.Callback_Object_ice_ping">
+ <summary>
+ Delegate for a successful <code>ice_ping</code> invocation.
+ </summary>
+ </member>
+ <member name="T:Ice.Callback_Object_ice_invoke">
+ <summary>
+ Delegate for a successful <code>ice_invoke</code> invocation.
+ <param name="ret__">True if the invocation succeeded, or false if the invocation
+ raised a user exception.</param>
+ <param name="outParams">The encoded out-parameters or user exception.</param>
+ </summary>
+ </member>
+ <member name="T:Ice.AMI_Object_ice_invoke">
+ <summary>
+ Callback object for Blobject AMI invocations.
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_Object_ice_invoke.ice_response(System.Boolean,System.Byte[])">
+ <summary>
+ The Ice run time calls <code>ice_response</code> when an asynchronous operation invocation
+ completes successfully or raises a user exception.
+ </summary>
+ <param name="ok">Indicates the result of the invocation. If true, the operation
+ completed succesfully; if false, the operation raised a user exception.</param>
+ <param name="outParams">Contains the encoded out-parameters of the operation (if any) if ok
+ is true; otherwise, if ok is false, contains the
+ encoded user exception raised by the operation.</param>
+ </member>
+ <member name="T:Ice.AMI_Object_ice_flushBatchRequests">
+ <summary>
+ Callback object for ObjectPrx.ice_flushBatchRequests_async.
+ </summary>
+ </member>
+ <member name="T:Ice.ObjectPrx">
+ <summary>
+ Base interface of all object proxies.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getHash">
+ <summary>
+ This method is deprecated. Use GetHashCode instead.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getCommunicator">
+ <summary>
+ Returns the communicator that created this proxy.
+ </summary>
+ <returns>The communicator that created this proxy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_toString">
+ <summary>
+ This method is deprecated. Use ToString instead.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isA(System.String)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="id__">The type ID of the Slice interface to test against.</param>
+ <returns>True if the target object has the interface specified by id__ or derives
+ from the interface specified by id__.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isA(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="id__">The type ID of the Slice interface to test against.</param>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>True if the target object has the interface specified by id__ or derives
+ from the interface specified by id__.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_isA(System.String)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="id">The type ID of the Slice interface to test against.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_isA(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="id">The type ID of the Slice interface to test against.</param>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_isA(System.String,Ice.AsyncCallback,System.Object)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="id">The type ID of the Slice interface to test against.</param>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_isA(System.String,System.Collections.Generic.Dictionary{System.String,System.String},Ice.AsyncCallback,System.Object)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="id">The type ID of the Slice interface to test against.</param>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.end_ice_isA(Ice.AsyncResult)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="r__">The asynchronous result object returned by <code>begin_ice_isA</code>.</param>
+ <returns>True if the object supports the Slice interface, false otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_ping">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_ping(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_ping">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_ping(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_ping(Ice.AsyncCallback,System.Object)">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_ping(System.Collections.Generic.Dictionary{System.String,System.String},Ice.AsyncCallback,System.Object)">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.end_ice_ping(Ice.AsyncResult)">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ <param name="r__">The asynchronous result object returned by <code>begin_ice_ping</code>.</param>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_ids">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <returns>The Slice type IDs of the interfaces supported by the target object, in base-to-derived
+ order. The first element of the returned array is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_ids(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>The Slice type IDs of the interfaces supported by the target object, in base-to-derived
+ order. The first element of the returned array is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_ids">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_ids(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_ids(Ice.AsyncCallback,System.Object)">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_ids(System.Collections.Generic.Dictionary{System.String,System.String},Ice.AsyncCallback,System.Object)">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.end_ice_ids(Ice.AsyncResult)">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <param name="r__">The asynchronous result object returned by <code>begin_ice_ids</code>.</param>
+ <returns>The Slice type IDs of the interfaces supported by the target object, in base-to-derived
+ order. The first element of the returned array is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_id">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <returns>The Slice type ID of the most-derived interface.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_id(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>The Slice type ID of the most-derived interface.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_id">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_id(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_id(Ice.AsyncCallback,System.Object)">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_id(System.Collections.Generic.Dictionary{System.String,System.String},Ice.AsyncCallback,System.Object)">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.end_ice_id(Ice.AsyncResult)">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <param name="r__">The asynchronous result object returned by <code>begin_ice_id</code>.</param>
+ <returns>The Slice type ID of the most-derived interface.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_invoke(System.String,Ice.OperationMode,System.Byte[],System.Byte[]@)">
+ <summary>
+ Invokes an operation dynamically.
+ </summary>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="outParams">The encoded out-paramaters and return value
+ for the operation. The return value follows any out-parameters.</param>
+ <returns>If the operation completed successfully, the return value
+ is true. If the operation raises a user exception,
+ the return value is false; in this case, outParams
+ contains the encoded user exception. If the operation raises a run-time exception,
+ it throws it directly.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_invoke(System.String,Ice.OperationMode,System.Byte[],System.Byte[]@,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Invokes an operation dynamically.
+ </summary>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="outParams">The encoded out-paramaters and return value
+ for the operation. The return value follows any out-parameters.</param>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>If the operation completed successfully, the return value
+ is true. If the operation raises a user exception,
+ the return value is false; in this case, outParams
+ contains the encoded user exception. If the operation raises a run-time exception,
+ it throws it directly.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_invoke_async(Ice.AMI_Object_ice_invoke,System.String,Ice.OperationMode,System.Byte[])">
+ <summary>
+ Invokes an operation dynamically and asynchronously.
+ </summary>
+ <param name="cb">The callback object to notify when the operation completes.</param>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <returns> If the operation was invoked synchronously (because there
+ was no need to queue the request), the return value is true;
+ otherwise, if the invocation was queued, the return value is false.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_invoke_async(Ice.AMI_Object_ice_invoke,System.String,Ice.OperationMode,System.Byte[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Invokes an operation dynamically and asynchronously.
+ </summary>
+ <param name="cb">The callback object to notify when the operation completes.</param>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="context">The context dictionary for the invocation.</param>
+ <returns> If the operation was invoked synchronously (because there
+ was no need to queue the request), the return value is true;
+ otherwise, if the invocation was queued, the return value is false.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_invoke(System.String,Ice.OperationMode,System.Byte[])">
+ <summary>
+ Invokes an operation dynamically.
+ </summary>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_invoke(System.String,Ice.OperationMode,System.Byte[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Invokes an operation dynamically.
+ </summary>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_invoke(System.String,Ice.OperationMode,System.Byte[],Ice.AsyncCallback,System.Object)">
+ <summary>
+ Invokes an operation dynamically.
+ </summary>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.begin_ice_invoke(System.String,Ice.OperationMode,System.Byte[],System.Collections.Generic.Dictionary{System.String,System.String},Ice.AsyncCallback,System.Object)">
+ <summary>
+ Invokes an operation dynamically.
+ </summary>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <param name="cb__">A callback to be invoked when the invocation completes.</param>
+ <param name="cookie__">Application-specific data to be stored in the result.</param>
+ <returns>An asynchronous result object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.end_ice_invoke(System.Byte[]@,Ice.AsyncResult)">
+ <summary>
+ Completes a dynamic invocation.
+ </summary>
+ <param name="outParams">The encoded out parameters or user exception.</param>
+ <param name="r__">The asynchronous result object returned by <code>begin_ice_invoke</code>.</param>
+ <returns>If the operation completed successfully, the return value
+ is true. If the operation raises a user exception,
+ the return value is false; in this case, outParams
+ contains the encoded user exception. If the operation raises a run-time exception,
+ it throws it directly.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getIdentity">
+ <summary>
+ Returns the identity embedded in this proxy.
+ <returns>The identity of the target object.</returns>
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_identity(Ice.Identity)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the per-proxy context.
+ <param name="newIdentity">The identity for the new proxy.</param>
+ <returns>The proxy with the new identity.</returns>
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getContext">
+ <summary>
+ Returns the per-proxy context for this proxy.
+ </summary>
+ <returns>The per-proxy context. If the proxy does not have a per-proxy (implicit) context, the return value
+ is null.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_context(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the per-proxy context.
+ </summary>
+ <param name="newContext">The context for the new proxy.</param>
+ <returns>The proxy with the new per-proxy context.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getFacet">
+ <summary>
+ Returns the facet for this proxy.
+ </summary>
+ <returns>The facet for this proxy. If the proxy uses the default facet, the return value is the
+ empty string.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_facet(System.String)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the facet.
+ </summary>
+ <param name="newFacet">The facet for the new proxy.</param>
+ <returns>The proxy with the new facet.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getAdapterId">
+ <summary>
+ Returns the adapter ID for this proxy.
+ </summary>
+ <returns>The adapter ID. If the proxy does not have an adapter ID, the return value is the
+ empty string.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_adapterId(System.String)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the adapter ID.
+ </summary>
+ <param name="newAdapterId">The adapter ID for the new proxy.</param>
+ <returns>The proxy with the new adapter ID.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getEndpoints">
+ <summary>
+ Returns the endpoints used by this proxy.
+ </summary>
+ <returns>The endpoints used by this proxy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_endpoints(Ice.Endpoint[])">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the endpoints.
+ </summary>
+ <param name="newEndpoints">The endpoints for the new proxy.</param>
+ <returns>The proxy with the new endpoints.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getLocatorCacheTimeout">
+ <summary>
+ Returns the locator cache timeout of this proxy.
+ </summary>
+ <returns>The locator cache timeout value (in seconds).</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_locatorCacheTimeout(System.Int32)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
+ </summary>
+ <param name="timeout">The new locator cache timeout (in seconds).</param>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isConnectionCached">
+ <summary>
+ Returns whether this proxy caches connections.
+ </summary>
+ <returns>True if this proxy caches connections; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_connectionCached(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for connection caching.
+ </summary>
+ <param name="newCache">True if the new proxy should cache connections; false, otherwise.</param>
+ <returns>The new proxy with the specified caching policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getEndpointSelection">
+ <summary>
+ Returns how this proxy selects endpoints (randomly or ordered).
+ </summary>
+ <returns>The endpoint selection policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_endpointSelection(Ice.EndpointSelectionType)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the endpoint selection policy.
+ </summary>
+ <param name="newType">The new endpoint selection policy.</param>
+ <returns>The new proxy with the specified endpoint selection policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isSecure">
+ <summary>
+ Returns whether this proxy communicates only via secure endpoints.
+ </summary>
+ <returns>True if this proxy communicates only vi secure endpoints; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_secure(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for how it selects endpoints.
+ </summary>
+ <param name="b"> If b is true, only endpoints that use a secure transport are
+ used by the new proxy. If b is false, the returned proxy uses both secure and insecure
+ endpoints.</param>
+ <returns>The new proxy with the specified selection policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isPreferSecure">
+ <summary>
+ Returns whether this proxy prefers secure endpoints.
+ </summary>
+ <returns>True if the proxy always attempts to invoke via secure endpoints before it
+ attempts to use insecure endpoints; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_preferSecure(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for its endpoint selection policy.
+ </summary>
+ <param name="b">If b is true, the new proxy will use secure endpoints for invocations
+ and only use insecure endpoints if an invocation cannot be made via secure endpoints. If b is
+ false, the proxy prefers insecure endpoints to secure ones.</param>
+ <returns>The new proxy with the new endpoint selection policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getRouter">
+ <summary>
+ Returns the router for this proxy.
+ </summary>
+ <returns>The router for the proxy. If no router is configured for the proxy, the return value
+ is null.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_router(Ice.RouterPrx)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the router.
+ </summary>
+ <param name="router">The router for the new proxy.</param>
+ <returns>The new proxy with the specified router.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getLocator">
+ <summary>
+ Returns the locator for this proxy.
+ </summary>
+ <returns>The locator for this proxy. If no locator is configured, the return value is null.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_locator(Ice.LocatorPrx)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the locator.
+ </summary>
+ <param name="locator">The locator for the new proxy.</param>
+ <returns>The new proxy with the specified locator.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isCollocationOptimized">
+ <summary>
+ Returns whether this proxy uses collocation optimization.
+ </summary>
+ <returns>True if the proxy uses collocation optimization; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_collocationOptimized(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for collocation optimization.
+ </summary>
+ <param name="b">True if the new proxy enables collocation optimization; false, otherwise.</param>
+ <returns>The new proxy the specified collocation optimization.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_twoway">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses twoway invocations.
+ </summary>
+ <returns>A new proxy that uses twoway invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isTwoway">
+ <summary>
+ Returns whether this proxy uses twoway invocations.
+ </summary>
+ <returns>True if this proxy uses twoway invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_oneway">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses oneway invocations.
+ </summary>
+ <returns>A new proxy that uses oneway invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isOneway">
+ <summary>
+ Returns whether this proxy uses oneway invocations.
+ </summary>
+ <returns>True if this proxy uses oneway invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_batchOneway">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses batch oneway invocations.
+ </summary>
+ <returns>A new proxy that uses batch oneway invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isBatchOneway">
+ <summary>
+ Returns whether this proxy uses batch oneway invocations.
+ </summary>
+ <returns>True if this proxy uses batch oneway invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_datagram">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses datagram invocations.
+ </summary>
+ <returns>A new proxy that uses datagram invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isDatagram">
+ <summary>
+ Returns whether this proxy uses datagram invocations.
+ </summary>
+ <returns>True if this proxy uses datagram invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_batchDatagram">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses batch datagram invocations.
+ </summary>
+ <returns>A new proxy that uses batch datagram invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_isBatchDatagram">
+ <summary>
+ Returns whether this proxy uses batch datagram invocations.
+ </summary>
+ <returns>True if this proxy uses batch datagram invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_compress(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for compression.
+ </summary>
+ <param name="co">True enables compression for the new proxy; false disables compression.</param>
+ <returns>A new proxy with the specified compression setting.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_timeout(System.Int32)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for its timeout setting.
+ </summary>
+ <param name="t">The timeout for the new proxy in milliseconds.</param>
+ <returns>A new proxy with the specified timeout.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_connectionId(System.String)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for its connection ID.
+ </summary>
+ <param name="connectionId">The connection ID for the new proxy. An empty string removes the
+ connection ID.</param>
+ <returns>A new proxy with the specified connection ID.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getConnectionId">
+ <summary>
+ Returns the connection id of this proxy.
+ </summary>
+ <returns>The connection id.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getConnection">
+ <summary>
+ Returns the Connection for this proxy. If the proxy does not yet have an established connection,
+ it first attempts to create a connection.
+ </summary>
+ <returns>The Connection for this proxy.</returns>
+ <exception name="CollocationOptimizationException">If the proxy uses collocation optimization and denotes a
+ collocated object.</exception>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_getCachedConnection">
+ <summary>
+ Returns the cached Connection for this proxy. If the proxy does not yet have an established
+ connection, it does not attempt to create a connection.
+ </summary>
+ <returns>The cached Connection for this proxy (null if the proxy does not have
+ an established connection).</returns>
+ <exception name="CollocationOptimizationException">If the proxy uses collocation optimization and denotes a
+ collocated object.</exception>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_flushBatchRequests">
+ <summary>
+ Flushes any pending batched requests for this communicator. The call blocks until the flush is complete.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrx.ice_flushBatchRequests_async(Ice.AMI_Object_ice_flushBatchRequests)">
+ <summary>
+ Asynchronously flushes any pending batched requests for this communicator. The call does not block.
+ </summary>
+ <param name="cb">The callback object to notify the application when the flush is complete.</param>
+ <returns>True if the requests were flushed immediately without blocking; false
+ if the requests could not be flushed immediately.</returns>
+ </member>
+ <member name="T:Ice.ObjectPrxHelperBase">
+ <summary>
+ Base class of all object proxies.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.GetHashCode">
+ <summary>
+ Returns a hash code for this proxy.
+ </summary>
+ <returns>The hash code.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getHash">
+ <summary>
+ This method is deprecated. Use GetHashCode instead.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getCommunicator">
+ <summary>
+ Returns the communicator that created this proxy.
+ </summary>
+ <returns>The communicator that created this proxy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ToString">
+ <summary>
+ Returns the stringified form of this proxy.
+ </summary>
+ <returns>The stringified proxy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_toString">
+ <summary>
+ This method is deprecated. Use ToString instead.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isA(System.String)">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="id__">The type ID of the Slice interface to test against.</param>
+ <returns>True if the target object has the interface specified by id__ or derives
+ from the interface specified by id__.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isA(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Tests whether this object supports a specific Slice interface.
+ </summary>
+ <param name="id__">The type ID of the Slice interface to test against.</param>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>True if the target object has the interface specified by id__ or derives
+ from the interface specified by id__.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_ping">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_ping(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Tests whether the target object of this proxy can be reached.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_ids">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <returns>The Slice type IDs of the interfaces supported by the target object, in base-to-derived
+ order. The first element of the returned array is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_ids(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns the Slice type IDs of the interfaces supported by the target object of this proxy.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>The Slice type IDs of the interfaces supported by the target object, in base-to-derived
+ order. The first element of the returned array is always ::Ice::Object.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_id">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <returns>The Slice type ID of the most-derived interface.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_id(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Returns the Slice type ID of the most-derived interface supported by the target object of this proxy.
+ </summary>
+ <param name="context__">The context dictionary for the invocation.</param>
+ <returns>The Slice type ID of the most-derived interface.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_invoke(System.String,Ice.OperationMode,System.Byte[],System.Byte[]@)">
+ <summary>
+ Invokes an operation dynamically.
+ </summary>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="outParams">The encoded out-paramaters and return value
+ for the operation. The return value follows any out-parameters.</param>
+ <returns>If the operation completed successfully, the return value
+ is true. If the operation raises a user exception,
+ the return value is false; in this case, outParams
+ contains the encoded user exception. If the operation raises a run-time exception,
+ it throws it directly.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_invoke(System.String,Ice.OperationMode,System.Byte[],System.Byte[]@,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Invokes an operation dynamically.
+ </summary>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="outParams">The encoded out-paramaters and return value
+ for the operation. The return value follows any out-parameters.</param>
+ <param name="context">The context dictionary for the invocation.</param>
+ <returns>If the operation completed successfully, the return value
+ is true. If the operation raises a user exception,
+ the return value is false; in this case, outParams
+ contains the encoded user exception. If the operation raises a run-time exception,
+ it throws it directly.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_invoke_async(Ice.AMI_Object_ice_invoke,System.String,Ice.OperationMode,System.Byte[])">
+ <summary>
+ Invokes an operation dynamically and asynchronously.
+ </summary>
+ <param name="cb">The callback object to notify when the operation completes.</param>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <returns> If the operation was invoked synchronously (because there
+ was no need to queue the request), the return value is true;
+ otherwise, if the invocation was queued, the return value is false.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_invoke_async(Ice.AMI_Object_ice_invoke,System.String,Ice.OperationMode,System.Byte[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Invokes an operation dynamically and asynchronously.
+ </summary>
+ <param name="cb">The callback object to notify when the operation completes.</param>
+ <param name="operation">The name of the operation to invoke.</param>
+ <param name="mode">The operation mode (normal or idempotent).</param>
+ <param name="inParams">The encoded in-parameters for the operation.</param>
+ <param name="context">The context dictionary for the invocation.</param>
+ <returns> If the operation was invoked synchronously (because there
+ was no need to queue the request), the return value is true;
+ otherwise, if the invocation was queued, the return value is false.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getIdentity">
+ <summary>
+ Returns the identity embedded in this proxy.
+ <returns>The identity of the target object.</returns>
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_identity(Ice.Identity)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the per-proxy context.
+ <param name="newIdentity">The identity for the new proxy.</param>
+ <returns>The proxy with the new identity.</returns>
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getContext">
+ <summary>
+ Returns the per-proxy context for this proxy.
+ </summary>
+ <returns>The per-proxy context. If the proxy does not have a per-proxy (implicit) context, the return value
+ is null.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_context(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the per-proxy context.
+ </summary>
+ <param name="newContext">The context for the new proxy.</param>
+ <returns>The proxy with the new per-proxy context.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getFacet">
+ <summary>
+ Returns the facet for this proxy.
+ </summary>
+ <returns>The facet for this proxy. If the proxy uses the default facet, the return value is the
+ empty string.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_facet(System.String)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the facet.
+ </summary>
+ <param name="newFacet">The facet for the new proxy.</param>
+ <returns>The proxy with the new facet.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getAdapterId">
+ <summary>
+ Returns the adapter ID for this proxy.
+ </summary>
+ <returns>The adapter ID. If the proxy does not have an adapter ID, the return value is the
+ empty string.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_adapterId(System.String)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the adapter ID.
+ </summary>
+ <param name="newAdapterId">The adapter ID for the new proxy.</param>
+ <returns>The proxy with the new adapter ID.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getEndpoints">
+ <summary>
+ Returns the endpoints used by this proxy.
+ </summary>
+ <returns>The endpoints used by this proxy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_endpoints(Ice.Endpoint[])">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the endpoints.
+ </summary>
+ <param name="newEndpoints">The endpoints for the new proxy.</param>
+ <returns>The proxy with the new endpoints.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getLocatorCacheTimeout">
+ <summary>
+ Returns the locator cache timeout of this proxy.
+ </summary>
+ <returns>The locator cache timeout value (in seconds).</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_locatorCacheTimeout(System.Int32)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the locator cache timeout.
+ </summary>
+ <param name="newTimeout">The new locator cache timeout (in seconds).</param>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isConnectionCached">
+ <summary>
+ Returns whether this proxy caches connections.
+ </summary>
+ <returns>True if this proxy caches connections; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_connectionCached(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for connection caching.
+ </summary>
+ <param name="newCache">True if the new proxy should cache connections; false, otherwise.</param>
+ <returns>The new proxy with the specified caching policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getEndpointSelection">
+ <summary>
+ Returns how this proxy selects endpoints (randomly or ordered).
+ </summary>
+ <returns>The endpoint selection policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_endpointSelection(Ice.EndpointSelectionType)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the endpoint selection policy.
+ </summary>
+ <param name="newType">The new endpoint selection policy.</param>
+ <returns>The new proxy with the specified endpoint selection policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isSecure">
+ <summary>
+ Returns whether this proxy communicates only via secure endpoints.
+ </summary>
+ <returns>True if this proxy communicates only vi secure endpoints; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_secure(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for how it selects endpoints.
+ </summary>
+ <param name="b"> If b is true, only endpoints that use a secure transport are
+ used by the new proxy. If b is false, the returned proxy uses both secure and insecure
+ endpoints.</param>
+ <returns>The new proxy with the specified selection policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isPreferSecure">
+ <summary>
+ Returns whether this proxy prefers secure endpoints.
+ </summary>
+ <returns>True if the proxy always attempts to invoke via secure endpoints before it
+ attempts to use insecure endpoints; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_preferSecure(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for its endpoint selection policy.
+ </summary>
+ <param name="b">If b is true, the new proxy will use secure endpoints for invocations
+ and only use insecure endpoints if an invocation cannot be made via secure endpoints. If b is
+ false, the proxy prefers insecure endpoints to secure ones.</param>
+ <returns>The new proxy with the new endpoint selection policy.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getRouter">
+ <summary>
+ Returns the router for this proxy.
+ </summary>
+ <returns>The router for the proxy. If no router is configured for the proxy, the return value
+ is null.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_router(Ice.RouterPrx)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the router.
+ </summary>
+ <param name="router">The router for the new proxy.</param>
+ <returns>The new proxy with the specified router.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getLocator">
+ <summary>
+ Returns the locator for this proxy.
+ </summary>
+ <returns>The locator for this proxy. If no locator is configured, the return value is null.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_locator(Ice.LocatorPrx)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for the locator.
+ </summary>
+ <param name="locator">The locator for the new proxy.</param>
+ <returns>The new proxy with the specified locator.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isCollocationOptimized">
+ <summary>
+ Returns whether this proxy uses collocation optimization.
+ </summary>
+ <returns>True if the proxy uses collocation optimization; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_collocationOptimized(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for collocation optimization.
+ </summary>
+ <param name="b">True if the new proxy enables collocation optimization; false, otherwise.</param>
+ <returns>The new proxy the specified collocation optimization.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_twoway">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses twoway invocations.
+ </summary>
+ <returns>A new proxy that uses twoway invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isTwoway">
+ <summary>
+ Returns whether this proxy uses twoway invocations.
+ </summary>
+ <returns>True if this proxy uses twoway invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_oneway">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses oneway invocations.
+ </summary>
+ <returns>A new proxy that uses oneway invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isOneway">
+ <summary>
+ Returns whether this proxy uses oneway invocations.
+ </summary>
+ <returns>True if this proxy uses oneway invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_batchOneway">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses batch oneway invocations.
+ </summary>
+ <returns>A new proxy that uses batch oneway invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isBatchOneway">
+ <summary>
+ Returns whether this proxy uses batch oneway invocations.
+ </summary>
+ <returns>True if this proxy uses batch oneway invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_datagram">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses datagram invocations.
+ </summary>
+ <returns>A new proxy that uses datagram invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isDatagram">
+ <summary>
+ Returns whether this proxy uses datagram invocations.
+ </summary>
+ <returns>True if this proxy uses datagram invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_batchDatagram">
+ <summary>
+ Creates a new proxy that is identical to this proxy, but uses batch datagram invocations.
+ </summary>
+ <returns>A new proxy that uses batch datagram invocations.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_isBatchDatagram">
+ <summary>
+ Returns whether this proxy uses batch datagram invocations.
+ </summary>
+ <returns>True if this proxy uses batch datagram invocations; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_compress(System.Boolean)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for compression.
+ </summary>
+ <param name="co">True enables compression for the new proxy; false disables compression.</param>
+ <returns>A new proxy with the specified compression setting.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_timeout(System.Int32)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for its timeout setting.
+ </summary>
+ <param name="t">The timeout for the new proxy in milliseconds.</param>
+ <returns>A new proxy with the specified timeout.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_connectionId(System.String)">
+ <summary>
+ Creates a new proxy that is identical to this proxy, except for its connection ID.
+ </summary>
+ <param name="connectionId">The connection ID for the new proxy. An empty string removes the
+ connection ID.</param>
+ <returns>A new proxy with the specified connection ID.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getConnectionId">
+ <summary>
+ Returns the connection id of this proxy.
+ </summary>
+ <returns>The connection id.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getConnection">
+ <summary>
+ Returns the Connection for this proxy. If the proxy does not yet have an established connection,
+ it first attempts to create a connection.
+ </summary>
+ <returns>The Connection for this proxy.</returns>
+ <exception name="CollocationOptimizationException">If the proxy uses collocation optimization and denotes a
+ collocated object.</exception>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_getCachedConnection">
+ <summary>
+ Returns the cached Connection for this proxy. If the proxy does not yet have an established
+ connection, it does not attempt to create a connection.
+ </summary>
+ <returns>The cached Connection for this proxy (null if the proxy does not have
+ an established connection).</returns>
+ <exception name="CollocationOptimizationException">If the proxy uses collocation optimization and denotes a
+ collocated object.</exception>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_flushBatchRequests">
+ <summary>
+ Flushes any pending batched requests for this communicator. The call blocks until the flush is complete.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.ice_flushBatchRequests_async(Ice.AMI_Object_ice_flushBatchRequests)">
+ <summary>
+ Asynchronously flushes any pending batched requests for this communicator. The call does not block.
+ </summary>
+ <param name="cb">The callback object to notify the application when the flush is complete.</param>
+ <returns>True if the requests were flushed immediately without blocking; false
+ if the requests could not be flushed immediately.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.Equals(System.Object)">
+ <summary>
+ Returns whether this proxy equals the passed object. Two proxies are equal if they are equal in all
+ respects, that is, if their object identity, endpoints timeout settings, and so on are all equal.
+ </summary>
+ <param name="r">The object to compare this proxy with.</param>
+ <returns>True if this proxy is equal to r; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.Equals(Ice.ObjectPrxHelperBase,Ice.ObjectPrxHelperBase)">
+ <summary>
+ Returns whether two proxies are equal. Two proxies are equal if they are equal in all
+ respects, that is, if their object identity, endpoints timeout settings, and so on are all equal.
+ </summary>
+ <param name="lhs">A proxy to compare with the proxy rhs.</param>
+ <param name="rhs">A proxy to compare with the proxy lhs.</param>
+ <returns>True if the proxies are equal; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.op_Equality(Ice.ObjectPrxHelperBase,Ice.ObjectPrxHelperBase)">
+ <summary>
+ Returns whether two proxies are equal. Two proxies are equal if they are equal in all
+ respects, that is, if their object identity, endpoints timeout settings, and so on are all equal.
+ </summary>
+ <param name="lhs">A proxy to compare with the proxy rhs.</param>
+ <param name="rhs">A proxy to compare with the proxy lhs.</param>
+ <returns>True if the proxies are equal; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelperBase.op_Inequality(Ice.ObjectPrxHelperBase,Ice.ObjectPrxHelperBase)">
+ <summary>
+ Returns whether two proxies are not equal. Two proxies are equal if they are equal in all
+ respects, that is, if their object identity, endpoints timeout settings, and so on are all equal.
+ </summary>
+ <param name="lhs">A proxy to compare with the proxy rhs.</param>
+ <param name="rhs">A proxy to compare with the proxy lhs.</param>
+ <returns>True if the proxies are not equal; false, otherwise.</returns>
+ </member>
+ <member name="T:Ice.ObjectPrxHelper">
+ <summary>
+ Base class for all proxy helpers.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectPrxHelper.checkedCast(Ice.ObjectPrx)">
+ <summary>
+ Casts a proxy to {@link ObjectPrx}. This call contacts
+ the server and will throw an Ice run-time exception if the target
+ object does not exist or the server cannot be reached.
+ </summary>
+ <param name="b">The proxy to cast to ObjectPrx.</param>
+ <returns>b.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelper.checkedCast(Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Casts a proxy to {@link ObjectPrx}. This call contacts
+ the server and throws an Ice run-time exception if the target
+ object does not exist or the server cannot be reached.
+ </summary>
+ <param name="b">The proxy to cast to ObjectPrx.</param>
+ <param name="ctx">The Context map for the invocation.</param>
+ <returns>b.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelper.checkedCast(Ice.ObjectPrx,System.String)">
+ <summary>
+ Creates a new proxy that is identical to the passed proxy, except
+ for its facet. This call contacts
+ the server and throws an Ice run-time exception if the target
+ object does not exist, the specified facet does not exist, or the server cannot be reached.
+ </summary>
+ <param name="b">The proxy to cast to ObjectPrx.</param>
+ <param name="f">The facet for the new proxy.</param>
+ <returns>The new proxy with the specified facet.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelper.checkedCast(Ice.ObjectPrx,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Creates a new proxy that is identical to the passed proxy, except
+ for its facet. This call contacts
+ the server and throws an Ice run-time exception if the target
+ object does not exist, the specified facet does not exist, or the server cannot be reached.
+ </summary>
+ <param name="b">The proxy to cast to ObjectPrx.</param>
+ <param name="f">The facet for the new proxy.</param>
+ <param name="ctx">The Context map for the invocation.</param>
+ <returns>The new proxy with the specified facet.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelper.uncheckedCast(Ice.ObjectPrx)">
+ <summary>
+ Casts a proxy to {@link ObjectPrx}. This call does
+ not contact the server and always succeeds.
+ </summary>
+ <param name="b">The proxy to cast to ObjectPrx.</param>
+ <returns>b.</returns>
+ </member>
+ <member name="M:Ice.ObjectPrxHelper.uncheckedCast(Ice.ObjectPrx,System.String)">
+ <summary>
+ Creates a new proxy that is identical to the passed proxy, except
+ for its facet. This call does not contact the server and always succeeds.
+ </summary>
+ <param name="b">The proxy to cast to ObjectPrx.</param>
+ <param name="f">The facet for the new proxy.</param>
+ <returns>The new proxy with the specified facet.</returns>
+ </member>
+ <member name="T:Ice.ProxyIdentityKey">
+ <summary>
+ This class allows a proxy to be used as the key for a hashed collection.
+ The GetHashCode, Equals, and Compare methods are based on the object identity
+ of the proxy.
+ </summary>
+ </member>
+ <member name="M:Ice.ProxyIdentityKey.GetHashCode(System.Object)">
+ <summary>
+ Computes a hash value based on the object identity of the proxy.
+ </summary>
+ <param name="obj">The proxy whose hash value to compute.</param>
+ <returns>The hash value for the proxy based on the identity.</returns>
+ </member>
+ <member name="M:Ice.ProxyIdentityKey.Equals(System.Object,System.Object)">
+ Compares two proxies for equality.
+ <param name="obj1">A proxy to compare.</param>
+ <param name="obj2">A proxy to compare.</param>
+ <returns>True if the passed proxies have the same object
+ identity; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ProxyIdentityKey.Compare(System.Object,System.Object)">
+ Compares two proxies using the object identity for comparison.
+ <param name="obj1">A proxy to compare.</param>
+ <param name="obj2">A proxy to compare.</param>
+ <returns>&lt; 0 if obj1 is less than obj2; &gt; 0 if obj1 is greater than obj2;
+ 0, otherwise.</returns>
+ </member>
+ <member name="T:Ice.ProxyIdentityFacetKey">
+ <summary>
+ This class allows a proxy to be used as the key for a hashed collection.
+ The GetHashCode, Equals, and Compare methods are based on the object identity and
+ the facet of the proxy.
+ </summary>
+ </member>
+ <member name="M:Ice.ProxyIdentityFacetKey.GetHashCode(System.Object)">
+ <summary>
+ Computes a hash value based on the object identity and facet of the proxy.
+ </summary>
+ <param name="obj">The proxy whose hash value to compute.</param>
+ <returns>The hash value for the proxy based on the identity and facet.</returns>
+ </member>
+ <member name="M:Ice.ProxyIdentityFacetKey.Equals(System.Object,System.Object)">
+ Compares two proxies for equality.
+ <param name="obj1">A proxy to compare.</param>
+ <param name="obj2">A proxy to compare.</param>
+ <returns>True if the passed proxies have the same object
+ identity and facet; false, otherwise.</returns>
+ </member>
+ <member name="M:Ice.ProxyIdentityFacetKey.Compare(System.Object,System.Object)">
+ Compares two proxies using the object identity and facet for comparison.
+ <param name="obj1">A proxy to compare.</param>
+ <param name="obj2">A proxy to compare.</param>
+ <returns>&lt; 0 if obj1 is less than obj2; &gt; 0 if obj1 is greater than obj2;
+ 0, otherwise.</returns>
+ </member>
+ <member name="T:Ice.InputStream">
+ <summary>
+ Interface for input streams used to extract Slice types from a sequence of bytes.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.communicator">
+ <summary>
+ Returns the communicator for this input stream.
+ </summary>
+ <returns>The communicator.</returns>
+ </member>
+ <member name="M:Ice.InputStream.sliceObjects(System.Boolean)">
+ <summary>
+ Determines the behavior of the stream when extracting Slice objects.
+ A Slice object is "sliced" when a factory cannot be found for a Slice type ID.
+ </summary>
+ <param name="slice">If true (the default), slicing is enabled; if false,
+ slicing is disabled. If slicing is disabled and the stream encounters a Slice type ID
+ during decoding for which no object factory is installed, it raises NoObjectFactoryException.</param>
+ </member>
+ <member name="M:Ice.InputStream.readBool">
+ <summary>
+ Extracts a boolean value from the stream.
+ </summary>
+ <returns>The extracted boolean.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readBoolSeq">
+ <summary>
+ Extracts a sequence of boolean values from the stream.
+ </summary>
+ <returns>The extracted boolean sequence.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readByte">
+ <summary>
+ Extracts a byte value from the stream.
+ </summary>
+ <returns>The extracted byte.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readByteSeq">
+ <summary>
+ Extracts a sequence of byte values from the stream.
+ </summary>
+ <returns>The extracted byte sequence.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readSerializable">
+ <summary>
+ Extracts a serializable .NET object from the stream.
+ </summary>
+ <returns>The deserialized .NET object.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readShort">
+ <summary>
+ Extracts a short value from the stream.
+ </summary>
+ <returns>The extracted short value.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readShortSeq">
+ <summary>
+ Extracts a sequence of short values from the stream.
+ </summary>
+ <returns>The extracted short sequence.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readInt">
+ <summary>
+ Extracts an integer value from the stream.
+ </summary>
+ <returns>The extracted integer value.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readIntSeq">
+ <summary>
+ Extracts a sequence of integer values from the stream.
+ </summary>
+ <returns>The extracted integer sequence.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readLong">
+ <summary>
+ Extracts a long value from the stream.
+ </summary>
+ <returns>The extracted long value.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readLongSeq">
+ <summary>
+ Extracts a sequence of long values from the stream.
+ </summary>
+ <returns>The extracted long sequence.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readFloat">
+ <summary>
+ Extracts a float value from the stream.
+ </summary>
+ <returns>The extracted float value.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readFloatSeq">
+ <summary>
+ Extracts a sequence of float values from the stream.
+ </summary>
+ <returns>The extracted float sequence.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readDouble">
+ <summary>
+ Extracts a double value from the stream.
+ </summary>
+ <returns>The extracted double value.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readDoubleSeq">
+ <summary>
+ Extracts a sequence of double values from the stream.
+ </summary>
+ <returns>The extracted double sequence.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readString">
+ <summary>
+ Extracts a string from the stream.
+ </summary>
+ <returns>The extracted double value.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readStringSeq">
+ <summary>
+ Extracts a sequence of strings from the stream.
+ </summary>
+ <returns>The extracted string sequence.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readSize">
+ <summary>
+ Extracts a size from the stream.
+ </summary>
+ <returns>The extracted size.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readAndCheckSeqSize(System.Int32)">
+ <summary>
+ Extracts and check a sequence size from the stream. The check ensures not too much memory will
+ be pre-allocated for the sequence.
+ </summary>
+ <param name="minSize">The minimum size of an element of the sequence.</param>
+ <returns>The extracted size.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readProxy">
+ <summary>
+ Extracts a proxy from the stream.
+ </summary>
+ <returns>The extracted proxy.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readObject(Ice.ReadObjectCallback)">
+ <summary>
+ Extracts the index of a Slice class from the stream.
+ </summary>
+ <param name="cb">The callback to notify the application when the extracted instance is available.
+ The Ice run time extracts Slice classes in stages. The Ice run time calls ReadObjectCallback.invoke
+ when the corresponding instance has been fully unmarshaled.</param>
+ </member>
+ <member name="M:Ice.InputStream.readTypeId">
+ <summary>
+ Extracts a Slice type ID from the stream.
+ </summary>
+ <returns>The extracted type ID.</returns>
+ </member>
+ <member name="M:Ice.InputStream.throwException">
+ <summary>
+ Extracts a user exception from the stream and throws it.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.startSlice">
+ <summary>
+ Reads the start of an object or exception slice.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.endSlice">
+ <summary>
+ Indicates that the end of an object or exception slice has been reached.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.skipSlice">
+ <summary>
+ Skips over an object or exception slice.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.startEncapsulation">
+ <summary>
+ Reads the start of an encapsulation.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.endEncapsulation">
+ <summary>
+ Indicates that the end of an encapsulation has been reached.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.skipEncapsulation">
+ <summary>
+ Skips over an encapsulation.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.getEncapsulationSize">
+ <summary>
+ Returns the size of the current encapsulation.
+ </summary>
+ <returns>The size of the current encapsulation.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readBlob(System.Int32)">
+ <summary>
+ Reads the specified number of bytes from the stream.
+ </summary>
+ <returns>The bytes read.</returns>
+ </member>
+ <member name="M:Ice.InputStream.readPendingObjects">
+ <summary>
+ Indicates that unmarshaling is complete, except for any Slice objects. The application must
+ call this method only if the stream actually contains Slice objects. Calling readPendingObjects
+ triggers the calls to ReadObjectCallback.invoke that inform the application that unmarshaling
+ of a Slice object is complete.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.rewind">
+ <summary>
+ Resets the read position of the stream to the beginning.
+ </summary>
+ </member>
+ <member name="M:Ice.InputStream.destroy">
+ <summary>
+ Destroys the stream and its associated resources. The application must call destroy prior
+ to releasing the last reference to a stream; failure to do so may result in resource leaks.
+ </summary>
+ </member>
+ <member name="T:Ice.OutputStream">
+ <summary>
+ Interface for output streams used to write Slice types to a sequence
+ of bytes.
+ </summary>
+ </member>
+ <member name="M:Ice.OutputStream.communicator">
+ <summary>
+ Returns the communicator for this output stream.
+ </summary>
+ </member>
+ <member name="M:Ice.OutputStream.writeBool(System.Boolean)">
+ <summary>
+ Writes a boolean to the stream.
+ </summary>
+ <param name="v">The boolean to write to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeBoolSeq(System.Boolean[])">
+ <summary>
+ Writes a sequence of booleans to the stream.
+ </summary>
+ <param name="v">The sequence of booleans to write.
+ Passing null causes an empty sequence to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeByte(System.Byte)">
+ <summary>
+ Writes a byte to the stream.
+ </summary>
+ <param name="v">The byte to write to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeByteSeq(System.Byte[])">
+ <summary>
+ Writes a sequence of bytes to the stream.
+ </summary>
+ <param name="v">The sequence of bytes to write.
+ Passing null causes an empty sequence to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeSerializable(System.Object)">
+ <summary>
+ Writes a serializable .NET object to the stream.
+ </summary>
+ <param name="v">The serializable object to write.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeShort(System.Int16)">
+ <summary>
+ Writes a short to the stream.
+ </summary>
+ <param name="v">The short to write to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeShortSeq(System.Int16[])">
+ <summary>
+ Writes a sequence of shorts to the stream.
+ </summary>
+ <param name="v">The sequence of shorts to write.
+ Passing null causes an empty sequence to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeInt(System.Int32)">
+ <summary>
+ Writes an integer to the stream.
+ </summary>
+ <param name="v">The integer to write to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeIntSeq(System.Int32[])">
+ <summary>
+ Writes a sequence of integers to the stream.
+ </summary>
+ <param name="v">The sequence of integers to write.
+ Passing null causes an empty sequence to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeLong(System.Int64)">
+ <summary>
+ Writes a long to the stream.
+ </summary>
+ <param name="v">The long to write to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeLongSeq(System.Int64[])">
+ <summary>
+ Writes a sequence of longs to the stream.
+ </summary>
+ <param name="v">The sequence of longs to write.
+ Passing null causes an empty sequence to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeFloat(System.Single)">
+ <summary>
+ Writes a float to the stream.
+ </summary>
+ <param name="v">The float to write to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeFloatSeq(System.Single[])">
+ <summary>
+ Writes a sequence of floats to the stream.
+ </summary>
+ <param name="v">The sequence of floats to write.
+ Passing null causes an empty sequence to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeDouble(System.Double)">
+ <summary>
+ Writes a double to the stream.
+ </summary>
+ <param name="v">The double to write to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeDoubleSeq(System.Double[])">
+ <summary>
+ Writes a sequence of doubles to the stream.
+ </summary>
+ <param name="v">The sequence of doubles to write.
+ Passing null causes an empty sequence to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeString(System.String)">
+ <summary>
+ Writes a string to the stream.
+ </summary>
+ <param name="v">The string to write to the stream.
+ Passing null causes an empty string to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeStringSeq(System.String[])">
+ <summary>
+ Writes a sequence of strings to the stream.
+ </summary>
+ <param name="v">The sequence of strings to write.
+ Passing null causes an empty sequence to be written to the stream.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeSize(System.Int32)">
+ <summary>
+ Writes a size to the stream.
+ </summary>
+ <param name="sz">The size to write.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeProxy(Ice.ObjectPrx)">
+ <summary>
+ Writes a proxy to the stream.
+ </summary>
+ <param name="v">The proxy to write.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeObject(Ice.Object)">
+ <summary>
+ Writes a Slice class to the stream.
+ </summary>
+ <param name="v">The class to write. This method writes the index of a Slice class; the state of the
+ class is written once writePendingObjects is called.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeTypeId(System.String)">
+ <summary>
+ Writes a Slice type ID to the stream.
+ </summary>
+ <param name="id">The Slice type ID to write.</param>
+ </member>
+ <member name="M:Ice.OutputStream.writeException(Ice.UserException)">
+ <summary>
+ Writes a user exception to the stream.
+ </summary>
+ <param name="ex">The user exception to write.</param>
+ </member>
+ <member name="M:Ice.OutputStream.startSlice">
+ <summary>
+ Writes the start of a slice to the stream.
+ </summary>
+ </member>
+ <member name="M:Ice.OutputStream.endSlice">
+ <summary>
+ Ends the previous slice.
+ </summary>
+ </member>
+ <member name="M:Ice.OutputStream.startEncapsulation">
+ <summary>
+ Writes the start of an encapsulation to the stream.
+ </summary>
+ </member>
+ <member name="M:Ice.OutputStream.endEncapsulation">
+ <summary>
+ Ends the previous encapsulation.
+ </summary>
+ </member>
+ <member name="M:Ice.OutputStream.writeBlob(System.Byte[])">
+ <summary>
+ Writes the specified bytes onto the stream.
+ </summary>
+ </member>
+ <member name="M:Ice.OutputStream.writePendingObjects">
+ <summary>
+ Writes the state of Slice classes whose index was previously
+ written with writeObject to the stream.
+ </summary>
+ </member>
+ <member name="M:Ice.OutputStream.finished">
+ <summary>
+ Indicates that the marshaling of a request or reply is finished.
+ </summary>
+ <returns>The byte sequence containing the encoded request or reply.</returns>
+ </member>
+ <member name="M:Ice.OutputStream.reset(System.Boolean)">
+ <summary>
+ Resets this output stream. This method allows the stream to be reused, to avoid creating
+ unnecessary garbage.
+ </summary>
+
+ <param name="clearBuffer">If true, the stream's internal buffer becomes eligible for
+ garbage collection; if false, the stream's internal buffer is retained, to avoid
+ creating unnecessary garbage. If retained, the internal buffer may be resized to a smaller
+ capacity. Either way, reset resets the stream's writing position to zero.</param>
+ </member>
+ <member name="M:Ice.OutputStream.destroy">
+ <summary>
+ Destroys the stream and its associated resources. The application must call destroy prior
+ to releasing the last reference to a stream; failure to do so may result in resource leaks.
+ </summary>
+ </member>
+ <member name="T:Ice.ObjectReader">
+ <summary>
+ Base class for extracting objects from an input stream.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectReader.read(Ice.InputStream,System.Boolean)">
+ <summary>
+ @param in The input stream to read from.
+ @param rid If <code>true</code>, extraction begins by reading a Slice type ID
+ first. If <code>false</code>, the leading type ID is not read. This is used
+ by the unmarshaling code in case the type ID has already been read as part
+ of other unmarshaling activities.
+ </summary>
+ </member>
+ <member name="T:Ice.ObjectWriter">
+ <summary>
+ Base class for writing objects to an output stream.
+ </summary>
+ </member>
+ <member name="M:Ice.ObjectWriter.write(Ice.OutputStream)">
+ <summary>
+ Writes the state of this Slice class to an output stream.
+ </summary>
+ <param name="outStream">The stream to write to.</param>
+ </member>
+ <member name="T:Ice.ThreadHookPlugin">
+ <summary>
+ Class to support thread notification hooks. Applications using
+ thread notification hooks instantiate a ThreadHookPlugin with a
+ thread notification hook and return the instance from their
+ PluginFactory implementation.
+ </summary>
+ </member>
+ <member name="M:Ice.ThreadHookPlugin.#ctor(Ice.Communicator,Ice.ThreadNotification)">
+ <summary>
+ Installs a custom logger for a communicator.
+ </summary>
+ <param name="communicator">The communicator using the thread notification hook.</param>
+ <param name="threadHook">The thread notification hook for the communicator.</param>
+ </member>
+ <member name="M:Ice.ThreadHookPlugin.initialize">
+ <summary>
+ Called by the Ice run time during communicator initialization. The derived class
+ can override this method to perform any initialization that might be required
+ by the thread notification hook.
+ </summary>
+ </member>
+ <member name="M:Ice.ThreadHookPlugin.destroy">
+ <summary>
+ Called by the Ice run time when the communicator is destroyed. The derived class
+ can override this method to perform any finalization that might be required
+ by thread notification hook.
+ </summary>
+ </member>
+ <member name="T:Ice.TieBase">
+ <summary>
+ Interface for servants using the tie mapping.
+ </summary>
+ </member>
+ <member name="M:Ice.TieBase.ice_delegate">
+ <summary>
+ Returns the delegate for this tie.
+ </summary>
+ <returns>The delegate.</returns>
+ </member>
+ <member name="M:Ice.TieBase.ice_delegate(System.Object)">
+ <summary>
+ Returns the delegate for this tie.
+ </summary>
+ <param name="o">The delegate.</param>
+ </member>
+ <member name="T:Ice.ThreadNotification">
+ <summary>
+ Interface for thread notification hooks. Applications can derive
+ a class tat implements the start and stop
+ methods to intercept creation and destruction of threads created
+ by the Ice run time.
+ </summary>
+ </member>
+ <member name="M:Ice.ThreadNotification.start">
+ <summary>
+ The Ice run time calls start for each new
+ thread it creates. The call is made by the newly-started thread.
+ </summary>
+ </member>
+ <member name="M:Ice.ThreadNotification.stop">
+ <summary>
+ The Ice run time calls stop before it destroys
+ a thread. The call is made by thread that is about to be
+ destroyed.
+ </summary>
+ </member>
+ <member name="T:Ice.Dispatcher">
+ <summary>
+ A delegate for the dispatcher. The dispatcher is called by the Ice
+ runtime to dispatch servant calls and AMI callbacks.
+ </summary>
+ </member>
+ <member name="T:Ice.InitializationData">
+ <summary>
+ A class that encpasulates data to initalize a communicator.
+ </summary>
+ </member>
+ <member name="M:Ice.InitializationData.Clone">
+ <summary>
+ Creates and returns a copy of this object.
+ </summary>
+ </member>
+ <member name="F:Ice.InitializationData.properties">
+ <summary>
+ The properties for the communicator.
+ </summary>
+ </member>
+ <member name="F:Ice.InitializationData.logger">
+ <summary>
+ The logger for the communicator.
+ </summary>
+ </member>
+ <member name="F:Ice.InitializationData.stats">
+ <summary>
+ The Stats instance for the communicator.
+ </summary>
+ </member>
+ <member name="F:Ice.InitializationData.threadHook">
+ <summary>
+ The thread hook for the communicator.
+ </summary>
+ </member>
+ <member name="F:Ice.InitializationData.dispatcher">
+ <summary>
+ The dispatcher for the communicator.
+ </summary>
+ </member>
+ <member name="T:Ice.Util">
+ <summary>
+ Utility methods for the Ice run time.
+ </summary>
+ </member>
+ <member name="M:Ice.Util.createProperties">
+ <summary>
+ Creates a new empty property set.
+ </summary>
+ <returns>A new empty property set.</returns>
+ </member>
+ <member name="M:Ice.Util.createProperties(System.String[]@)">
+ <summary>
+ Creates a property set initialized from an argument vector.
+ </summary>
+ <param name="args">A command-line argument vector, possibly containing
+ options to set properties. If the command-line options include
+ a --Ice.Config option, the corresponding configuration
+ files are parsed. If the same property is set in a configuration
+ file and in the argument vector, the argument vector takes precedence.
+ This method modifies the argument vector by removing any Ice-related options.</param>
+ <returns>A property set initialized with the property settings
+ that were removed from args.</returns>
+ </member>
+ <member name="M:Ice.Util.createProperties(System.String[]@,Ice.Properties)">
+ <summary>
+ Creates a property set initialized from an argument vector.
+ </summary>
+ <param name="args">A command-line argument vector, possibly containing
+ options to set properties. If the command-line options include
+ a --Ice.Config option, the corresponding configuration
+ files are parsed. If the same property is set in a configuration
+ file and in the argument vector, the argument vector takes precedence.
+ This method modifies the argument vector by removing any Ice-related options.</param>
+ <param name="defaults">Default values for the property set. Settings in configuration
+ files and args override these defaults.</param>
+ <returns>A property set initialized with the property settings
+ that were removed from args.</returns>
+ </member>
+ <member name="M:Ice.Util.initialize(System.String[]@)">
+ <summary>
+ Creates a communicator.
+ </summary>
+ <param name="args">A command-line argument vector. Any Ice-related options
+ in this vector are used to intialize the communicator.
+ This method modifies the argument vector by removing any Ice-related options.</param>
+ <returns>The initialized communicator.</returns>
+ </member>
+ <member name="M:Ice.Util.initialize(System.String[]@,Ice.InitializationData)">
+ <summary>
+ Creates a communicator.
+ </summary>
+ <param name="args">A command-line argument vector. Any Ice-related options
+ in this vector are used to intialize the communicator.
+ This method modifies the argument vector by removing any Ice-related options.</param>
+ <param name="initData">Additional intialization data. Property settings in args
+ override property settings in initData.</param>
+ <returns>The initialized communicator.</returns>
+ </member>
+ <member name="M:Ice.Util.initialize(Ice.InitializationData)">
+ <summary>
+ Creates a communicator.
+ </summary>
+ <param name="initData">Additional intialization data.</param>
+ <returns>The initialized communicator.</returns>
+ </member>
+ <member name="M:Ice.Util.initialize">
+ <summary>
+ Creates a communicator using a default configuration.
+ </summary>
+ </member>
+ <member name="M:Ice.Util.stringToIdentity(System.String)">
+ <summary>
+ Converts a string to an object identity.
+ </summary>
+ <param name="s">The string to convert.</param>
+ <returns>The converted object identity.</returns>
+ </member>
+ <member name="M:Ice.Util.identityToString(Ice.Identity)">
+ <summary>
+ Converts an object identity to a string.
+ </summary>
+ <param name="ident">The object identity to convert.</param>
+ <returns>The string representation of the object identity.</returns>
+ </member>
+ <member name="M:Ice.Util.generateUUID">
+ <summary>
+ This method is deprecated. Use System.Guid instead.
+ </summary>
+ </member>
+ <member name="M:Ice.Util.proxyIdentityCompare(Ice.ObjectPrx,Ice.ObjectPrx)">
+ <summary>
+ Compares the object identities of two proxies.
+ </summary>
+ <param name="lhs">A proxy.</param>
+ <param name="rhs">A proxy.</param>
+ <returns>-1 if the identity in lhs compares
+ less than the identity in rhs; 0 if the identities
+ compare equal; 1, otherwise.</returns>
+ </member>
+ <member name="M:Ice.Util.proxyIdentityAndFacetCompare(Ice.ObjectPrx,Ice.ObjectPrx)">
+ <summary>
+ Compares the object identities and facets of two proxies.
+ </summary>
+ <param name="lhs">A proxy.</param>
+ <param name="rhs">A proxy.</param>
+ <returns>-1 if the identity and facet in lhs compare
+ less than the identity and facet in rhs; 0 if the identities
+ and facets compare equal; 1, otherwise.</returns>
+ </member>
+ <member name="M:Ice.Util.createInputStream(Ice.Communicator,System.Byte[])">
+ <summary>
+ Creates an input stream for dynamic invocation and dispatch.
+ </summary>
+ <param name="communicator">The communicator for the stream.</param>
+ <param name="bytes">An encoded request or reply.</param>
+ <returns>The input stream.</returns>
+ </member>
+ <member name="M:Ice.Util.createOutputStream(Ice.Communicator)">
+ <summary>
+ Creates an output stream for dynamic invocation and dispatch.
+ </summary>
+ <param name="communicator">The communicator for the stream.</param>
+ <returns>The output stream.</returns>
+ </member>
+ <member name="M:Ice.Util.getProcessLogger">
+ <summary>
+ Returns the process-wide logger.
+ </summary>
+ <returns>The process-wide logger.</returns>
+ </member>
+ <member name="M:Ice.Util.setProcessLogger(Ice.Logger)">
+ <summary>
+ Changes the process-wide logger.
+ </summary>
+ <param name="logger">The new process-wide logger.</param>
+ </member>
+ <member name="M:Ice.Util.stringVersion">
+ <summary>
+ Returns the Ice version in the form A.B.C, where A indicates the
+ major version, B indicates the minor version, and C indicates the
+ patch level.
+ </summary>
+ <returns>The Ice version.</returns>
+ </member>
+ <member name="M:Ice.Util.intVersion">
+ <summary>
+ Returns the Ice version as an integer in the form A.BB.CC, where A
+ indicates the major version, BB indicates the minor version, and CC
+ indicates the patch level. For example, for Ice 3.3.1, the returned value is 30301.
+ </summary>
+ <returns>The Ice version.</returns>
+ </member>
+ <member name="T:Ice.InitializationException">
+ <summary>
+ This exception is raised when a failure occurs during initialization.
+ </summary>
+ </member>
+ <member name="T:Ice.PluginInitializationException">
+ <summary>
+ This exception indicates that a failure occurred while initializing
+ a plug-in.
+ </summary>
+ </member>
+ <member name="T:Ice.CollocationOptimizationException">
+ <summary>
+ This exception is raised if a feature is requested that is not
+ supported with collocation optimization.
+ </summary>
+ </member>
+ <member name="T:Ice.AlreadyRegisteredException">
+ <summary>
+ An attempt was made to register something more than once with
+ the Ice run time.
+ This exception is raised if an attempt is made to register a
+ servant, servant locator, facet, object factory, plug-in, object
+ adapter, object, or user exception factory more than once for the
+ same ID.
+ </summary>
+ </member>
+ <member name="T:Ice.NotRegisteredException">
+ <summary>
+ An attempt was made to find or deregister something that is not
+ registered with the Ice run time or Ice locator.
+ This exception is raised if an attempt is made to remove a servant,
+ servant locator, facet, object factory, plug-in, object adapter,
+ object, or user exception factory that is not currently registered.
+
+ It's also raised if the Ice locator can't find an object or object
+ adapter when resolving an indirect proxy or when an object adapter
+ is activated.
+ </summary>
+ </member>
+ <member name="T:Ice.TwowayOnlyException">
+ <summary>
+ The operation can only be invoked with a twoway request.
+ This exception is raised if an attempt is made to invoke an
+ operation with ice_oneway, ice_batchOneway, ice_datagram,
+ or ice_batchDatagram and the operation has a return value,
+ out-parameters, or an exception specification.
+ </summary>
+ </member>
+ <member name="T:Ice.CloneNotImplementedException">
+ <summary>
+ An attempt was made to clone a class that does not support
+ cloning.
+ This exception is raised if ice_clone is called on
+ a class that is derived from an abstract Slice class (that is,
+ a class containing operations), and the derived class does not
+ provide an implementation of the ice_clone operation (C++ only).
+ </summary>
+ </member>
+ <member name="T:Ice.UnknownException">
+ <summary>
+ This exception is raised if an operation call on a server raises an
+ unknown exception.
+ For example, for C++, this exception is raised
+ if the server throws a C++ exception that is not directly or
+ indirectly derived from Ice::LocalException or
+ Ice::UserException.
+ </summary>
+ </member>
+ <member name="T:Ice.UnknownLocalException">
+ <summary>
+ This exception is raised if an operation call on a server raises a
+ local exception.
+ Because local exceptions are not transmitted by
+ the Ice protocol, the client receives all local exceptions raised
+ by the server as UnknownLocalException. The only exception to this
+ rule are all exceptions derived from RequestFailedException,
+ which are transmitted by the Ice protocol even though they are
+ declared local.
+ </summary>
+ </member>
+ <member name="T:Ice.UnknownUserException">
+ <summary>
+ An operation raised an incorrect user exception.
+ This exception is raised if an operation raises a
+ user exception that is not declared in the exception's
+ throws clause. Such undeclared exceptions are
+ not transmitted from the server to the client by the Ice
+ protocol, but instead the client just gets an
+ UnknownUserException. This is necessary in order to not violate
+ the contract established by an operation's signature: Only local
+ exceptions and user exceptions declared in the
+ throws clause can be raised.
+ </summary>
+ </member>
+ <member name="T:Ice.VersionMismatchException">
+ <summary>
+ This exception is raised if the Ice library version does not match
+ the version in the Ice header files.
+ </summary>
+ </member>
+ <member name="T:Ice.CommunicatorDestroyedException">
+ <summary>
+ This exception is raised if the Communicator has been destroyed.
+ </summary>
+ </member>
+ <member name="T:Ice.ObjectAdapterDeactivatedException">
+ <summary>
+ This exception is raised if an attempt is made to use a deactivated
+ ObjectAdapter.
+ </summary>
+ </member>
+ <member name="T:Ice.ObjectAdapterIdInUseException">
+ <summary>
+ This exception is raised if an ObjectAdapter cannot be activated.
+ This happens if the Locator detects another active ObjectAdapter with
+ the same adapter id.
+ </summary>
+ </member>
+ <member name="T:Ice.NoEndpointException">
+ <summary>
+ This exception is raised if no suitable endpoint is available.
+ </summary>
+ </member>
+ <member name="T:Ice.EndpointParseException">
+ <summary>
+ This exception is raised if there was an error while parsing an
+ endpoint.
+ </summary>
+ </member>
+ <member name="T:Ice.EndpointSelectionTypeParseException">
+ <summary>
+ This exception is raised if there was an error while parsing an
+ endpoint selection type.
+ </summary>
+ </member>
+ <member name="T:Ice.IdentityParseException">
+ <summary>
+ This exception is raised if there was an error while parsing a
+ stringified identity.
+ </summary>
+ </member>
+ <member name="T:Ice.ProxyParseException">
+ <summary>
+ This exception is raised if there was an error while parsing a
+ stringified proxy.
+ </summary>
+ </member>
+ <member name="T:Ice.IllegalIdentityException">
+ <summary>
+ This exception is raised if an illegal identity is encountered.
+ </summary>
+ </member>
+ <member name="T:Ice.RequestFailedException">
+ <summary>
+ This exception is raised if a request failed.
+ This exception, and
+ all exceptions derived from RequestFailedException, are
+ transmitted by the Ice protocol, even though they are declared
+ local.
+ </summary>
+ </member>
+ <member name="T:Ice.ObjectNotExistException">
+ <summary>
+ This exception is raised if an object does not exist on the server,
+ that is, if no facets with the given identity exist.
+ </summary>
+ </member>
+ <member name="T:Ice.FacetNotExistException">
+ <summary>
+ This exception is raised if no facet with the given name exists,
+ but at least one facet with the given identity exists.
+ </summary>
+ </member>
+ <member name="T:Ice.OperationNotExistException">
+ <summary>
+ This exception is raised if an operation for a given object does
+ not exist on the server.
+ Typically this is caused by either the
+ client or the server using an outdated Slice specification.
+ </summary>
+ </member>
+ <member name="T:Ice.SyscallException">
+ <summary>
+ This exception is raised if a system error occurred in the server
+ or client process.
+ There are many possible causes for such a system
+ exception. For details on the cause, SyscallException.error
+ should be inspected.
+ </summary>
+ </member>
+ <member name="T:Ice.SocketException">
+ <summary>
+ This exception indicates socket errors.
+ </summary>
+ </member>
+ <member name="T:Ice.FileException">
+ <summary>
+ This exception indicates file errors.
+ </summary>
+ </member>
+ <member name="T:Ice.ConnectFailedException">
+ <summary>
+ This exception indicates connection failures.
+ </summary>
+ </member>
+ <member name="T:Ice.ConnectionRefusedException">
+ <summary>
+ This exception indicates a connection failure for which
+ the server host actively refuses a connection.
+ </summary>
+ </member>
+ <member name="T:Ice.ConnectionLostException">
+ <summary>
+ This exception indicates a lost connection.
+ </summary>
+ </member>
+ <member name="T:Ice.DNSException">
+ <summary>
+ This exception indicates a DNS problem.
+ For details on the cause,
+ DNSException.error should be inspected.
+ </summary>
+ </member>
+ <member name="T:Ice.TimeoutException">
+ <summary>
+ This exception indicates a timeout condition.
+ </summary>
+ </member>
+ <member name="T:Ice.ConnectTimeoutException">
+ <summary>
+ This exception indicates a connection establishment timeout condition.
+ </summary>
+ </member>
+ <member name="T:Ice.CloseTimeoutException">
+ <summary>
+ This exception indicates a connection closure timeout condition.
+ </summary>
+ </member>
+ <member name="T:Ice.ConnectionTimeoutException">
+ <summary>
+ This exception indicates that a connection has been shut down because it has been
+ idle for some time.
+ </summary>
+ </member>
+ <member name="T:Ice.ProtocolException">
+ <summary>
+ A generic exception base for all kinds of protocol error
+ conditions.
+ </summary>
+ </member>
+ <member name="T:Ice.BadMagicException">
+ <summary>
+ This exception indicates that a message did not start with the expected
+ magic number ('I', 'c', 'e', 'P').
+ </summary>
+ </member>
+ <member name="T:Ice.UnsupportedProtocolException">
+ <summary>
+ This exception indicates an unsupported protocol version.
+ </summary>
+ </member>
+ <member name="T:Ice.UnsupportedEncodingException">
+ <summary>
+ This exception indicates an unsupported data encoding version.
+ </summary>
+ </member>
+ <member name="T:Ice.UnknownMessageException">
+ <summary>
+ This exception indicates that an unknown protocol message has been received.
+ </summary>
+ </member>
+ <member name="T:Ice.ConnectionNotValidatedException">
+ <summary>
+ This exception is raised if a message is received over a connection
+ that is not yet validated.
+ </summary>
+ </member>
+ <member name="T:Ice.UnknownRequestIdException">
+ <summary>
+ This exception indicates that a response for an unknown request ID has been
+ received.
+ </summary>
+ </member>
+ <member name="T:Ice.UnknownReplyStatusException">
+ <summary>
+ This exception indicates that an unknown reply status has been received.
+ </summary>
+ </member>
+ <member name="T:Ice.CloseConnectionException">
+ <summary>
+ This exception indicates that the connection has been gracefully shut down by the
+ server.
+ The operation call that caused this exception has not been
+ executed by the server. In most cases you will not get this
+ exception, because the client will automatically retry the
+ operation call in case the server shut down the connection. However,
+ if upon retry the server shuts down the connection again, and the
+ retry limit has been reached, then this exception is propagated to
+ the application code.
+ </summary>
+ </member>
+ <member name="T:Ice.ForcedCloseConnectionException">
+ <summary>
+ This exception is raised by an operation call if the application
+ forcefully closes the connection Connection.close.
+ </summary>
+ </member>
+ <member name="T:Ice.IllegalMessageSizeException">
+ <summary>
+ This exception indicates that a message size is less
+ than the minimum required size.
+ </summary>
+ </member>
+ <member name="T:Ice.CompressionException">
+ <summary>
+ This exception indicates a problem with compressing or uncompressing data.
+ </summary>
+ </member>
+ <member name="T:Ice.DatagramLimitException">
+ <summary>
+ A datagram exceeds the configured size.
+ This exception is raised if a datagram exceeds the configured send or receive buffer
+ size, or exceeds the maximum payload size of a UDP packet (65507 bytes).
+ </summary>
+ </member>
+ <member name="T:Ice.MarshalException">
+ <summary>
+ This exception is raised for errors during marshaling or unmarshaling data.
+ </summary>
+ </member>
+ <member name="T:Ice.ProxyUnmarshalException">
+ <summary>
+ This exception is raised if inconsistent data is received while unmarshaling a proxy.
+ </summary>
+ </member>
+ <member name="T:Ice.UnmarshalOutOfBoundsException">
+ <summary>
+ This exception is raised if an out-of-bounds condition occurs during unmarshaling.
+ </summary>
+ </member>
+ <member name="T:Ice.NoObjectFactoryException">
+ <summary>
+ This exception is raised if no suitable object factory was found during
+ unmarshaling of a Slice class instance.
+ </summary>
+ </member>
+ <member name="T:Ice.UnexpectedObjectException">
+ <summary>
+ This exception is raised if the type of an unmarshaled Slice class instance does
+ not match its expected type.
+ This can happen if client and server are compiled with mismatched Slice
+ definitions or if a class of the wrong type is passed as a parameter
+ or return value using dynamic invocation. This exception can also be
+ raised if IceStorm is used to send Slice class instances and
+ an operation is subscribed to the wrong topic.
+ </summary>
+ </member>
+ <member name="T:Ice.MemoryLimitException">
+ <summary>
+ This exception is raised if a request size exceeds the limit specified by the Ice.MessageSizeMax property.
+ </summary>
+ </member>
+ <member name="T:Ice.StringConversionException">
+ <summary>
+ This exception is
+ raised when a string conversion to or from UTF-8 fails during
+ marshaling or unmarshaling.
+ </summary>
+ </member>
+ <member name="T:Ice.EncapsulationException">
+ <summary>
+ This exception indicates a malformed data encapsulation.
+ </summary>
+ </member>
+ <member name="T:Ice.FeatureNotSupportedException">
+ <summary>
+ This exception is raised if an unsupported feature is used.
+ The
+ unsupported feature string contains the name of the unsupported
+ feature
+ </summary>
+ </member>
+ <member name="T:Ice.SecurityException">
+ <summary>
+ This exception indicates a failure in a security subsystem,
+ such as the IceSSL plug-in.
+ </summary>
+ </member>
+ <member name="T:Ice.FixedProxyException">
+ <summary>
+ This exception indicates that an attempt has been made to
+ change the connection properties of a fixed proxy.
+ </summary>
+ </member>
+ <member name="T:Ice.ResponseSentException">
+ <summary>
+ Indicates that the response to a request has already been sent;
+ re-dispatching such a request is not possible.
+ </summary>
+ </member>
+ <member name="T:Ice.AdapterNotFoundException">
+ <summary>
+ This exception is raised if an adapter cannot be found.
+ </summary>
+ </member>
+ <member name="T:Ice.InvalidReplicaGroupIdException">
+ <summary>
+ This exception is raised if the replica group provided by the
+ server is invalid.
+ </summary>
+ </member>
+ <member name="T:Ice.AdapterAlreadyActiveException">
+ <summary>
+ This exception is raised if a server tries to set endpoints for
+ an adapter that is already active.
+ </summary>
+ </member>
+ <member name="T:Ice.ObjectNotFoundException">
+ <summary>
+ This exception is raised if an object cannot be found.
+ </summary>
+ </member>
+ <member name="T:Ice.ServerNotFoundException">
+ <summary>
+ This exception is raised if a server cannot be found.
+ </summary>
+ </member>
+ <member name="T:Ice.LocatorOperations_">
+ <summary>
+ The Ice locator interface.
+ This interface is used by clients to
+ lookup adapters and objects. It is also used by servers to get the
+ locator registry proxy.
+
+ The Locator interface is intended to be used by
+ Ice internals and by locator implementations. Regular user code
+ should not attempt to use any functionality of this interface
+ directly.
+ </summary>
+ </member>
+ <member name="M:Ice.LocatorOperations_.findObjectById_async(Ice.AMD_Locator_findObjectById,Ice.Identity,Ice.Current)">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The identity.
+
+ </param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorOperations_.findAdapterById_async(Ice.AMD_Locator_findAdapterById,System.String,Ice.Current)">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorOperations_.getRegistry(Ice.Current)">
+ <summary>
+ Get the locator registry.
+ </summary>
+ <returns>The locator registry.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Ice.LocatorOperationsNC_">
+ <summary>
+ The Ice locator interface.
+ This interface is used by clients to
+ lookup adapters and objects. It is also used by servers to get the
+ locator registry proxy.
+
+ The Locator interface is intended to be used by
+ Ice internals and by locator implementations. Regular user code
+ should not attempt to use any functionality of this interface
+ directly.
+ </summary>
+ </member>
+ <member name="M:Ice.LocatorOperationsNC_.findObjectById_async(Ice.AMD_Locator_findObjectById,Ice.Identity)">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The identity.
+
+ </param>
+ </member>
+ <member name="M:Ice.LocatorOperationsNC_.findAdapterById_async(Ice.AMD_Locator_findAdapterById,System.String)">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The adapter id.
+
+ </param>
+ </member>
+ <member name="M:Ice.LocatorOperationsNC_.getRegistry">
+ <summary>
+ Get the locator registry.
+ </summary>
+ <returns>The locator registry.</returns>
+ </member>
+ <member name="T:Ice.LocatorRegistryOperations_">
+ <summary>
+ The Ice locator registry interface.
+ This interface is used by
+ servers to register adapter endpoints with the locator.
+
+ The LocatorRegistry interface is intended to be used
+ by Ice internals and by locator implementations. Regular user
+ code should not attempt to use any functionality of this interface
+ directly.
+ </summary>
+ </member>
+ <member name="M:Ice.LocatorRegistryOperations_.setAdapterDirectProxy_async(Ice.AMD_LocatorRegistry_setAdapterDirectProxy,System.String,Ice.ObjectPrx,Ice.Current)">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="proxy">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryOperations_.setReplicatedAdapterDirectProxy_async(Ice.AMD_LocatorRegistry_setReplicatedAdapterDirectProxy,System.String,System.String,Ice.ObjectPrx,Ice.Current)">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="adapterId">The adapter id.
+
+ </param>
+ <param name="replicaGroupId">The replica group id.
+
+ </param>
+ <param name="p">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryOperations_.setServerProcessProxy_async(Ice.AMD_LocatorRegistry_setServerProcessProxy,System.String,Ice.ProcessPrx,Ice.Current)">
+ <summary>
+ Set the process proxy for a server.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The server id.
+
+ </param>
+ <param name="proxy">The process proxy.
+
+ </param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Ice.LocatorRegistryOperationsNC_">
+ <summary>
+ The Ice locator registry interface.
+ This interface is used by
+ servers to register adapter endpoints with the locator.
+
+ The LocatorRegistry interface is intended to be used
+ by Ice internals and by locator implementations. Regular user
+ code should not attempt to use any functionality of this interface
+ directly.
+ </summary>
+ </member>
+ <member name="M:Ice.LocatorRegistryOperationsNC_.setAdapterDirectProxy_async(Ice.AMD_LocatorRegistry_setAdapterDirectProxy,System.String,Ice.ObjectPrx)">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="proxy">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ </member>
+ <member name="M:Ice.LocatorRegistryOperationsNC_.setReplicatedAdapterDirectProxy_async(Ice.AMD_LocatorRegistry_setReplicatedAdapterDirectProxy,System.String,System.String,Ice.ObjectPrx)">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="adapterId">The adapter id.
+
+ </param>
+ <param name="replicaGroupId">The replica group id.
+
+ </param>
+ <param name="p">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ </member>
+ <member name="M:Ice.LocatorRegistryOperationsNC_.setServerProcessProxy_async(Ice.AMD_LocatorRegistry_setServerProcessProxy,System.String,Ice.ProcessPrx)">
+ <summary>
+ Set the process proxy for a server.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The server id.
+
+ </param>
+ <param name="proxy">The process proxy.
+
+ </param>
+ </member>
+ <member name="T:Ice.LocatorPrxHelper">
+ <summary>
+ The Ice locator interface.
+ This interface is used by clients to
+ lookup adapters and objects. It is also used by servers to get the
+ locator registry proxy.
+
+ The Locator interface is intended to be used by
+ Ice internals and by locator implementations. Regular user code
+ should not attempt to use any functionality of this interface
+ directly.
+ </summary>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.findAdapterById(System.String)">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ <param name="id">The adapter id.
+
+ </param>
+ <returns>The adapter proxy, or null if the adapter is not active.
+
+ </returns>
+ <exception name="AdapterNotFoundException">Raised if the adapter cannot be
+ found.</exception>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.findAdapterById(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ <param name="id">The adapter id.
+
+ </param>
+ <returns>The adapter proxy, or null if the adapter is not active.
+
+ </returns>
+ <exception name="AdapterNotFoundException">Raised if the adapter cannot be
+ found.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.findObjectById(Ice.Identity)">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ <param name="id">The identity.
+
+ </param>
+ <returns>The proxy, or null if the object is not active.
+
+ </returns>
+ <exception name="ObjectNotFoundException">Raised if the object cannot
+ be found.</exception>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.findObjectById(Ice.Identity,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ <param name="id">The identity.
+
+ </param>
+ <returns>The proxy, or null if the object is not active.
+
+ </returns>
+ <exception name="ObjectNotFoundException">Raised if the object cannot
+ be found.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.getRegistry">
+ <summary>
+ Get the locator registry.
+ </summary>
+ <returns>The locator registry.</returns>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.getRegistry(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the locator registry.
+ </summary>
+ <returns>The locator registry.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.begin_findAdapterById(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.findAdapterById_async(Ice.AMI_Locator_findAdapterById,System.String)">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The adapter id.
+
+ </param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.findAdapterById_async(Ice.AMI_Locator_findAdapterById,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.begin_findObjectById(Ice.Identity,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ <param name="id">The identity.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.findObjectById_async(Ice.AMI_Locator_findObjectById,Ice.Identity)">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The identity.
+
+ </param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.findObjectById_async(Ice.AMI_Locator_findObjectById,Ice.Identity,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The identity.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorPrxHelper.begin_getRegistry(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the locator registry.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Ice.LocatorRegistryPrxHelper">
+ <summary>
+ The Ice locator registry interface.
+ This interface is used by
+ servers to register adapter endpoints with the locator.
+
+ The LocatorRegistry interface is intended to be used
+ by Ice internals and by locator implementations. Regular user
+ code should not attempt to use any functionality of this interface
+ directly.
+ </summary>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setAdapterDirectProxy(System.String,Ice.ObjectPrx)">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="proxy">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <exception name="AdapterNotFoundException">Raised if the adapter cannot
+ be found, or if the locator only allows
+ registered adapters to set their active proxy and the
+ adapter is not registered with the locator.
+
+ </exception>
+ <exception name="AdapterAlreadyActiveException">Raised if an adapter with the same
+ id is already active.</exception>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setAdapterDirectProxy(System.String,Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="proxy">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <exception name="AdapterNotFoundException">Raised if the adapter cannot
+ be found, or if the locator only allows
+ registered adapters to set their active proxy and the
+ adapter is not registered with the locator.
+
+ </exception>
+ <exception name="AdapterAlreadyActiveException">Raised if an adapter with the same
+ id is already active.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setReplicatedAdapterDirectProxy(System.String,System.String,Ice.ObjectPrx)">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="adapterId">The adapter id.
+
+ </param>
+ <param name="replicaGroupId">The replica group id.
+
+ </param>
+ <param name="p">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <exception name="AdapterNotFoundException">Raised if the adapter cannot
+ be found, or if the locator only allows registered adapters to
+ set their active proxy and the adapter is not registered with
+ the locator.
+
+ </exception>
+ <exception name="AdapterAlreadyActiveException">Raised if an adapter with the same
+ id is already active.
+
+ </exception>
+ <exception name="InvalidReplicaGroupIdException">Raised if the given
+ replica group doesn't match the one registered with the
+ locator registry for this object adapter.</exception>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setReplicatedAdapterDirectProxy(System.String,System.String,Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="adapterId">The adapter id.
+
+ </param>
+ <param name="replicaGroupId">The replica group id.
+
+ </param>
+ <param name="p">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <exception name="AdapterNotFoundException">Raised if the adapter cannot
+ be found, or if the locator only allows registered adapters to
+ set their active proxy and the adapter is not registered with
+ the locator.
+
+ </exception>
+ <exception name="AdapterAlreadyActiveException">Raised if an adapter with the same
+ id is already active.
+
+ </exception>
+ <exception name="InvalidReplicaGroupIdException">Raised if the given
+ replica group doesn't match the one registered with the
+ locator registry for this object adapter.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setServerProcessProxy(System.String,Ice.ProcessPrx)">
+ <summary>
+ Set the process proxy for a server.
+ </summary>
+ <param name="id">The server id.
+
+ </param>
+ <param name="proxy">The process proxy.
+
+ </param>
+ <exception name="ServerNotFoundException">Raised if the server cannot
+ be found.</exception>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setServerProcessProxy(System.String,Ice.ProcessPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the process proxy for a server.
+ </summary>
+ <param name="id">The server id.
+
+ </param>
+ <param name="proxy">The process proxy.
+
+ </param>
+ <exception name="ServerNotFoundException">Raised if the server cannot
+ be found.</exception>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.begin_setAdapterDirectProxy(System.String,Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="proxy">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setAdapterDirectProxy_async(Ice.AMI_LocatorRegistry_setAdapterDirectProxy,System.String,Ice.ObjectPrx)">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="proxy">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setAdapterDirectProxy_async(Ice.AMI_LocatorRegistry_setAdapterDirectProxy,System.String,Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="id">The adapter id.
+
+ </param>
+ <param name="proxy">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.begin_setReplicatedAdapterDirectProxy(System.String,System.String,Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="adapterId">The adapter id.
+
+ </param>
+ <param name="replicaGroupId">The replica group id.
+
+ </param>
+ <param name="p">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setReplicatedAdapterDirectProxy_async(Ice.AMI_LocatorRegistry_setReplicatedAdapterDirectProxy,System.String,System.String,Ice.ObjectPrx)">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="adapterId">The adapter id.
+
+ </param>
+ <param name="replicaGroupId">The replica group id.
+
+ </param>
+ <param name="p">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.setReplicatedAdapterDirectProxy_async(Ice.AMI_LocatorRegistry_setReplicatedAdapterDirectProxy,System.String,System.String,Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="adapterId">The adapter id.
+
+ </param>
+ <param name="replicaGroupId">The replica group id.
+
+ </param>
+ <param name="p">The adapter proxy (a dummy direct proxy created
+ by the adapter). The direct proxy contains the adapter
+ endpoints.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.LocatorRegistryPrxHelper.begin_setServerProcessProxy(System.String,Ice.ProcessPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Set the process proxy for a server.
+ </summary>
+ <param name="id">The server id.
+
+ </param>
+ <param name="proxy">The process proxy.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Ice.AMD_Locator_findObjectById">
+ <summary>
+ Find an object by identity and return its proxy.
+ </summary>
+ </member>
+ <member name="M:Ice.AMD_Locator_findObjectById.ice_response(Ice.ObjectPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) The proxy, or null if the object is not active.
+
+ </param>
+ </member>
+ <member name="T:Ice.AMD_Locator_findAdapterById">
+ <summary>
+ Find an adapter by id and return its proxy (a dummy direct
+ proxy created by the adapter).
+ </summary>
+ </member>
+ <member name="M:Ice.AMD_Locator_findAdapterById.ice_response(Ice.ObjectPrx)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) The adapter proxy, or null if the adapter is not active.
+
+ </param>
+ </member>
+ <member name="T:Ice.AMI_LocatorRegistry_setAdapterDirectProxy">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_LocatorRegistry_setAdapterDirectProxy.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Ice.AMD_LocatorRegistry_setAdapterDirectProxy">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ </member>
+ <member name="M:Ice.AMD_LocatorRegistry_setAdapterDirectProxy.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Ice.AMI_LocatorRegistry_setReplicatedAdapterDirectProxy">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_LocatorRegistry_setReplicatedAdapterDirectProxy.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Ice.AMD_LocatorRegistry_setReplicatedAdapterDirectProxy">
+ <summary>
+ Set the adapter endpoints with the locator registry.
+ </summary>
+ </member>
+ <member name="M:Ice.AMD_LocatorRegistry_setReplicatedAdapterDirectProxy.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Ice.AMD_LocatorRegistry_setServerProcessProxy">
+ <summary>
+ Set the process proxy for a server.
+ </summary>
+ </member>
+ <member name="M:Ice.AMD_LocatorRegistry_setServerProcessProxy.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="M:Ice.PluginManager.initializePlugins">
+ <summary>
+ Initialize the configured plug-ins.
+ The communicator automatically initializes
+ the plug-ins by default, but an application may need to interact directly with
+ a plug-in prior to initialization. In this case, the application must set
+ Ice.InitPlugins=0 and then invoke initializePlugins
+ manually. The plug-ins are initialized in the order in which they are loaded.
+ If a plug-in raises an exception during initialization, the communicator
+ invokes destroy on the plug-ins that have already been initialized.
+
+ </summary>
+ <exception name="InitializationException">Raised if the plug-ins have already been initialized.</exception>
+ </member>
+ <member name="M:Ice.PluginManager.getPlugins">
+ <summary>
+ Get a list of plugins installed.
+ </summary>
+ <returns>The names of the plugins installed.
+
+ </returns>
+ </member>
+ <member name="M:Ice.PluginManager.getPlugin(System.String)">
+ <summary>
+ Obtain a plug-in by name.
+ </summary>
+ <param name="name">The plug-in's name.
+
+ </param>
+ <returns>The plug-in.
+
+ </returns>
+ <exception name="NotRegisteredException">Raised if no plug-in is found with the given name.</exception>
+ </member>
+ <member name="M:Ice.PluginManager.addPlugin(System.String,Ice.Plugin)">
+ <summary>
+ Install a new plug-in.
+ </summary>
+ <param name="name">The plug-in's name.
+
+ </param>
+ <param name="pi">The plug-in.
+
+ </param>
+ <exception name="AlreadyRegisteredException">Raised if a plug-in already exists with the given name.</exception>
+ </member>
+ <member name="M:Ice.PluginManager.destroy">
+ <summary>
+ Called when the communicator is being destroyed.
+ </summary>
+ </member>
+ <member name="T:Ice.ProcessPrxHelper">
+ <summary>
+ An administrative interface for process management.
+ Managed servers must
+ implement this interface.
+
+ A servant implementing this interface is a potential target
+ for denial-of-service attacks, therefore proper security precautions
+ should be taken. For example, the servant can use a UUID to make its
+ identity harder to guess, and be registered in an object adapter with
+ a secured endpoint.
+ </summary>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.shutdown">
+ <summary>
+ Initiate a graceful shut-down.
+ </summary>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.shutdown(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Initiate a graceful shut-down.
+ </summary>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.writeMessage(System.String,System.Int32)">
+ <summary>
+ Write a message on the process' stdout or stderr.
+ </summary>
+ <param name="message">The message.
+
+ </param>
+ <param name="fd">1 for stdout, 2 for stderr.</param>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.writeMessage(System.String,System.Int32,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Write a message on the process' stdout or stderr.
+ </summary>
+ <param name="message">The message.
+
+ </param>
+ <param name="fd">1 for stdout, 2 for stderr.</param>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.begin_shutdown(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Initiate a graceful shut-down.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.shutdown_async(Ice.AMI_Process_shutdown)">
+ <summary>
+ Initiate a graceful shut-down.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.shutdown_async(Ice.AMI_Process_shutdown,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Initiate a graceful shut-down.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.begin_writeMessage(System.String,System.Int32,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Write a message on the process' stdout or stderr.
+ </summary>
+ <param name="message">The message.
+
+ </param>
+ <param name="fd">1 for stdout, 2 for stderr.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.writeMessage_async(Ice.AMI_Process_writeMessage,System.String,System.Int32)">
+ <summary>
+ Write a message on the process' stdout or stderr.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="message">The message.
+
+ </param>
+ <param name="fd">1 for stdout, 2 for stderr.</param>
+ </member>
+ <member name="M:Ice.ProcessPrxHelper.writeMessage_async(Ice.AMI_Process_writeMessage,System.String,System.Int32,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Write a message on the process' stdout or stderr.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="message">The message.
+
+ </param>
+ <param name="fd">1 for stdout, 2 for stderr.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Ice.AMI_Process_shutdown">
+ <summary>
+ Initiate a graceful shut-down.
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_Process_shutdown.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Ice.AMI_Process_writeMessage">
+ <summary>
+ Write a message on the process' stdout or stderr.
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_Process_writeMessage.ice_response">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ </member>
+ <member name="T:Ice.PropertiesAdminPrxHelper">
+ <summary>
+ The PropertiesAdmin interface provides remote access to the properties
+ of a communicator.
+ </summary>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.getPropertiesForPrefix(System.String)">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ prefix is an empty string,
+ then all properties are returned.
+
+ </summary>
+ <param name="prefix">The prefix to search for (empty string if none).
+ </param>
+ <returns>The matching property set.</returns>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.getPropertiesForPrefix(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ prefix is an empty string,
+ then all properties are returned.
+
+ </summary>
+ <param name="prefix">The prefix to search for (empty string if none).
+ </param>
+ <returns>The matching property set.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.getProperty(System.String)">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ string is returned.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <returns>The property value.</returns>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.getProperty(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ string is returned.
+
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <returns>The property value.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.begin_getPropertiesForPrefix(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ </summary>
+ <param name="prefix">The prefix to search for (empty string if none).
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.getPropertiesForPrefix_async(Ice.AMI_PropertiesAdmin_getPropertiesForPrefix,System.String)">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="prefix">The prefix to search for (empty string if none).
+ </param>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.getPropertiesForPrefix_async(Ice.AMI_PropertiesAdmin_getPropertiesForPrefix,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="prefix">The prefix to search for (empty string if none).
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.begin_getProperty(System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ </summary>
+ <param name="key">The property key.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.getProperty_async(Ice.AMI_PropertiesAdmin_getProperty,System.String)">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="key">The property key.
+
+ </param>
+ </member>
+ <member name="M:Ice.PropertiesAdminPrxHelper.getProperty_async(Ice.AMI_PropertiesAdmin_getProperty,System.String,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="key">The property key.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="T:Ice.AMI_PropertiesAdmin_getProperty">
+ <summary>
+ Get a property by key.
+ If the property is not set, an empty
+ string is returned.
+
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_PropertiesAdmin_getProperty.ice_response(System.String)">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) The property value.</param>
+ </member>
+ <member name="T:Ice.AMI_PropertiesAdmin_getPropertiesForPrefix">
+ <summary>
+ Get all properties whose keys begins with
+ prefix.
+ If
+ prefix is an empty string,
+ then all properties are returned.
+
+ </summary>
+ </member>
+ <member name="M:Ice.AMI_PropertiesAdmin_getPropertiesForPrefix.ice_response(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ ice_response indicates that
+ the operation completed successfully.
+ </summary>
+ <param name="ret__">(return value) The matching property set.</param>
+ </member>
+ <member name="T:Ice.RouterOperations_">
+ <summary>
+ The Ice router interface.
+ Routers can be set either globally with
+ Communicator.setDefaultRouter, or with ice_router on specific
+ proxies.
+ </summary>
+ </member>
+ <member name="M:Ice.RouterOperations_.getClientProxy(Ice.Current)">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <returns>The router's client proxy.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterOperations_.getServerProxy(Ice.Current)">
+ <summary>
+ Get the router's server proxy, i.e., the proxy to use for
+ forwarding requests from the server to the router.
+ </summary>
+ <returns>The router's server proxy.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterOperations_.addProxy(Ice.ObjectPrx,Ice.Current)">
+ <summary>
+ Add new proxy information to the router's routing table.
+
+ <para>addProxy() is deprecated, use addProxies() instead.</para>
+
+ This operation is deprecated, and only used for old
+ Ice clients (older than version 3.1).
+
+ </summary>
+ <param name="proxy">The proxy to add.</param>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterOperations_.addProxies(Ice.ObjectPrx[],Ice.Current)">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <returns>Proxies discarded by the router.</returns>
+ <param name="current__">The Current object for the invocation.</param>
+ </member>
+ <member name="T:Ice.RouterOperationsNC_">
+ <summary>
+ The Ice router interface.
+ Routers can be set either globally with
+ Communicator.setDefaultRouter, or with ice_router on specific
+ proxies.
+ </summary>
+ </member>
+ <member name="M:Ice.RouterOperationsNC_.getClientProxy">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <returns>The router's client proxy.</returns>
+ </member>
+ <member name="M:Ice.RouterOperationsNC_.getServerProxy">
+ <summary>
+ Get the router's server proxy, i.e., the proxy to use for
+ forwarding requests from the server to the router.
+ </summary>
+ <returns>The router's server proxy.</returns>
+ </member>
+ <member name="M:Ice.RouterOperationsNC_.addProxy(Ice.ObjectPrx)">
+ <summary>
+ Add new proxy information to the router's routing table.
+
+ <para>addProxy() is deprecated, use addProxies() instead.</para>
+
+ This operation is deprecated, and only used for old
+ Ice clients (older than version 3.1).
+
+ </summary>
+ <param name="proxy">The proxy to add.</param>
+ </member>
+ <member name="M:Ice.RouterOperationsNC_.addProxies(Ice.ObjectPrx[])">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <returns>Proxies discarded by the router.</returns>
+ </member>
+ <member name="T:Ice.RouterPrxHelper">
+ <summary>
+ The Ice router interface.
+ Routers can be set either globally with
+ Communicator.setDefaultRouter, or with ice_router on specific
+ proxies.
+ </summary>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.addProxies(Ice.ObjectPrx[])">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <returns>Proxies discarded by the router.</returns>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.addProxies(Ice.ObjectPrx[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <returns>Proxies discarded by the router.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.addProxy(Ice.ObjectPrx)">
+ <summary>
+ Add new proxy information to the router's routing table.
+
+ <para>addProxy() is deprecated, use addProxies() instead.</para>
+
+ This operation is deprecated, and only used for old
+ Ice clients (older than version 3.1).
+
+ </summary>
+ <param name="proxy">The proxy to add.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.addProxy(Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+
+ <para>addProxy() is deprecated, use addProxies() instead.</para>
+
+ This operation is deprecated, and only used for old
+ Ice clients (older than version 3.1).
+
+ </summary>
+ <param name="proxy">The proxy to add.</param>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.getClientProxy">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <returns>The router's client proxy.</returns>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.getClientProxy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <returns>The router's client proxy.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.getServerProxy">
+ <summary>
+ Get the router's server proxy, i.e., the proxy to use for
+ forwarding requests from the server to the router.
+ </summary>
+ <returns>The router's server proxy.</returns>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.getServerProxy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's server proxy, i.e., the proxy to use for
+ forwarding requests from the server to the router.
+ </summary>
+ <returns>The router's server proxy.</returns>
+ <param name="context__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.begin_addProxies(Ice.ObjectPrx[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.addProxies_async(Ice.AMI_Router_addProxies,Ice.ObjectPrx[])">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.addProxies_async(Ice.AMI_Router_addProxies,Ice.ObjectPrx[],System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="proxies">The proxies to add.
+
+ </param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.begin_addProxy(Ice.ObjectPrx,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Add new proxy information to the router's routing table.
+ This operation is deprecated, and only used for old
+ </summary>
+ <param name="proxy">The proxy to add.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ <para>addProxy() is deprecated, use addProxies() instead.</para>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.begin_getClientProxy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.getClientProxy_async(Ice.AMI_Router_getClientProxy)">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.getClientProxy_async(Ice.AMI_Router_getClientProxy,System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's client proxy, i.e., the proxy to use for
+ forwarding requests from the client to the router.
+ </summary>
+ <param name="cb__">The callback object for the operation.</param>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.RouterPrxHelper.begin_getServerProxy(System.Collections.Generic.Dictionary{System.String,System.String})">
+ <summary>
+ Get the router's server proxy, i.e., the proxy to use for
+ forwarding requests from the server to the router.
+ </summary>
+ <param name="ctx__">The Context map to send with the invocation.</param>
+ </member>
+ <member name="M:Ice.ServantLocator.locate(Ice.Current,System.Object@)">
+ <summary>
+ Called before a request is dispatched if a
+ servant cannot be found in the object adapter's active servant
+ map.
+ Note that the object adapter does not automatically insert
+ the returned servant into its active servant map. This must be
+ done by the servant locator implementation, if this is desired.
+
+ locate can throw any user exception. If it does, that exception
+ is marshaled back to the client. If the Slice definition for the
+ corresponding operation includes that user exception, the client
+ receives that user exception; otherwise, the client receives
+ UnknownUserException.
+
+ If locate throws any exception, the Ice run time does not
+ call finished.
+
+ If you call locate from your own code, you
+ must also call finished when you have finished using the
+ servant, provided that locate returned a non-null servant;
+ otherwise, you will get undefined behavior if you use
+ servant locators such as the Freeze.Evictor.
+
+ </summary>
+ <param name="curr">Information about the current operation for which
+ a servant is required.
+
+ </param>
+ <param name="cookie">A "cookie" that will be passed to finished.
+
+ </param>
+ <returns>The located servant, or null if no suitable servant has
+ been found.
+
+ </returns>
+ </member>
+ <member name="M:Ice.ServantLocator.finished(Ice.Current,Ice.Object,System.Object)">
+ <summary>
+ Called by the object adapter after a request has been
+ made.
+ This operation is only called if locate was called
+ prior to the request and returned a non-null servant. This
+ operation can be used for cleanup purposes after a request.
+
+ finished can throw any user exception. If it does, that exception
+ is marshaled back to the client. If the Slice definition for the
+ corresponding operation includes that user exception, the client
+ receives that user exception; otherwise, the client receives
+ UnknownUserException.
+
+ If both the operation and finished throw an exception, the
+ exception thrown by finished is marshaled back to the client.
+
+ </summary>
+ <param name="curr">Information about the current operation call for
+ which a servant was located by locate.
+
+ </param>
+ <param name="servant">The servant that was returned by locate.
+
+ </param>
+ <param name="cookie">The cookie that was returned by locate.
+
+ </param>
+ </member>
+ <member name="M:Ice.ServantLocator.deactivate(System.String)">
+ <summary>
+ Called when the object adapter in which this servant locator is
+ installed is deactivated.
+ </summary>
+ <param name="category">Indicates for which category the servant locator
+ is being deactivated.
+
+ </param>
+ </member>
+ <member name="M:Ice.Stats.bytesSent(System.String,System.Int32)">
+ <summary>
+ Callback to report that data has been sent.
+ </summary>
+ <param name="protocol">The protocol over which data has been sent (for
+ example "tcp", "udp", or "ssl").
+
+ </param>
+ <param name="num">How many bytes have been sent.</param>
+ </member>
+ <member name="M:Ice.Stats.bytesReceived(System.String,System.Int32)">
+ <summary>
+ Callback to report that data has been received.
+ </summary>
+ <param name="protocol">The protocol over which data has been received
+ (for example "tcp", "udp", or "ssl").
+
+ </param>
+ <param name="num">How many bytes have been received.</param>
+ </member>
+ </members>
+</doc>
diff --git a/cs/demo/Glacier2/sl/chat/bin/System.Windows.Controls.Navigation.xml b/cs/demo/Glacier2/sl/chat/bin/System.Windows.Controls.Navigation.xml
new file mode 100644
index 00000000000..40e0c570d25
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/bin/System.Windows.Controls.Navigation.xml
@@ -0,0 +1,420 @@
+<?xml version="1.0" encoding="utf-8"?>
+<doc>
+ <assembly>
+ <name>System.Windows.Controls.Navigation</name>
+ </assembly>
+ <members>
+ <member name="T:System.Windows.Automation.Peers.FrameAutomationPeer">
+ <summary>Exposes <see cref="T:System.Windows.Controls.Frame" /> types to UI automation.</summary>
+ </member>
+ <member name="M:System.Windows.Automation.Peers.FrameAutomationPeer.#ctor(System.Windows.Controls.Frame)">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Automation.Peers.FrameAutomationPeer" /> class. </summary>
+ <param name="owner">The <see cref="T:System.Windows.Controls.Frame" /> to associate with this <see cref="T:System.Windows.Automation.Peers.FrameAutomationPeer" />.</param>
+ </member>
+ <member name="M:System.Windows.Automation.Peers.FrameAutomationPeer.GetAutomationControlTypeCore">
+ <summary>Gets the <see cref="T:System.Windows.Automation.Peers.AutomationControlType" /> for the element associated with this <see cref="T:System.Windows.Automation.Peers.FrameAutomationPeer" />. Called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.GetAutomationControlType" />.</summary>
+ <returns>A value of the enumeration.</returns>
+ </member>
+ <member name="M:System.Windows.Automation.Peers.FrameAutomationPeer.GetClassNameCore">
+ <summary>Gets the name of the class associated with this <see cref="T:System.Windows.Automation.Peers.FrameAutomationPeer" />. Called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.GetClassName" />.</summary>
+ <returns>The class name.</returns>
+ </member>
+ <member name="M:System.Windows.Automation.Peers.FrameAutomationPeer.GetNameCore">
+ <summary>Gets the UI Automation Name of the element that is associated with this <see cref="T:System.Windows.Automation.Peers.FrameAutomationPeer" />. Called by <see cref="M:System.Windows.Automation.Peers.AutomationPeer.GetName" />.</summary>
+ <returns>The UI Automation Nameof the element that is associated with this automation peer.</returns>
+ </member>
+ <member name="T:System.Windows.Controls.Frame">
+ <summary>Represents a control that supports navigation to and from Silverlight pages.</summary>
+ </member>
+ <member name="M:System.Windows.Controls.Frame.#ctor">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Controls.Frame" /> class. </summary>
+ </member>
+ <member name="P:System.Windows.Controls.Frame.CacheSize">
+ <summary>Gets or sets the number of pages that can be cached for the frame.</summary>
+ <returns>The number of pages that can be cached for the frame. The default value is 10.</returns>
+ </member>
+ <member name="F:System.Windows.Controls.Frame.CacheSizeProperty">
+ <summary>Identifies the <see cref="P:System.Windows.Controls.Frame.CacheSize" /> dependency property.</summary>
+ <returns>The identifier for the <see cref="P:System.Windows.Controls.Frame.CacheSize" /> dependency property.</returns>
+ </member>
+ <member name="P:System.Windows.Controls.Frame.CanGoBack">
+ <summary>Gets a value that indicates whether there is at least one entry in the back navigation history.</summary>
+ <returns>true if there is at least one entry in the back navigation history; otherwise, false.</returns>
+ </member>
+ <member name="F:System.Windows.Controls.Frame.CanGoBackProperty">
+ <summary>Identifies the <see cref="P:System.Windows.Controls.Frame.CanGoBack" /> dependency property.</summary>
+ <returns>The identifier for the <see cref="P:System.Windows.Controls.Frame.CanGoBack" /> dependency property.</returns>
+ </member>
+ <member name="P:System.Windows.Controls.Frame.CanGoForward">
+ <summary>Gets a value that indicates whether there is at least one entry in the forward navigation history.</summary>
+ <returns>true if there is at least one entry in the forward navigation history; otherwise, false.</returns>
+ </member>
+ <member name="F:System.Windows.Controls.Frame.CanGoForwardProperty">
+ <summary>Identifies the <see cref="P:System.Windows.Controls.Frame.CanGoForward" /> dependency property.</summary>
+ <returns>The identifier for the <see cref="P:System.Windows.Controls.Frame.CanGoForward" /> dependency property.</returns>
+ </member>
+ <member name="P:System.Windows.Controls.Frame.ContentLoader">
+ <summary>Gets or sets the object responsible for providing the content that corresponds to a requested URI. </summary>
+ <returns>The object responsible for providing the content that corresponds to a requested URI. The default is a <see cref="T:System.Windows.Navigation.PageResourceContentLoader" /> instance.</returns>
+ </member>
+ <member name="F:System.Windows.Controls.Frame.ContentLoaderProperty">
+ <summary>Identifies the <see cref="P:System.Windows.Controls.Frame.ContentLoader" /> dependency property.</summary>
+ <returns>The identifier for the <see cref="P:System.Windows.Controls.Frame.ContentLoader" /> dependency property.</returns>
+ </member>
+ <member name="P:System.Windows.Controls.Frame.CurrentSource">
+ <summary>Gets the uniform resource identifier (URI) of the content that is currently displayed.</summary>
+ <returns>A value that represents the URI of content that is currently displayed.</returns>
+ </member>
+ <member name="F:System.Windows.Controls.Frame.CurrentSourceProperty">
+ <summary>Identifies the <see cref="P:System.Windows.Controls.Frame.CurrentSource" /> dependency property.</summary>
+ <returns>The identifier for the <see cref="P:System.Windows.Controls.Frame.CurrentSource" /> dependency property.</returns>
+ </member>
+ <member name="E:System.Windows.Controls.Frame.FragmentNavigation">
+ <summary>Occurs when navigation to a content fragment begins.</summary>
+ </member>
+ <member name="M:System.Windows.Controls.Frame.GoBack">
+ <summary>Navigates to the most recent entry in the back navigation history, or throws an exception if no entry exists in back navigation.</summary>
+ <exception cref="T:System.InvalidOperationException">There are no entries in the back navigation history.</exception>
+ </member>
+ <member name="M:System.Windows.Controls.Frame.GoForward">
+ <summary>Navigates to the most recent entry in the forward navigation history, or throws an exception if no entry exists in forward navigation.</summary>
+ <exception cref="T:System.InvalidOperationException">There are no entries in the forward navigation history.</exception>
+ </member>
+ <member name="P:System.Windows.Controls.Frame.JournalOwnership">
+ <summary>Gets or sets whether a frame is responsible for managing its own navigation history, or whether it integrates with the Web browser journal.</summary>
+ <returns>A value that specifies whether frame manages its own journal. The default value is <see cref="F:System.Windows.Navigation.JournalOwnership.Automatic" />.</returns>
+ <exception cref="T:System.InvalidOperationException">A nested frame or more than one frame attempts to integrate with browser journal.</exception>
+ </member>
+ <member name="F:System.Windows.Controls.Frame.JournalOwnershipProperty">
+ <summary>Identifies the <see cref="P:System.Windows.Controls.Frame.JournalOwnership" /> dependency property.</summary>
+ <returns>The identifier for the <see cref="P:System.Windows.Controls.Frame.JournalOwnership" /> dependency property.</returns>
+ </member>
+ <member name="M:System.Windows.Controls.Frame.Navigate(System.Uri)">
+ <summary>Navigates to the content specified by the uniform resource identifier (URI).</summary>
+ <returns>true if the navigation started successfully; otherwise, false.</returns>
+ <param name="source">The URI representing a page to display in the frame.</param>
+ </member>
+ <member name="E:System.Windows.Controls.Frame.Navigated">
+ <summary>Occurs when the content that is being navigated to has been found and is available.</summary>
+ </member>
+ <member name="E:System.Windows.Controls.Frame.Navigating">
+ <summary>Occurs when a new navigation is requested.</summary>
+ </member>
+ <member name="E:System.Windows.Controls.Frame.NavigationFailed">
+ <summary>Occurs when an error is encountered while navigating to the requested content.</summary>
+ </member>
+ <member name="E:System.Windows.Controls.Frame.NavigationStopped">
+ <summary>Occurs when a navigation is terminated by either calling the <see cref="M:System.Windows.Controls.Frame.StopLoading" /> method, or when a new navigation is requested while the current navigation is in progress.</summary>
+ </member>
+ <member name="M:System.Windows.Controls.Frame.OnApplyTemplate">
+ <summary>Builds the visual tree for the <see cref="T:System.Windows.Controls.Frame" /> when a new template is applied.</summary>
+ </member>
+ <member name="M:System.Windows.Controls.Frame.OnCreateAutomationPeer">
+ <summary>Returns a <see cref="T:System.Windows.Automation.Peers.FrameAutomationPeer" /> for use by the Silverlight automation infrastructure.</summary>
+ <returns>A <see cref="T:System.Windows.Automation.Peers.FrameAutomationPeer" /> for the <see cref="T:System.Windows.Controls.Frame" /> object.</returns>
+ </member>
+ <member name="M:System.Windows.Controls.Frame.Refresh">
+ <summary>Reloads the current page. </summary>
+ </member>
+ <member name="P:System.Windows.Controls.Frame.Source">
+ <summary>Gets or sets the uniform resource identifier (URI) of the current content or the content that is being navigated to.</summary>
+ <returns>A value that represents the URI of the current content or the content that is being navigated to.</returns>
+ </member>
+ <member name="F:System.Windows.Controls.Frame.SourceProperty">
+ <summary>Identifies the <see cref="P:System.Windows.Controls.Frame.Source" /> dependency property.</summary>
+ <returns>The identifier for the <see cref="P:System.Windows.Controls.Frame.Source" /> dependency property.</returns>
+ </member>
+ <member name="M:System.Windows.Controls.Frame.StopLoading">
+ <summary>Stops asynchronous navigations that have not yet been processed.</summary>
+ </member>
+ <member name="P:System.Windows.Controls.Frame.UriMapper">
+ <summary>Gets or sets the object to manage converting a uniform resource identifier (URI) to another URI for this frame.</summary>
+ <returns>The object to convert URIs for this frame.</returns>
+ </member>
+ <member name="F:System.Windows.Controls.Frame.UriMapperProperty">
+ <summary>Identifies the <see cref="P:System.Windows.Controls.Frame.UriMapper" /> dependency property.</summary>
+ <returns>The identifier for the <see cref="P:System.Windows.Controls.Frame.UriMapper" /> dependency property.</returns>
+ </member>
+ <member name="T:System.Windows.Controls.Page">
+ <summary>Encapsulates content that can be navigated to by a <see cref="T:System.Windows.Controls.Frame" />.</summary>
+ </member>
+ <member name="M:System.Windows.Controls.Page.#ctor">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Controls.Page" /> class. </summary>
+ </member>
+ <member name="P:System.Windows.Controls.Page.NavigationCacheMode">
+ <summary>Gets or sets a value that indicates whether this page is cached and whether it is cached indefinitely.</summary>
+ <returns>The value that specifies the caching behavior for this page.</returns>
+ </member>
+ <member name="P:System.Windows.Controls.Page.NavigationContext">
+ <summary>Gets an object that contains information about the navigation request.</summary>
+ <returns>An object that contains information about the navigation request.</returns>
+ </member>
+ <member name="P:System.Windows.Controls.Page.NavigationService">
+ <summary>Gets the service that the host used to navigate to this page.</summary>
+ <returns>The service the host used to navigate to this page.</returns>
+ </member>
+ <member name="M:System.Windows.Controls.Page.OnFragmentNavigation(System.Windows.Navigation.FragmentNavigationEventArgs)">
+ <summary>Called when navigating to a fragment on a page.</summary>
+ <param name="e">An object that contains the event data.</param>
+ </member>
+ <member name="M:System.Windows.Controls.Page.OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs)">
+ <summary>Called when a page is no longer the active page in a frame. </summary>
+ <param name="e">An object that contains the event data.</param>
+ </member>
+ <member name="M:System.Windows.Controls.Page.OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs)">
+ <summary>Called when a page becomes the active page in a frame. </summary>
+ <param name="e">An object that contains the event data.</param>
+ </member>
+ <member name="M:System.Windows.Controls.Page.OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs)">
+ <summary>Called just before a page is no longer the active page in a frame.</summary>
+ <param name="e">An object that contains the event data.</param>
+ </member>
+ <member name="P:System.Windows.Controls.Page.Title">
+ <summary>Gets or sets the name for the page.</summary>
+ <returns>The name for the page.</returns>
+ </member>
+ <member name="T:System.Windows.Navigation.FragmentNavigationEventArgs">
+ <summary>Provides data for the <see cref="M:System.Windows.Controls.Page.OnFragmentNavigation(System.Windows.Navigation.FragmentNavigationEventArgs)" /> method and <see cref="E:System.Windows.Navigation.NavigationService.FragmentNavigation" /> event.</summary>
+ </member>
+ <member name="P:System.Windows.Navigation.FragmentNavigationEventArgs.Fragment">
+ <summary>Gets the uniform resource identifier (URI) fragment.</summary>
+ <returns>The URI fragment. </returns>
+ </member>
+ <member name="T:System.Windows.Navigation.FragmentNavigationEventHandler">
+ <summary>Represents the method that will handle the <see cref="E:System.Windows.Navigation.NavigationService.FragmentNavigation" /> event. </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">The data for the event.</param>
+ </member>
+ <member name="T:System.Windows.Navigation.INavigationContentLoader">
+ <summary>Defines methods for loading content that corresponds to a URI. </summary>
+ </member>
+ <member name="M:System.Windows.Navigation.INavigationContentLoader.BeginLoad(System.Uri,System.Uri,System.AsyncCallback,System.Object)">
+ <summary>Begins asynchronous loading of the content for the specified target URI. </summary>
+ <returns>An object that stores information about the asynchronous operation.</returns>
+ <param name="targetUri">The URI to load content for.</param>
+ <param name="currentUri">The URI that is currently loaded. </param>
+ <param name="userCallback">The method to call when the content finishes loading. </param>
+ <param name="asyncState">An object for storing custom state information.</param>
+ </member>
+ <member name="M:System.Windows.Navigation.INavigationContentLoader.CancelLoad(System.IAsyncResult)">
+ <summary>Attempts to cancel content loading for the specified asynchronous operation. </summary>
+ <param name="asyncResult">An object that identifies the asynchronous operation to cancel. </param>
+ </member>
+ <member name="M:System.Windows.Navigation.INavigationContentLoader.CanLoad(System.Uri,System.Uri)">
+ <summary>Gets a value that indicates whether the specified URI can be loaded. </summary>
+ <returns>true if the URI can be loaded; otherwise, false.</returns>
+ <param name="targetUri">The URI to test.</param>
+ <param name="currentUri">The URI that is currently loaded.</param>
+ </member>
+ <member name="M:System.Windows.Navigation.INavigationContentLoader.EndLoad(System.IAsyncResult)">
+ <summary>Completes the asynchronous content loading operation. </summary>
+ <returns>An object that represents the result of the asynchronous content loading operation.</returns>
+ <param name="asyncResult">An object that identifies the asynchronous operation.</param>
+ </member>
+ <member name="T:System.Windows.Navigation.JournalOwnership">
+ <summary>Specifies the type of journal used by the frame. </summary>
+ </member>
+ <member name="F:System.Windows.Navigation.JournalOwnership.Automatic">
+ <summary>If the <see cref="T:System.Windows.Controls.Frame" /> control is a top-level frame, it integrates with the browser journal; otherwise, it maintains its own journal.</summary>
+ </member>
+ <member name="F:System.Windows.Navigation.JournalOwnership.OwnsJournal">
+ <summary>The <see cref="T:System.Windows.Controls.Frame" /> maintains its own journal. This option can be used with any <see cref="T:System.Windows.Controls.Frame" />.</summary>
+ </member>
+ <member name="F:System.Windows.Navigation.JournalOwnership.UsesParentJournal">
+ <summary>The <see cref="T:System.Windows.Controls.Frame" /> integrates with the browser journal. This option can be used only with a top-level <see cref="T:System.Windows.Controls.Frame" />; otherwise, an exception is thrown.</summary>
+ </member>
+ <member name="T:System.Windows.Navigation.LoadResult">
+ <summary>Represents the content loaded by an <see cref="T:System.Windows.Navigation.INavigationContentLoader" /> implementation.</summary>
+ </member>
+ <member name="M:System.Windows.Navigation.LoadResult.#ctor(System.Object)">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Navigation.LoadResult" /> class and sets the <see cref="P:System.Windows.Navigation.LoadResult.LoadedContent" /> property to the specified object.</summary>
+ <param name="loadedContent">The loaded page.</param>
+ </member>
+ <member name="M:System.Windows.Navigation.LoadResult.#ctor(System.Uri)">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Navigation.LoadResult" /> class and sets the <see cref="P:System.Windows.Navigation.LoadResult.RedirectUri" /> property to the specified object.</summary>
+ <param name="redirectUri">The URI to redirect navigation to.</param>
+ </member>
+ <member name="P:System.Windows.Navigation.LoadResult.LoadedContent">
+ <summary>Gets the loaded page.</summary>
+ <returns>The loaded page.</returns>
+ </member>
+ <member name="P:System.Windows.Navigation.LoadResult.RedirectUri">
+ <summary>Gets the URI to redirect navigation to.</summary>
+ <returns>The URI to redirect navigation to.</returns>
+ </member>
+ <member name="T:System.Windows.Navigation.NavigationCacheMode">
+ <summary>Specifies how the page is cached when used within a frame.</summary>
+ </member>
+ <member name="F:System.Windows.Navigation.NavigationCacheMode.Disabled">
+ <summary>The page is never cached and a new instance of the page is created on each visit.</summary>
+ </member>
+ <member name="F:System.Windows.Navigation.NavigationCacheMode.Required">
+ <summary>The page is cached and the cached instance is reused for every visit regardless of the cache size for the frame.</summary>
+ </member>
+ <member name="F:System.Windows.Navigation.NavigationCacheMode.Enabled">
+ <summary>The page is cached, but the cached instance is discarded when the size of the cache for the frame is exceeded.</summary>
+ </member>
+ <member name="T:System.Windows.Navigation.NavigationContext">
+ <summary>Represents the state of a navigation operation.</summary>
+ </member>
+ <member name="P:System.Windows.Navigation.NavigationContext.QueryString">
+ <summary>Gets a collection of query string values.</summary>
+ <returns>A collection that contains the query string values.</returns>
+ </member>
+ <member name="T:System.Windows.Navigation.NavigationFailedEventArgs">
+ <summary>Provides data for the <see cref="E:System.Windows.Navigation.NavigationService.NavigationFailed" /> event of the <see cref="T:System.Windows.Navigation.NavigationService" /> class and the <see cref="E:System.Windows.Controls.Frame.NavigationFailed" /> event of the <see cref="T:System.Windows.Controls.Frame" /> class.</summary>
+ </member>
+ <member name="P:System.Windows.Navigation.NavigationFailedEventArgs.Exception">
+ <summary>Gets the error from the failed navigation.</summary>
+ <returns>A value that represents the error.</returns>
+ </member>
+ <member name="P:System.Windows.Navigation.NavigationFailedEventArgs.Handled">
+ <summary>Gets or sets a value that indicates whether the failure event has been handled.</summary>
+ <returns>true if the event has been handled; otherwise, false.</returns>
+ </member>
+ <member name="P:System.Windows.Navigation.NavigationFailedEventArgs.Uri">
+ <summary>Gets the uniform resource identifier (URI) for the content that could not be navigated to.</summary>
+ <returns>A value that represents the URI.</returns>
+ </member>
+ <member name="T:System.Windows.Navigation.NavigationFailedEventHandler">
+ <summary>Represents the method that will handle the <see cref="E:System.Windows.Navigation.NavigationService.NavigationFailed" /> event. </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">The data for the event.</param>
+ </member>
+ <member name="T:System.Windows.Navigation.NavigationService">
+ <summary>Provides methods, properties, and events to support navigation within a Silverlight application.</summary>
+ </member>
+ <member name="P:System.Windows.Navigation.NavigationService.CanGoBack">
+ <summary>Gets a value that indicates whether there is at least one entry in the back navigation history.</summary>
+ <returns>true if there is at least one entry in the back navigation history; otherwise, false.</returns>
+ </member>
+ <member name="P:System.Windows.Navigation.NavigationService.CanGoForward">
+ <summary>Gets a value that indicates whether there is at least one entry in the forward navigation history.</summary>
+ <returns>true if there is at least one entry in the forward navigation history; otherwise, false.</returns>
+ </member>
+ <member name="P:System.Windows.Navigation.NavigationService.CurrentSource">
+ <summary>Gets the uniform resource identifier (URI) of the content that is currently displayed.</summary>
+ <returns>A value that represents the URI of content that is currently displayed.</returns>
+ </member>
+ <member name="E:System.Windows.Navigation.NavigationService.FragmentNavigation">
+ <summary>Occurs when navigation to a content fragment begins.</summary>
+ </member>
+ <member name="M:System.Windows.Navigation.NavigationService.GoBack">
+ <summary>Navigates to the most recent entry in the back navigation history, or throws an exception if no entry exists in back navigation.</summary>
+ <exception cref="T:System.InvalidOperationException">There are no entries in the back navigation history.</exception>
+ </member>
+ <member name="M:System.Windows.Navigation.NavigationService.GoForward">
+ <summary>Navigates to the most recent entry in the forward navigation history, or throws an exception if no entry exists in forward navigation.</summary>
+ <exception cref="T:System.InvalidOperationException">There are no entries in the forward navigation history.</exception>
+ </member>
+ <member name="M:System.Windows.Navigation.NavigationService.Navigate(System.Uri)">
+ <summary>Navigates to the content specified by the uniform resource identifier (URI).</summary>
+ <returns>true if the navigation started successfully; otherwise, false.</returns>
+ <param name="source">The URI of the content to navigate to.</param>
+ </member>
+ <member name="E:System.Windows.Navigation.NavigationService.Navigated">
+ <summary>Occurs when the content that is being navigated to has been found and is available.</summary>
+ </member>
+ <member name="E:System.Windows.Navigation.NavigationService.Navigating">
+ <summary>Occurs when a new navigation is requested.</summary>
+ </member>
+ <member name="E:System.Windows.Navigation.NavigationService.NavigationFailed">
+ <summary>Occurs when an error is encountered while navigating to the requested content.</summary>
+ </member>
+ <member name="E:System.Windows.Navigation.NavigationService.NavigationStopped">
+ <summary>Occurs when the <see cref="M:System.Windows.Navigation.NavigationService.StopLoading" /> method is called, or when a new navigation is requested while the current navigation is in progress.</summary>
+ </member>
+ <member name="M:System.Windows.Navigation.NavigationService.Refresh">
+ <summary>Reloads the current page. </summary>
+ </member>
+ <member name="P:System.Windows.Navigation.NavigationService.Source">
+ <summary>Gets or sets the uniform resource identifier (URI) of the current content or the content that is being navigated to.</summary>
+ <returns>A value that represents the URI of the current content or the content that is being navigated to.</returns>
+ </member>
+ <member name="M:System.Windows.Navigation.NavigationService.StopLoading">
+ <summary>Stops asynchronous navigations that have not yet been processed.</summary>
+ </member>
+ <member name="T:System.Windows.Navigation.NavigationStoppedEventHandler">
+ <summary>Represents the method that will handle the <see cref="E:System.Windows.Navigation.NavigationService.NavigationStopped" /> event. </summary>
+ <param name="sender">The source of the event.</param>
+ <param name="e">The data for the event.</param>
+ </member>
+ <member name="T:System.Windows.Navigation.PageResourceContentLoader">
+ <summary>Loads pages from the application package (.xap file) that correspond to a given URI.</summary>
+ </member>
+ <member name="M:System.Windows.Navigation.PageResourceContentLoader.#ctor">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Navigation.PageResourceContentLoader" /> class. </summary>
+ </member>
+ <member name="M:System.Windows.Navigation.PageResourceContentLoader.BeginLoad(System.Uri,System.Uri,System.AsyncCallback,System.Object)">
+ <summary>Begins asynchronous loading of the page that corresponds to the specified target URI.</summary>
+ <returns>An object that stores information about the asynchronous operation.</returns>
+ <param name="targetUri">The URI of the page to load.</param>
+ <param name="currentUri">The URI of the page that is currently loaded.</param>
+ <param name="userCallback">The method to call when the page finishes loading.</param>
+ <param name="asyncState">An object for storing custom state information.</param>
+ </member>
+ <member name="M:System.Windows.Navigation.PageResourceContentLoader.CancelLoad(System.IAsyncResult)">
+ <summary>Attempts to cancel content loading for the specified asynchronous operation.</summary>
+ <param name="asyncResult">An object that identifies the asynchronous operation to cancel.</param>
+ </member>
+ <member name="M:System.Windows.Navigation.PageResourceContentLoader.CanLoad(System.Uri,System.Uri)">
+ <summary>Gets a value that indicates whether the specified URI can be loaded.</summary>
+ <returns>true if the URI can be loaded; otherwise, false.</returns>
+ <param name="targetUri">The URI to test.</param>
+ <param name="currentUri">The URI of the page that is currently loaded.</param>
+ </member>
+ <member name="M:System.Windows.Navigation.PageResourceContentLoader.EndLoad(System.IAsyncResult)">
+ <summary>Completes the asynchronous content loading operation.</summary>
+ <returns>An object that represents the result of the asynchronous content loading operation.</returns>
+ <param name="asyncResult">An object that identifies the asynchronous operation.</param>
+ </member>
+ <member name="T:System.Windows.Navigation.UriMapper">
+ <summary>Converts a uniform resource identifier (URI) into a new URI based on the rules of a matching object specified in a collection of mapping objects.</summary>
+ </member>
+ <member name="M:System.Windows.Navigation.UriMapper.#ctor">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Navigation.UriMapper" /> class. </summary>
+ </member>
+ <member name="M:System.Windows.Navigation.UriMapper.MapUri(System.Uri)">
+ <summary>Converts a specified uniform resource identifier (URI) into a new URI based on the rules of a matching object in the <see cref="P:System.Windows.Navigation.UriMapper.UriMappings" /> collection.</summary>
+ <returns>A URI to use for handling the request instead of the value of the <paramref name="uri" /> parameter. If no object in the <see cref="P:System.Windows.Navigation.UriMapper.UriMappings" /> collection matches <paramref name="uri" />, the original value for <paramref name="uri" /> is returned.</returns>
+ <param name="uri">Original URI value to be converted to a new URI.</param>
+ <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Windows.Navigation.UriMapper.UriMappings" /> property is null.</exception>
+ </member>
+ <member name="P:System.Windows.Navigation.UriMapper.UriMappings">
+ <summary>Gets a collection of objects that are used to convert a uniform resource identifier (URI) into a new URI.</summary>
+ <returns>A collection of objects that are used to convert URI values.</returns>
+ </member>
+ <member name="T:System.Windows.Navigation.UriMapperBase">
+ <summary>Represents the base class for classes that convert a requested uniform resource identifier (URI) into a new URI based on mapping rules.</summary>
+ </member>
+ <member name="M:System.Windows.Navigation.UriMapperBase.#ctor">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Navigation.UriMapperBase" /> class. </summary>
+ </member>
+ <member name="M:System.Windows.Navigation.UriMapperBase.MapUri(System.Uri)">
+ <summary>When overridden in a derived class, converts a requested uniform resource identifier (URI) to a new URI.</summary>
+ <returns>A URI to use for the request instead of the value in the <paramref name="uri" /> parameter.</returns>
+ <param name="uri">The original URI value to be mapped to a new URI.</param>
+ </member>
+ <member name="T:System.Windows.Navigation.UriMapping">
+ <summary>Defines the pattern for converting a requested uniform resource identifier (URI) into a new URI.</summary>
+ </member>
+ <member name="M:System.Windows.Navigation.UriMapping.#ctor">
+ <summary>Initializes a new instance of the <see cref="T:System.Windows.Navigation.UriMapping" /> class. </summary>
+ </member>
+ <member name="P:System.Windows.Navigation.UriMapping.MappedUri">
+ <summary>Gets or sets the uniform resource identifier (URI) that is navigated to instead of the originally requested URI.</summary>
+ <returns>The URI that the requested URI is converted to.</returns>
+ </member>
+ <member name="M:System.Windows.Navigation.UriMapping.MapUri(System.Uri)">
+ <summary>Converts the specified uniform resource identifier (URI) to a new URI, if the specified URI matches the defined template for converting.</summary>
+ <returns>The URI that has been converted or null if the URI cannot be converted.</returns>
+ <param name="uri">The URI to convert.</param>
+ <exception cref="T:System.InvalidOperationException">
+ <see cref="P:System.Windows.Navigation.UriMapping.Uri" /> is null.-or-<see cref="P:System.Windows.Navigation.UriMapping.MappedUri" /> is null.-or-<see cref="P:System.Windows.Navigation.UriMapping.Uri" /> includes a query string.-or-<see cref="P:System.Windows.Navigation.UriMapping.Uri" /> includes a content fragment.</exception>
+ </member>
+ <member name="P:System.Windows.Navigation.UriMapping.Uri">
+ <summary>Gets or sets the pattern to match when determining if the requested uniform resource identifier (URI) is converted to a mapped URI.</summary>
+ <returns>The URI that will be converted.</returns>
+ </member>
+ </members>
+</doc> \ No newline at end of file
diff --git a/cs/demo/Glacier2/sl/chat/bin/chat.xap b/cs/demo/Glacier2/sl/chat/bin/chat.xap
new file mode 100644
index 00000000000..6200a293731
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/bin/chat.xap
Binary files differ
diff --git a/cs/demo/Glacier2/sl/chat/bin/chatTestPage.html b/cs/demo/Glacier2/sl/chat/bin/chatTestPage.html
new file mode 100644
index 00000000000..524b06f2166
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/bin/chatTestPage.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<!-- saved from url=(0014)about:internet -->
+<head>
+ <title>chat</title>
+ <style type="text/css">
+ html, body {
+ height: 100%;
+ overflow: auto;
+ }
+ body {
+ padding: 0;
+ margin: 0;
+ }
+ #silverlightControlHost {
+ height: 100%;
+ text-align:center;
+ }
+ </style>
+
+ <script type="text/javascript">
+ function onSilverlightError(sender, args) {
+ var appSource = "";
+ if (sender != null && sender != 0) {
+ appSource = sender.getHost().Source;
+ }
+
+ var errorType = args.ErrorType;
+ var iErrorCode = args.ErrorCode;
+
+ if (errorType == "ImageError" || errorType == "MediaError") {
+ return;
+ }
+
+ var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
+
+ errMsg += "Code: "+ iErrorCode + " \n";
+ errMsg += "Category: " + errorType + " \n";
+ errMsg += "Message: " + args.ErrorMessage + " \n";
+
+ if (errorType == "ParserError") {
+ errMsg += "File: " + args.xamlFile + " \n";
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ else if (errorType == "RuntimeError") {
+ if (args.lineNumber != 0) {
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ errMsg += "MethodName: " + args.methodName + " \n";
+ }
+
+ throw new Error(errMsg);
+ }
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server" style="height:100%">
+ <div id="silverlightControlHost">
+ <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
+ <param name="source" value="chat.xap"/>
+ <param name="onError" value="onSilverlightError" />
+ <param name="background" value="white" />
+ <param name="minRuntimeVersion" value="5.0.61118.0" />
+ <param name="autoUpgrade" value="true" />
+ <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
+ <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
+ </a>
+ </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
+ </form>
+</body>
+</html>
diff --git a/cs/demo/Glacier2/sl/chat/chat.csproj b/cs/demo/Glacier2/sl/chat/chat.csproj
new file mode 100644
index 00000000000..4afa49ceef8
--- /dev/null
+++ b/cs/demo/Glacier2/sl/chat/chat.csproj
@@ -0,0 +1,145 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{78FA0B57-6672-4173-8CA3-C81FA402F4E1}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>chat</RootNamespace>
+ <AssemblyName>chat</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>chat.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>chat.App</SilverlightAppEntry>
+ <TestPageFileName>chatTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>false</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>Bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>Bin\Release\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Glacier2, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Windows.Controls.Navigation, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Chat.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="ChatPage.xaml.cs">
+ <DependentUpon>ChatPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="ConnectingPage.xaml.cs">
+ <DependentUpon>ConnectingPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Coordinator.cs" />
+ <Compile Include="DisconnectingPage.xaml.cs">
+ <DependentUpon>DisconnectingPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="LoginPage.xaml.cs">
+ <DependentUpon>LoginPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="MainPage.xaml.cs">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ <Page Include="ChatPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="ConnectingPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="DisconnectingPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="LoginPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ <Page Include="MainPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Chat.ice" />
+ <None Include="Properties\AppManifest.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/demo/Ice/compact/Program.cs b/cs/demo/Ice/compact/Program.cs
deleted file mode 100644
index ddcf47cb988..00000000000
--- a/cs/demo/Ice/compact/Program.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using System;
-using System.Linq;
-using System.Collections.Generic;
-using System.Windows.Forms;
-
-namespace client
-{
- static class Program
- {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [MTAThread]
- static void Main()
- {
- Application.Run(new MainForm());
- }
- }
-} \ No newline at end of file
diff --git a/cs/demo/Ice/compact/bidir/Callback.ice b/cs/demo/Ice/compact/bidir/Callback.ice
new file mode 100644
index 00000000000..2bdd497a048
--- /dev/null
+++ b/cs/demo/Ice/compact/bidir/Callback.ice
@@ -0,0 +1,30 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#ifndef CALLBACK_ICE
+#define CALLBACK_ICE
+
+#include <Ice/Identity.ice>
+
+module Demo
+{
+
+interface CallbackReceiver
+{
+ void callback(int num);
+};
+
+interface CallbackSender
+{
+ void addClient(Ice::Identity ident);
+};
+
+};
+
+#endif
diff --git a/cs/demo/Ice/compact/bidir/CallbackSenderI.cs b/cs/demo/Ice/compact/bidir/CallbackSenderI.cs
new file mode 100644
index 00000000000..8669e0fe53f
--- /dev/null
+++ b/cs/demo/Ice/compact/bidir/CallbackSenderI.cs
@@ -0,0 +1,110 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using Demo;
+using System;
+using System.Collections;
+
+class CallbackSenderI : CallbackSenderDisp_
+{
+ public CallbackSenderI(Ice.Communicator communicator)
+ {
+ _communicator = communicator;
+ _destroy = false;
+ _clients = new ArrayList();
+ }
+
+ public void destroy()
+ {
+ _m.Lock();
+ try
+ {
+ System.Console.Out.WriteLine("destroying callback sender");
+ _destroy = true;
+
+ _m.Notify();
+ }
+ finally
+ {
+ _m.Unlock();
+ }
+ }
+
+ public override void addClient(Ice.Identity ident, Ice.Current current)
+ {
+ _m.Lock();
+ try
+ {
+ System.Console.Out.WriteLine("adding client `" + _communicator.identityToString(ident) + "'");
+
+ Ice.ObjectPrx @base = current.con.createProxy(ident);
+ CallbackReceiverPrx client = CallbackReceiverPrxHelper.uncheckedCast(@base);
+ _clients.Add(client);
+ }
+ finally
+ {
+ _m.Unlock();
+ }
+ }
+
+ public void Run()
+ {
+ int num = 0;
+ while(true)
+ {
+ ArrayList clients;
+ _m.Lock();
+ try
+ {
+ _m.TimedWait(2000);
+ if(_destroy)
+ {
+ break;
+ }
+
+ clients = new ArrayList(_clients);
+ }
+ finally
+ {
+ _m.Unlock();
+ }
+
+ if(clients.Count > 0)
+ {
+ ++num;
+ foreach(CallbackReceiverPrx c in clients)
+ {
+ try
+ {
+ c.callback(num);
+ }
+ catch(Ice.LocalException ex)
+ {
+ Console.Error.WriteLine("removing client `" +
+ _communicator.identityToString(c.ice_getIdentity()) + "':\n" + ex);
+ _m.Lock();
+ try
+ {
+ _clients.Remove(c);
+ }
+ finally
+ {
+ _m.Unlock();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private Ice.Communicator _communicator;
+ private bool _destroy;
+ private ArrayList _clients;
+ private readonly IceUtilInternal.Monitor _m = new IceUtilInternal.Monitor();
+}
diff --git a/cs/demo/Ice/compact/bidir/MainForm.Designer.cs b/cs/demo/Ice/compact/bidir/MainForm.Designer.cs
new file mode 100644
index 00000000000..4911b127bc5
--- /dev/null
+++ b/cs/demo/Ice/compact/bidir/MainForm.Designer.cs
@@ -0,0 +1,107 @@
+namespace server
+{
+ partial class MainForm
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+ private System.Windows.Forms.MainMenu mainMenu1;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.mainMenu1 = new System.Windows.Forms.MainMenu();
+ this.lblStatus = new System.Windows.Forms.Label();
+ this.btnStart = new System.Windows.Forms.Button();
+ this.btnStop = new System.Windows.Forms.Button();
+ this.lblPort = new System.Windows.Forms.Label();
+ this.txtPort = new System.Windows.Forms.TextBox();
+ this.SuspendLayout();
+ //
+ // lblStatus
+ //
+ this.lblStatus.Location = new System.Drawing.Point(13, 94);
+ this.lblStatus.Name = "lblStatus";
+ this.lblStatus.Size = new System.Drawing.Size(212, 79);
+ //
+ // btnStart
+ //
+ this.btnStart.Location = new System.Drawing.Point(13, 34);
+ this.btnStart.Name = "btnStart";
+ this.btnStart.Size = new System.Drawing.Size(212, 20);
+ this.btnStart.TabIndex = 2;
+ this.btnStart.Text = "Start Server";
+ this.btnStart.Click += new System.EventHandler(this.btnStart_Click);
+ //
+ // btnStop
+ //
+ this.btnStop.Enabled = false;
+ this.btnStop.Location = new System.Drawing.Point(13, 60);
+ this.btnStop.Name = "btnStop";
+ this.btnStop.Size = new System.Drawing.Size(212, 20);
+ this.btnStop.TabIndex = 3;
+ this.btnStop.Text = "Stop Server";
+ this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
+ //
+ // lblPort
+ //
+ this.lblPort.Location = new System.Drawing.Point(13, 4);
+ this.lblPort.Name = "lblPort";
+ this.lblPort.Size = new System.Drawing.Size(39, 20);
+ this.lblPort.Text = "Port:";
+ //
+ // txtPort
+ //
+ this.txtPort.Location = new System.Drawing.Point(54, 4);
+ this.txtPort.Name = "txtPort";
+ this.txtPort.Size = new System.Drawing.Size(171, 21);
+ this.txtPort.TabIndex = 6;
+ this.txtPort.Text = "10000";
+ //
+ // MainForm
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
+ this.AutoScroll = true;
+ this.ClientSize = new System.Drawing.Size(240, 268);
+ this.Controls.Add(this.txtPort);
+ this.Controls.Add(this.lblPort);
+ this.Controls.Add(this.btnStop);
+ this.Controls.Add(this.btnStart);
+ this.Controls.Add(this.lblStatus);
+ this.Menu = this.mainMenu1;
+ this.Name = "MainForm";
+ this.Text = "Bidir Server";
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.Label lblStatus;
+ private System.Windows.Forms.Button btnStart;
+ private System.Windows.Forms.Button btnStop;
+ private System.Windows.Forms.Label lblPort;
+ private System.Windows.Forms.TextBox txtPort;
+ }
+}
+
diff --git a/cs/demo/Ice/compact/bidir/MainForm.cs b/cs/demo/Ice/compact/bidir/MainForm.cs
new file mode 100644
index 00000000000..73576214f7a
--- /dev/null
+++ b/cs/demo/Ice/compact/bidir/MainForm.cs
@@ -0,0 +1,103 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Threading;
+
+namespace server
+{
+ public partial class MainForm : Form
+ {
+ public MainForm()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnClosed(EventArgs e)
+ {
+ base.OnClosed(e);
+ stop();
+ }
+
+ private void btnStart_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Callback.Server.Endpoints", "tcp -h 0.0.0.0 -p " + txtPort.Text);
+ _communicator = Ice.Util.initialize(initData);
+
+ Ice.ObjectAdapter adapter = _communicator.createObjectAdapter("Callback.Server");
+ _sender = new CallbackSenderI(_communicator);
+ adapter.add(_sender, _communicator.stringToIdentity("sender"));
+ adapter.activate();
+
+ _thread = new Thread(new ThreadStart(_sender.Run));
+ _thread.Start();
+ btnStart.Enabled = false;
+ btnStop.Enabled = true;
+ }
+ catch(Exception ex)
+ {
+ lblStatus.Text = "Start Failed: " + Environment.NewLine + ex.ToString();
+ }
+ lblStatus.Text = "Server started ok";
+ }
+
+ private void btnStop_Click(object sender, EventArgs e)
+ {
+ stop();
+ }
+
+ private void stop()
+ {
+ try
+ {
+ if(_communicator == null)
+ {
+ return;
+ }
+ _communicator.destroy();
+ _communicator = null;
+
+ if(_sender != null)
+ {
+ _sender.destroy();
+ }
+
+ if(_thread != null)
+ {
+ _thread.Join();
+ }
+ }
+ catch(Exception ex)
+ {
+ lblStatus.Text = "Stop Failed: " + Environment.NewLine + ex.ToString();
+ }
+ finally
+ {
+ btnStart.Enabled = true;
+ btnStop.Enabled = false;
+ }
+ lblStatus.Text = "Server stoped ok";
+ }
+
+ private Ice.Communicator _communicator;
+ private CallbackSenderI _sender;
+ private Thread _thread;
+ }
+} \ No newline at end of file
diff --git a/cs/demo/Ice/compact/MainForm.resx b/cs/demo/Ice/compact/bidir/MainForm.resx
index c9d1ac5082d..c9d1ac5082d 100644
--- a/cs/demo/Ice/compact/MainForm.resx
+++ b/cs/demo/Ice/compact/bidir/MainForm.resx
diff --git a/cs/demo/Ice/compact/bidir/Program.cs b/cs/demo/Ice/compact/bidir/Program.cs
new file mode 100644
index 00000000000..9f62d25cec9
--- /dev/null
+++ b/cs/demo/Ice/compact/bidir/Program.cs
@@ -0,0 +1,28 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace server
+{
+ static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [MTAThread]
+ static void Main()
+ {
+ Application.Run(new MainForm());
+ }
+ }
+} \ No newline at end of file
diff --git a/cs/demo/Ice/compact/bidir/README.txt b/cs/demo/Ice/compact/bidir/README.txt
new file mode 100644
index 00000000000..f8939ecb777
--- /dev/null
+++ b/cs/demo/Ice/compact/bidir/README.txt
@@ -0,0 +1,58 @@
+This demo shows how to write a simple C# server application using Ice
+for .NET Compact Framework (CF).
+
+This demo requires a bidir client. You can use the C# client located
+in ..\..\bidir, or you can use a client from any other language mapping.
+
+You must use Visual Studio 2008 to build this client (Visual Studio
+2010 does not support Compact Framework development). Follow these
+instructions to build and run the client:
+
+1) Open the project in Visual Studio 2008. This is a Smart Device
+ project and therefore Visual Studio will compile it against the
+ Compact Framework libraries. Furthermore, the Ice Visual Studio
+ Add-in detects a Smart Device project and automatically
+ configures the project to compile against the Ice for .NET CF
+ DLL in <Ice installation directory>\bin\cf\Ice.dll.
+
+2) Build the client by right-clicking on the project and choosing
+ "Build".
+
+3) Start a device emulator. Select Tools -> Device Emulator Manager,
+ highlight "USA Windows Mobile 5.0 Pocket PC R2 Emulator", and
+ select Actions -> Connect.
+
+4) In the emulator window, select File -> Configure, open the Network
+ tab, and check "Enable NE2000 PCMCIA network adapter". Open the
+ drop-down menu and select the appropriate network adapter, then
+ press OK.
+
+ If you get an error dialog that mentions Virtual PC 2007, you will
+ need to install this product to enable network access for the
+ emulator. You can download Virtual PC 2007 at the link below:
+
+ http://www.microsoft.com/downloads/en/details.aspx?FamilyID=04d26402-3199-48a3-afa2-2dc0b40a73b6
+
+ Close the emulator, install Virtual PC 2007, and restart the
+ emulator.
+
+5) After successfully enabling the network adapter, you may need to
+ activate the network connection. Click on the symbol resembling an
+ antenna in the device's status bar and choose Connect to start the
+ connection. If you wish, start Internet Explorer and verify that
+ you can successfully access the Internet.
+
+6) In Visual Studio, right-click on the project, choose Deploy, select
+ the "USA Windows Mobile 5.0 Pocket PC R2 Emulator" device, and
+ click Deploy. This action causes Visual Studio to install the .NET
+ CF run time, the client executable, and the Ice for .NET CF run
+ time in the emulator.
+
+7) In the emulator, choose Start -> Programs and select File Explorer.
+ Click on My Documents and choose My Device. Select Program Files,
+ then select "server".
+
+8) Select "server" to start the program. Click the Start Server button
+ to start the server.
+
+9) Finally in a command window, start the bidir client.
diff --git a/cs/demo/Ice/compact/bidir/server.csproj b/cs/demo/Ice/compact/bidir/server.csproj
new file mode 100644
index 00000000000..3e10dca53f1
--- /dev/null
+++ b/cs/demo/Ice/compact/bidir/server.csproj
@@ -0,0 +1,99 @@
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.21022</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{05B11482-32A1-4212-A7F8-2A135FADD164}</ProjectGuid>
+ <OutputType>WinExe</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>server</RootNamespace>
+ <AssemblyName>server</AssemblyName>
+ <ProjectTypeGuids>{4D628B5B-2FBC-4AA6-8C16-197242AEB884};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <PlatformFamilyName>PocketPC</PlatformFamilyName>
+ <PlatformID>4118C335-430C-497f-BE48-11C3316B135E</PlatformID>
+ <OSVersion>5.1</OSVersion>
+ <DeployDirSuffix>server</DeployDirSuffix>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <NativePlatformName>Windows Mobile 5.0 Pocket PC SDK</NativePlatformName>
+ <FormFactorID>
+ </FormFactorID>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;PocketPC COMPACT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;$(PlatformFamilyName)</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <FileAlignment>512</FileAlignment>
+ <WarningLevel>4</WarningLevel>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=cdd571ade22f2f16, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Windows.Forms" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Callback.cs" />
+ <Compile Include="CallbackSenderI.cs" />
+ <Compile Include="MainForm.cs">
+ <SubType>Form</SubType>
+ </Compile>
+ <Compile Include="MainForm.Designer.cs">
+ <DependentUpon>MainForm.cs</DependentUpon>
+ </Compile>
+ <Compile Include="Program.cs" />
+ <EmbeddedResource Include="MainForm.resx">
+ <DependentUpon>MainForm.cs</DependentUpon>
+ <SubType>Designer</SubType>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Callback.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="README.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="Properties\" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
+ <HostingProcess disable="1" />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
diff --git a/cs/demo/Ice/compact/Hello.ice b/cs/demo/Ice/compact/hello/Hello.ice
index bb7f6d95924..bb7f6d95924 100644
--- a/cs/demo/Ice/compact/Hello.ice
+++ b/cs/demo/Ice/compact/hello/Hello.ice
diff --git a/cs/demo/Ice/compact/MainForm.Designer.cs b/cs/demo/Ice/compact/hello/MainForm.Designer.cs
index e8e802659e5..e8e802659e5 100644
--- a/cs/demo/Ice/compact/MainForm.Designer.cs
+++ b/cs/demo/Ice/compact/hello/MainForm.Designer.cs
diff --git a/cs/demo/Ice/compact/MainForm.cs b/cs/demo/Ice/compact/hello/MainForm.cs
index 9e990f2c01b..9e990f2c01b 100644
--- a/cs/demo/Ice/compact/MainForm.cs
+++ b/cs/demo/Ice/compact/hello/MainForm.cs
diff --git a/vsaddin/src/IceSilverlightConfigurationDialog.resx b/cs/demo/Ice/compact/hello/MainForm.resx
index a5979aadfff..c9d1ac5082d 100644
--- a/vsaddin/src/IceSilverlightConfigurationDialog.resx
+++ b/cs/demo/Ice/compact/hello/MainForm.resx
@@ -117,7 +117,13 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
- <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <metadata name="mainMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
+ <metadata name="$this.FormFactorShadowProperty" xml:space="preserve">
+ <value>Pocket_PC</value>
+ </metadata>
+ <metadata name="$this.Skin" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+ <value>True</value>
+ </metadata>
</root> \ No newline at end of file
diff --git a/cs/demo/Ice/compact/hello/Program.cs b/cs/demo/Ice/compact/hello/Program.cs
new file mode 100644
index 00000000000..29c47e42752
--- /dev/null
+++ b/cs/demo/Ice/compact/hello/Program.cs
@@ -0,0 +1,28 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace client
+{
+ static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [MTAThread]
+ static void Main()
+ {
+ Application.Run(new MainForm());
+ }
+ }
+} \ No newline at end of file
diff --git a/cs/demo/Ice/compact/README b/cs/demo/Ice/compact/hello/README.txt
index af40ad420dc..71741d446f1 100644
--- a/cs/demo/Ice/compact/README
+++ b/cs/demo/Ice/compact/hello/README.txt
@@ -2,7 +2,7 @@ This demo shows how to write a simple C# client application using Ice
for .NET Compact Framework (CF).
This demo requires a hello server. You can use the C# server located
-in ..\hello, or you can use a server from any other language mapping.
+in ..\..\hello, or you can use a server from any other language mapping.
You must use Visual Studio 2008 to build this client (Visual Studio
2010 does not support Compact Framework development). Follow these
diff --git a/cs/demo/Ice/compact/Ice.compact.client.csproj b/cs/demo/Ice/compact/hello/client.csproj
index d97e53c724d..255657f4b27 100644
--- a/cs/demo/Ice/compact/Ice.compact.client.csproj
+++ b/cs/demo/Ice/compact/hello/client.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{95E6B539-E515-4BD4-BDB0-35D7C49C897D}</ProjectGuid>
<OutputType>WinExe</OutputType>
@@ -73,7 +73,9 @@
</ItemGroup>
<ItemGroup>
<None Include="Hello.ice" />
- <None Include="README" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="README.txt" />
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
@@ -84,7 +86,7 @@
<FlavorProperties GUID="{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}">
<HostingProcess disable="1" />
</FlavorProperties>
- <UserProperties ZerocIce_VerboseLevel="1" ZerocIce_Enabled="True" />
+ <UserProperties ZerocIce_Enabled="True" ZerocIce_VerboseLevel="1" />
</VisualStudio>
</ProjectExtensions>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -94,4 +96,4 @@
<Target Name="AfterBuild">
</Target>
-->
-</Project>
+</Project> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/bidir/README.txt b/cs/demo/Ice/sl/bidir/README.txt
new file mode 100644
index 00000000000..70f10f9f5f2
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/README.txt
@@ -0,0 +1,40 @@
+This demo shows how to use bidirectional connections for callbacks.
+This is typically used if the server cannot open a connection to the
+client to send callbacks, for example, because firewalls block
+incoming connections to the client.
+
+1) You can use a server from any Ice language mapping, befofe starting
+ the server, you must edit the server endpoints to use a port in the
+ range allowed by Silverlight.
+
+ Edit the config.server file in the server bidir demo directory and
+ update the property Callback.Server.Endpoints as follow:
+
+ Callback.Server.Endpoints=tcp -p 4502
+
+2) Start the bidir server following the instructions in the demo
+ README file.
+
+3) In a command window, start the policy server.
+
+ > cd <Ice installation directory>\bin
+ > policyserver 127.0.0.1 ..\config\PolicyResponse.xml
+
+4) From Visual Studio open the `bidir.Web' and start the bidir
+ Silverlight application using the "Debug > Start new instance"
+ command.
+
+==========================================================================
+Running the demo with .NET Compact Framework bidir server
+==========================================================================
+
+1) Start the bidir server following the instructions in the
+ demo\Ice\compact\bidir\README.txt file, before clicking the `Start
+ Server' button update the port field to 4502
+
+2) In the bidir demo "Properties > Debug" select Out-of-browser
+ application, and in the combo box select bidir.
+
+3) Start the bidir client using the "Debug > Start new instance"
+ command, set the host field to the ip address used by the emulator,
+ and click Run.
diff --git a/cs/demo/Ice/sl/bidir/bidir.Web/Properties/AssemblyInfo.cs b/cs/demo/Ice/sl/bidir/bidir.Web/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..efbd66fd1b0
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir.Web/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("bidir.Web")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("bidir.Web")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("4103934e-4e04-41e4-887a-5fc00f302aea")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/demo/Ice/sl/bidir/bidir.Web/Silverlight.js b/cs/demo/Ice/sl/bidir/bidir.Web/Silverlight.js
new file mode 100644
index 00000000000..15e04097676
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir.Web/Silverlight.js
@@ -0,0 +1,2 @@
+//v2.0.30511.0
+if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(b){if(b==undefined)b=null;var a=false,m=null;try{var i=null,j=false;if(window.ActiveXObject)try{i=new ActiveXObject("AgControl.AgControl");if(b===null)a=true;else if(i.IsVersionSupported(b))a=true;i=null}catch(l){j=true}else j=true;if(j){var k=navigator.plugins["Silverlight Plug-In"];if(k)if(b===null)a=true;else{var h=k.description;if(h==="1.0.30226.2")h="2.0.30226.2";var c=h.split(".");while(c.length>3)c.pop();while(c.length<4)c.push(0);var e=b.split(".");while(e.length>4)e.pop();var d,g,f=0;do{d=parseInt(e[f]);g=parseInt(c[f]);f++}while(f<e.length&&d===g);if(d<=g&&!isNaN(d))a=true}}}catch(l){a=false}return a};Silverlight.WaitForInstallCompletion=function(){if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){try{navigator.plugins.refresh()}catch(a){}if(Silverlight.isInstalled(null)&&!Silverlight.__onSilverlightInstalledCalled){Silverlight.onSilverlightInstalled();Silverlight.__onSilverlightInstalledCalled=true}else setTimeout(Silverlight.WaitForInstallCompletion,3e3)}};Silverlight.__startup=function(){navigator.plugins.refresh();Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null);if(!Silverlight.isBrowserRestartRequired){Silverlight.WaitForInstallCompletion();if(!Silverlight.__installationEventFired){Silverlight.onInstallRequired();Silverlight.__installationEventFired=true}}else if(window.navigator.mimeTypes){var b=navigator.mimeTypes["application/x-silverlight-2"],c=navigator.mimeTypes["application/x-silverlight-2-b2"],d=navigator.mimeTypes["application/x-silverlight-2-b1"],a=d;if(c)a=c;if(!b&&(d||c)){if(!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}}else if(b&&a)if(b.enabledPlugin&&a.enabledPlugin)if(b.enabledPlugin.description!=a.enabledPlugin.description)if(!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}}if(!Silverlight.disableAutoStartup)if(window.removeEventListener)window.removeEventListener("load",Silverlight.__startup,false);else window.detachEvent("onload",Silverlight.__startup)};if(!Silverlight.disableAutoStartup)if(window.addEventListener)window.addEventListener("load",Silverlight.__startup,false);else window.attachEvent("onload",Silverlight.__startup);Silverlight.createObject=function(m,f,e,k,l,h,j){var d={},a=k,c=l;d.version=a.version;a.source=m;d.alt=a.alt;if(h)a.initParams=h;if(a.isWindowless&&!a.windowless)a.windowless=a.isWindowless;if(a.framerate&&!a.maxFramerate)a.maxFramerate=a.framerate;if(e&&!a.id)a.id=e;delete a.ignoreBrowserVer;delete a.inplaceInstallPrompt;delete a.version;delete a.isWindowless;delete a.framerate;delete a.data;delete a.src;delete a.alt;if(Silverlight.isInstalled(d.version)){for(var b in c)if(c[b]){if(b=="onLoad"&&typeof c[b]=="function"&&c[b].length!=1){var i=c[b];c[b]=function(a){return i(document.getElementById(e),j,a)}}var g=Silverlight.__getHandlerName(c[b]);if(g!=null){a[b]=g;c[b]=null}else throw"typeof events."+b+" must be 'function' or 'string'";}slPluginHTML=Silverlight.buildHTML(a)}else slPluginHTML=Silverlight.buildPromptHTML(d);if(f)f.innerHTML=slPluginHTML;else return slPluginHTML};Silverlight.buildHTML=function(a){var b=[];b.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"');if(a.id!=null)b.push(' id="'+Silverlight.HtmlAttributeEncode(a.id)+'"');if(a.width!=null)b.push(' width="'+a.width+'"');if(a.height!=null)b.push(' height="'+a.height+'"');b.push(" >");delete a.id;delete a.width;delete a.height;for(var c in a)if(a[c])b.push('<param name="'+Silverlight.HtmlAttributeEncode(c)+'" value="'+Silverlight.HtmlAttributeEncode(a[c])+'" />');b.push("</object>");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d<c.length;d++){a=c.charCodeAt(d);if(a>96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+" \n";a+="Message: "+b.ErrorMessage+" \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+" \n";a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}a+="MethodName: "+b.methodName+" \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c} \ No newline at end of file
diff --git a/cs/demo/Ice/sl/bidir/bidir.Web/Web.Debug.config b/cs/demo/Ice/sl/bidir/bidir.Web/Web.Debug.config
new file mode 100644
index 00000000000..962e6b73a26
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir.Web/Web.Debug.config
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+ <!--
+ In the example below, the "SetAttributes" transform will change the value of
+ "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
+ finds an atrribute "name" that has a value of "MyDB".
+
+ <connectionStrings>
+ <add name="MyDB"
+ connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+ </connectionStrings>
+ -->
+ <system.web>
+ <!--
+ In the example below, the "Replace" transform will replace the entire
+ <customErrors> section of your web.config file.
+ Note that because there is only one customErrors section under the
+ <system.web> node, there is no need to use the "xdt:Locator" attribute.
+
+ <customErrors defaultRedirect="GenericError.htm"
+ mode="RemoteOnly" xdt:Transform="Replace">
+ <error statusCode="500" redirect="InternalError.htm"/>
+ </customErrors>
+ -->
+ </system.web>
+</configuration> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/bidir/bidir.Web/Web.Release.config b/cs/demo/Ice/sl/bidir/bidir.Web/Web.Release.config
new file mode 100644
index 00000000000..141832ba77e
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir.Web/Web.Release.config
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+ <!--
+ In the example below, the "SetAttributes" transform will change the value of
+ "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
+ finds an atrribute "name" that has a value of "MyDB".
+
+ <connectionStrings>
+ <add name="MyDB"
+ connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+ </connectionStrings>
+ -->
+ <system.web>
+ <compilation xdt:Transform="RemoveAttributes(debug)" />
+ <!--
+ In the example below, the "Replace" transform will replace the entire
+ <customErrors> section of your web.config file.
+ Note that because there is only one customErrors section under the
+ <system.web> node, there is no need to use the "xdt:Locator" attribute.
+
+ <customErrors defaultRedirect="GenericError.htm"
+ mode="RemoteOnly" xdt:Transform="Replace">
+ <error statusCode="500" redirect="InternalError.htm"/>
+ </customErrors>
+ -->
+ </system.web>
+</configuration> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/bidir/bidir.Web/Web.config b/cs/demo/Ice/sl/bidir/bidir.Web/Web.config
new file mode 100644
index 00000000000..0598be112f3
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir.Web/Web.config
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<!--
+ For more information on how to configure your ASP.NET application, please visit
+ http://go.microsoft.com/fwlink/?LinkId=169433
+ -->
+
+<configuration>
+ <system.web>
+ <compilation debug="true" targetFramework="4.0" />
+ </system.web>
+
+</configuration>
diff --git a/cs/demo/Ice/sl/bidir/bidir.Web/bidir.Web.csproj b/cs/demo/Ice/sl/bidir/bidir.Web/bidir.Web.csproj
new file mode 100644
index 00000000000..ac79f2dc89c
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir.Web/bidir.Web.csproj
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>
+ </ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0F089AE9-9F65-4C33-9F1F-183C6AC6E043}</ProjectGuid>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>bidir.Web</RootNamespace>
+ <AssemblyName>bidir.Web</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <UseIISExpress>false</UseIISExpress>
+ <SilverlightApplicationList>{73FE67BB-A2C1-464A-8F84-7B1282288CBA}|..\bidir\bidir.csproj|ClientBin|False</SilverlightApplicationList>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Web.DynamicData" />
+ <Reference Include="System.Web.Entity" />
+ <Reference Include="System.Web.ApplicationServices" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Web.Services" />
+ <Reference Include="System.EnterpriseServices" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="bidirTestPage.aspx" />
+ <Content Include="bidirTestPage.html" />
+ <Content Include="ClientBin\bidir.xap" />
+ <Content Include="Silverlight.js" />
+ <Content Include="Web.config" />
+ <Content Include="Web.Debug.config">
+ <DependentUpon>Web.config</DependentUpon>
+ </Content>
+ <Content Include="Web.Release.config">
+ <DependentUpon>Web.config</DependentUpon>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>False</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>49183</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>
+ </IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>False</UseCustomServer>
+ <CustomServerUrl>
+ </CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/bidir/bidir.Web/bidirTestPage.aspx b/cs/demo/Ice/sl/bidir/bidir.Web/bidirTestPage.aspx
new file mode 100644
index 00000000000..254083260d4
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir.Web/bidirTestPage.aspx
@@ -0,0 +1,74 @@
+<%@ Page Language="C#" AutoEventWireup="true" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head runat="server">
+ <title>bidir</title>
+ <style type="text/css">
+ html, body {
+ height: 100%;
+ overflow: auto;
+ }
+ body {
+ padding: 0;
+ margin: 0;
+ }
+ #silverlightControlHost {
+ height: 100%;
+ text-align:center;
+ }
+ </style>
+ <script type="text/javascript" src="Silverlight.js"></script>
+ <script type="text/javascript">
+ function onSilverlightError(sender, args) {
+ var appSource = "";
+ if (sender != null && sender != 0) {
+ appSource = sender.getHost().Source;
+ }
+
+ var errorType = args.ErrorType;
+ var iErrorCode = args.ErrorCode;
+
+ if (errorType == "ImageError" || errorType == "MediaError") {
+ return;
+ }
+
+ var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
+
+ errMsg += "Code: "+ iErrorCode + " \n";
+ errMsg += "Category: " + errorType + " \n";
+ errMsg += "Message: " + args.ErrorMessage + " \n";
+
+ if (errorType == "ParserError") {
+ errMsg += "File: " + args.xamlFile + " \n";
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ else if (errorType == "RuntimeError") {
+ if (args.lineNumber != 0) {
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ errMsg += "MethodName: " + args.methodName + " \n";
+ }
+
+ throw new Error(errMsg);
+ }
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server" style="height:100%">
+ <div id="silverlightControlHost">
+ <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
+ <param name="source" value="ClientBin/bidir.xap"/>
+ <param name="onError" value="onSilverlightError" />
+ <param name="background" value="white" />
+ <param name="minRuntimeVersion" value="5.0.61118.0" />
+ <param name="autoUpgrade" value="true" />
+ <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
+ <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
+ </a>
+ </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
+ </form>
+</body>
+</html>
diff --git a/cs/demo/Ice/sl/bidir/bidir.Web/bidirTestPage.html b/cs/demo/Ice/sl/bidir/bidir.Web/bidirTestPage.html
new file mode 100644
index 00000000000..8eecd7e7a94
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir.Web/bidirTestPage.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+
+<head>
+ <title>bidir</title>
+ <style type="text/css">
+ html, body {
+ height: 100%;
+ overflow: auto;
+ }
+ body {
+ padding: 0;
+ margin: 0;
+ }
+ #silverlightControlHost {
+ height: 100%;
+ text-align:center;
+ }
+ </style>
+ <script type="text/javascript" src="Silverlight.js"></script>
+ <script type="text/javascript">
+ function onSilverlightError(sender, args) {
+ var appSource = "";
+ if (sender != null && sender != 0) {
+ appSource = sender.getHost().Source;
+ }
+
+ var errorType = args.ErrorType;
+ var iErrorCode = args.ErrorCode;
+
+ if (errorType == "ImageError" || errorType == "MediaError") {
+ return;
+ }
+
+ var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
+
+ errMsg += "Code: "+ iErrorCode + " \n";
+ errMsg += "Category: " + errorType + " \n";
+ errMsg += "Message: " + args.ErrorMessage + " \n";
+
+ if (errorType == "ParserError") {
+ errMsg += "File: " + args.xamlFile + " \n";
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ else if (errorType == "RuntimeError") {
+ if (args.lineNumber != 0) {
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ errMsg += "MethodName: " + args.methodName + " \n";
+ }
+
+ throw new Error(errMsg);
+ }
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server" style="height:100%">
+ <div id="silverlightControlHost">
+ <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
+ <param name="source" value="ClientBin/bidir.xap"/>
+ <param name="onError" value="onSilverlightError" />
+ <param name="background" value="white" />
+ <param name="minRuntimeVersion" value="5.0.61118.0" />
+ <param name="autoUpgrade" value="true" />
+ <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
+ <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
+ </a>
+ </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
+ </form>
+</body>
+</html>
diff --git a/cs/demo/Ice/sl/bidir/bidir/.gitignore b/cs/demo/Ice/sl/bidir/bidir/.gitignore
new file mode 100644
index 00000000000..33d778217a5
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/.gitignore
@@ -0,0 +1,3 @@
+# Dummy file, so that git retains this otherwise empty directory.
+Callback.cs
+Bin/*
diff --git a/cs/demo/Ice/sl/bidir/bidir/App.xaml b/cs/demo/Ice/sl/bidir/bidir/App.xaml
new file mode 100644
index 00000000000..c6b2efe457f
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="bidir.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/demo/Ice/sl/bidir/bidir/App.xaml.cs b/cs/demo/Ice/sl/bidir/bidir/App.xaml.cs
new file mode 100644
index 00000000000..0b29c25a123
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/App.xaml.cs
@@ -0,0 +1,77 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace bidir
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ this.RootVisual = new MainPage();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/demo/Ice/sl/bidir/bidir/Callback.ice b/cs/demo/Ice/sl/bidir/bidir/Callback.ice
new file mode 100644
index 00000000000..73749b8ac28
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/Callback.ice
@@ -0,0 +1,27 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#pragma once
+
+#include <Ice/Identity.ice>
+
+module Demo
+{
+
+interface CallbackReceiver
+{
+ void callback(int num);
+};
+
+interface CallbackSender
+{
+ void addClient(Ice::Identity ident);
+};
+
+};
diff --git a/cs/demo/Ice/sl/bidir/bidir/CallbackReceiverI.cs b/cs/demo/Ice/sl/bidir/bidir/CallbackReceiverI.cs
new file mode 100644
index 00000000000..f1344304c47
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/CallbackReceiverI.cs
@@ -0,0 +1,38 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Demo;
+
+namespace bidir
+{
+ public class CallbackReceiverI : CallbackReceiverDisp_
+ {
+ public CallbackReceiverI(MainPage page)
+ {
+ _page = page;
+ }
+
+ public override void callback(int num, Ice.Current current)
+ {
+ _page.appendText("received callback #" + num.ToString() + Environment.NewLine);
+ }
+
+ private MainPage _page;
+ }
+}
diff --git a/cs/demo/Ice/sl/bidir/bidir/MainPage.xaml b/cs/demo/Ice/sl/bidir/bidir/MainPage.xaml
new file mode 100644
index 00000000000..2c82f736ce1
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/MainPage.xaml
@@ -0,0 +1,30 @@
+<UserControl x:Class="bidir.MainPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ mc:Ignorable="d"
+ d:DesignHeight="300" d:DesignWidth="400">
+
+ <StackPanel Margin="10, 10, 10, 10" HorizontalAlignment="Center">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
+ Margin="5, 5, 5, 5">
+ <TextBlock Text="Host:" Height="25" Width="80" VerticalAlignment="Center"/>
+ <TextBox x:Name="txtHost" HorizontalAlignment="Left"
+ Text="localhost"
+ TextWrapping="NoWrap"
+ VerticalAlignment="Top" Height="25" Width="320"/>
+ </StackPanel>
+ <Grid Margin="5, 5, 5, 5">
+ <TextBox x:Name="txtOutput"
+ FontSize="12" Text="" TextWrapping="Wrap" IsEnabled="True" Height="120"
+ Width="400" HorizontalScrollBarVisibility="Hidden"
+ VerticalScrollBarVisibility="Visible" IsReadOnly="True"/>
+ </Grid>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
+ Margin="5, 5, 5, 5">
+ <Button Name="btnRun" Content="Run" Click="btnRunClick"/>
+ <Button Name="btnStop" Content="Stop" Margin="5, 0, 0, 0" Click="btnStopClick"/>
+ </StackPanel>
+ </StackPanel>
+</UserControl>
diff --git a/cs/demo/Ice/sl/bidir/bidir/MainPage.xaml.cs b/cs/demo/Ice/sl/bidir/bidir/MainPage.xaml.cs
new file mode 100644
index 00000000000..1bff6219a38
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/MainPage.xaml.cs
@@ -0,0 +1,138 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Demo;
+
+namespace bidir
+{
+ public partial class MainPage : UserControl
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ }
+
+ private void btnRunClick(object sender, RoutedEventArgs e)
+ {
+ string host = txtHost.Text;
+ txtOutput.Text = "";
+ btnRun.IsEnabled = false;
+ btnStop.IsEnabled = true;
+
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.dispatcher = delegate(System.Action action, Ice.Connection connection)
+ {
+ Dispatcher.BeginInvoke(action);
+ };
+ _communicator = Ice.Util.initialize(initData);
+
+ CallbackSenderPrx server = CallbackSenderPrxHelper.uncheckedCast(
+ _communicator.stringToProxy("sender:tcp -h " + host + " -p 4502"));
+ if(server == null)
+ {
+ throw new ArgumentException("invalid proxy");
+ }
+
+ Ice.ObjectAdapter adapter = _communicator.createObjectAdapter("");
+ Ice.Identity ident = new Ice.Identity();
+ ident.name = Guid.NewGuid().ToString();
+ ident.category = "";
+ adapter.add(new CallbackReceiverI(this), ident);
+ adapter.activate();
+
+ //
+ // Establish the connection to the server by sending a ping request with AMI.
+ //
+ server.begin_ice_ping().whenCompleted(
+ () =>
+ {
+ //
+ // Associate the object adapter to the connection to receive requests
+ // over the bi-directional connection.
+ //
+ server.ice_getCachedConnection().setAdapter(adapter);
+
+ //
+ // Notify the server that we are ready to receive callbacks.
+ //
+ server.begin_addClient(ident).whenCompleted(
+ () =>
+ {
+ // Nothing to do.
+ },
+ (Ice.Exception ex) =>
+ {
+ appendText(ex.ToString());
+ });
+ },
+ (Ice.Exception ex) =>
+ {
+ appendText(ex.ToString());
+ });
+ }
+
+ private void btnStopClick(object sender, RoutedEventArgs e)
+ {
+ btnRun.IsEnabled = false;
+ btnStop.IsEnabled = false;
+
+ System.Threading.Thread t = new System.Threading.Thread(() =>
+ {
+ try
+ {
+ if (_communicator != null)
+ {
+ _communicator.destroy();
+ _communicator.waitForShutdown();
+ }
+ }
+ catch (Ice.CommunicatorDestroyedException)
+ {
+ }
+ catch (System.Exception ex)
+ {
+ Dispatcher.BeginInvoke(() =>
+ {
+ appendText(ex.ToString());
+ });
+ }
+ finally
+ {
+ _communicator = null;
+ Dispatcher.BeginInvoke(() =>
+ {
+ btnRun.IsEnabled = true;
+ btnStop.IsEnabled = false;
+ });
+ }
+ });
+ t.Start();
+ }
+
+ public void appendText(string text)
+ {
+ txtOutput.Text += text;
+ txtOutput.SelectionLength = 0;
+ txtOutput.SelectionStart = txtOutput.Text.Length;
+ }
+
+ private Ice.Communicator _communicator;
+ }
+}
diff --git a/cs/demo/Ice/sl/bidir/bidir/Properties/AppManifest.xml b/cs/demo/Ice/sl/bidir/bidir/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/demo/Ice/sl/bidir/bidir/Properties/AssemblyInfo.cs b/cs/demo/Ice/sl/bidir/bidir/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..9f6ef51375b
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("bidir")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("bidir")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f2750723-68b2-4743-93ad-319cc69fe014")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/demo/Ice/sl/bidir/bidir/Properties/OutOfBrowserSettings.xml b/cs/demo/Ice/sl/bidir/bidir/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..17143a20e83
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Bidir Demo" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Bidir Demo</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Bidir Demo" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/bidir/bidir/bidir.csproj b/cs/demo/Ice/sl/bidir/bidir/bidir.csproj
new file mode 100644
index 00000000000..5a5e33a6dd0
--- /dev/null
+++ b/cs/demo/Ice/sl/bidir/bidir/bidir.csproj
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{73FE67BB-A2C1-464A-8F84-7B1282288CBA}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>bidir</RootNamespace>
+ <AssemblyName>bidir</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>bidir.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>bidir.App</SilverlightAppEntry>
+ <TestPageFileName>bidirTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>Bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>Bin\Release\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Callback.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="CallbackReceiverI.cs" />
+ <Compile Include="MainPage.xaml.cs">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ <Page Include="MainPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Callback.ice" />
+ <None Include="Properties\AppManifest.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/hello/README.txt b/cs/demo/Ice/sl/hello/README.txt
new file mode 100644
index 00000000000..fd0da905f25
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/README.txt
@@ -0,0 +1,23 @@
+This demo illustrates how to invoke ordinary (twoway) operations,
+as well as how to make oneway, and batched invocations.
+
+1) You can use a server from any Ice language mapping, before starting
+ the server, you must edit the server endpoints to use a port in the
+ range allowed by Silverlight.
+
+ Edit the config.server file from the server hello demo directory
+ and update the property Hello.Endpoints as follow:
+
+ Hello.Endpoints=tcp -p 4502
+
+2) start the hello server following the instructions in the demo
+ README file.
+
+3) In a command window, start the policy server.
+
+ > cd <Ice installation directory>\bin
+ > policyserver 127.0.0.1 ..\config\PolicyResponse.xml
+
+4) From Visual Studio open the `hello.Web' project and start the hello
+ Silverlight application using the "Debug > Start new instance"
+ command.
diff --git a/cs/demo/Ice/sl/hello/hello.Web/Properties/AssemblyInfo.cs b/cs/demo/Ice/sl/hello/hello.Web/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..45caf87ffcf
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.Web/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("hello.Web")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("hello.Web")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("95388ccc-9e43-42a4-bc49-c81d0a836c50")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/demo/Ice/sl/hello/hello.Web/Silverlight.js b/cs/demo/Ice/sl/hello/hello.Web/Silverlight.js
new file mode 100644
index 00000000000..15e04097676
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.Web/Silverlight.js
@@ -0,0 +1,2 @@
+//v2.0.30511.0
+if(!window.Silverlight)window.Silverlight={};Silverlight._silverlightCount=0;Silverlight.__onSilverlightInstalledCalled=false;Silverlight.fwlinkRoot="http://go2.microsoft.com/fwlink/?LinkID=";Silverlight.__installationEventFired=false;Silverlight.onGetSilverlight=null;Silverlight.onSilverlightInstalled=function(){window.location.reload(false)};Silverlight.isInstalled=function(b){if(b==undefined)b=null;var a=false,m=null;try{var i=null,j=false;if(window.ActiveXObject)try{i=new ActiveXObject("AgControl.AgControl");if(b===null)a=true;else if(i.IsVersionSupported(b))a=true;i=null}catch(l){j=true}else j=true;if(j){var k=navigator.plugins["Silverlight Plug-In"];if(k)if(b===null)a=true;else{var h=k.description;if(h==="1.0.30226.2")h="2.0.30226.2";var c=h.split(".");while(c.length>3)c.pop();while(c.length<4)c.push(0);var e=b.split(".");while(e.length>4)e.pop();var d,g,f=0;do{d=parseInt(e[f]);g=parseInt(c[f]);f++}while(f<e.length&&d===g);if(d<=g&&!isNaN(d))a=true}}}catch(l){a=false}return a};Silverlight.WaitForInstallCompletion=function(){if(!Silverlight.isBrowserRestartRequired&&Silverlight.onSilverlightInstalled){try{navigator.plugins.refresh()}catch(a){}if(Silverlight.isInstalled(null)&&!Silverlight.__onSilverlightInstalledCalled){Silverlight.onSilverlightInstalled();Silverlight.__onSilverlightInstalledCalled=true}else setTimeout(Silverlight.WaitForInstallCompletion,3e3)}};Silverlight.__startup=function(){navigator.plugins.refresh();Silverlight.isBrowserRestartRequired=Silverlight.isInstalled(null);if(!Silverlight.isBrowserRestartRequired){Silverlight.WaitForInstallCompletion();if(!Silverlight.__installationEventFired){Silverlight.onInstallRequired();Silverlight.__installationEventFired=true}}else if(window.navigator.mimeTypes){var b=navigator.mimeTypes["application/x-silverlight-2"],c=navigator.mimeTypes["application/x-silverlight-2-b2"],d=navigator.mimeTypes["application/x-silverlight-2-b1"],a=d;if(c)a=c;if(!b&&(d||c)){if(!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}}else if(b&&a)if(b.enabledPlugin&&a.enabledPlugin)if(b.enabledPlugin.description!=a.enabledPlugin.description)if(!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}}if(!Silverlight.disableAutoStartup)if(window.removeEventListener)window.removeEventListener("load",Silverlight.__startup,false);else window.detachEvent("onload",Silverlight.__startup)};if(!Silverlight.disableAutoStartup)if(window.addEventListener)window.addEventListener("load",Silverlight.__startup,false);else window.attachEvent("onload",Silverlight.__startup);Silverlight.createObject=function(m,f,e,k,l,h,j){var d={},a=k,c=l;d.version=a.version;a.source=m;d.alt=a.alt;if(h)a.initParams=h;if(a.isWindowless&&!a.windowless)a.windowless=a.isWindowless;if(a.framerate&&!a.maxFramerate)a.maxFramerate=a.framerate;if(e&&!a.id)a.id=e;delete a.ignoreBrowserVer;delete a.inplaceInstallPrompt;delete a.version;delete a.isWindowless;delete a.framerate;delete a.data;delete a.src;delete a.alt;if(Silverlight.isInstalled(d.version)){for(var b in c)if(c[b]){if(b=="onLoad"&&typeof c[b]=="function"&&c[b].length!=1){var i=c[b];c[b]=function(a){return i(document.getElementById(e),j,a)}}var g=Silverlight.__getHandlerName(c[b]);if(g!=null){a[b]=g;c[b]=null}else throw"typeof events."+b+" must be 'function' or 'string'";}slPluginHTML=Silverlight.buildHTML(a)}else slPluginHTML=Silverlight.buildPromptHTML(d);if(f)f.innerHTML=slPluginHTML;else return slPluginHTML};Silverlight.buildHTML=function(a){var b=[];b.push('<object type="application/x-silverlight" data="data:application/x-silverlight,"');if(a.id!=null)b.push(' id="'+Silverlight.HtmlAttributeEncode(a.id)+'"');if(a.width!=null)b.push(' width="'+a.width+'"');if(a.height!=null)b.push(' height="'+a.height+'"');b.push(" >");delete a.id;delete a.width;delete a.height;for(var c in a)if(a[c])b.push('<param name="'+Silverlight.HtmlAttributeEncode(c)+'" value="'+Silverlight.HtmlAttributeEncode(a[c])+'" />');b.push("</object>");return b.join("")};Silverlight.createObjectEx=function(b){var a=b,c=Silverlight.createObject(a.source,a.parentElement,a.id,a.properties,a.events,a.initParams,a.context);if(a.parentElement==null)return c};Silverlight.buildPromptHTML=function(b){var a="",d=Silverlight.fwlinkRoot,c=b.version;if(b.alt)a=b.alt;else{if(!c)c="";a="<a href='javascript:Silverlight.getSilverlight(\"{1}\");' style='text-decoration: none;'><img src='{2}' alt='Get Microsoft Silverlight' style='border-style: none'/></a>";a=a.replace("{1}",c);a=a.replace("{2}",d+"108181")}return a};Silverlight.getSilverlight=function(e){if(Silverlight.onGetSilverlight)Silverlight.onGetSilverlight();var b="",a=String(e).split(".");if(a.length>1){var c=parseInt(a[0]);if(isNaN(c)||c<2)b="1.0";else b=a[0]+"."+a[1]}var d="";if(b.match(/^\d+\056\d+$/))d="&v="+b;Silverlight.followFWLink("149156"+d)};Silverlight.followFWLink=function(a){top.location=Silverlight.fwlinkRoot+String(a)};Silverlight.HtmlAttributeEncode=function(c){var a,b="";if(c==null)return null;for(var d=0;d<c.length;d++){a=c.charCodeAt(d);if(a>96&&a<123||a>64&&a<91||a>43&&a<58&&a!=47||a==95)b=b+String.fromCharCode(a);else b=b+"&#"+a+";"}return b};Silverlight.default_error_handler=function(e,b){var d,c=b.ErrorType;d=b.ErrorCode;var a="\nSilverlight error message \n";a+="ErrorCode: "+d+"\n";a+="ErrorType: "+c+" \n";a+="Message: "+b.ErrorMessage+" \n";if(c=="ParserError"){a+="XamlFile: "+b.xamlFile+" \n";a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}else if(c=="RuntimeError"){if(b.lineNumber!=0){a+="Line: "+b.lineNumber+" \n";a+="Position: "+b.charPosition+" \n"}a+="MethodName: "+b.methodName+" \n"}alert(a)};Silverlight.__cleanup=function(){for(var a=Silverlight._silverlightCount-1;a>=0;a--)window["__slEvent"+a]=null;Silverlight._silverlightCount=0;if(window.removeEventListener)window.removeEventListener("unload",Silverlight.__cleanup,false);else window.detachEvent("onunload",Silverlight.__cleanup)};Silverlight.__getHandlerName=function(b){var a="";if(typeof b=="string")a=b;else if(typeof b=="function"){if(Silverlight._silverlightCount==0)if(window.addEventListener)window.addEventListener("onunload",Silverlight.__cleanup,false);else window.attachEvent("onunload",Silverlight.__cleanup);var c=Silverlight._silverlightCount++;a="__slEvent"+c;window[a]=b}else a=null;return a};Silverlight.onRequiredVersionAvailable=function(){};Silverlight.onRestartRequired=function(){};Silverlight.onUpgradeRequired=function(){};Silverlight.onInstallRequired=function(){};Silverlight.IsVersionAvailableOnError=function(d,a){var b=false;try{if(a.ErrorCode==8001&&!Silverlight.__installationEventFired){Silverlight.onUpgradeRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==8002&&!Silverlight.__installationEventFired){Silverlight.onRestartRequired();Silverlight.__installationEventFired=true}else if(a.ErrorCode==5014||a.ErrorCode==2106){if(Silverlight.__verifySilverlight2UpgradeSuccess(a.getHost()))b=true}else b=true}catch(c){}return b};Silverlight.IsVersionAvailableOnLoad=function(b){var a=false;try{if(Silverlight.__verifySilverlight2UpgradeSuccess(b.getHost()))a=true}catch(c){}return a};Silverlight.__verifySilverlight2UpgradeSuccess=function(d){var c=false,b="2.0.31005",a=null;try{if(d.IsVersionSupported(b+".99")){a=Silverlight.onRequiredVersionAvailable;c=true}else if(d.IsVersionSupported(b+".0"))a=Silverlight.onRestartRequired;else a=Silverlight.onUpgradeRequired;if(a&&!Silverlight.__installationEventFired){a();Silverlight.__installationEventFired=true}}catch(e){}return c} \ No newline at end of file
diff --git a/cs/demo/Ice/sl/hello/hello.Web/Web.Debug.config b/cs/demo/Ice/sl/hello/hello.Web/Web.Debug.config
new file mode 100644
index 00000000000..962e6b73a26
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.Web/Web.Debug.config
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+ <!--
+ In the example below, the "SetAttributes" transform will change the value of
+ "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
+ finds an atrribute "name" that has a value of "MyDB".
+
+ <connectionStrings>
+ <add name="MyDB"
+ connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+ </connectionStrings>
+ -->
+ <system.web>
+ <!--
+ In the example below, the "Replace" transform will replace the entire
+ <customErrors> section of your web.config file.
+ Note that because there is only one customErrors section under the
+ <system.web> node, there is no need to use the "xdt:Locator" attribute.
+
+ <customErrors defaultRedirect="GenericError.htm"
+ mode="RemoteOnly" xdt:Transform="Replace">
+ <error statusCode="500" redirect="InternalError.htm"/>
+ </customErrors>
+ -->
+ </system.web>
+</configuration> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/hello/hello.Web/Web.Release.config b/cs/demo/Ice/sl/hello/hello.Web/Web.Release.config
new file mode 100644
index 00000000000..141832ba77e
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.Web/Web.Release.config
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
+
+<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
+ <!--
+ In the example below, the "SetAttributes" transform will change the value of
+ "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
+ finds an atrribute "name" that has a value of "MyDB".
+
+ <connectionStrings>
+ <add name="MyDB"
+ connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
+ </connectionStrings>
+ -->
+ <system.web>
+ <compilation xdt:Transform="RemoveAttributes(debug)" />
+ <!--
+ In the example below, the "Replace" transform will replace the entire
+ <customErrors> section of your web.config file.
+ Note that because there is only one customErrors section under the
+ <system.web> node, there is no need to use the "xdt:Locator" attribute.
+
+ <customErrors defaultRedirect="GenericError.htm"
+ mode="RemoteOnly" xdt:Transform="Replace">
+ <error statusCode="500" redirect="InternalError.htm"/>
+ </customErrors>
+ -->
+ </system.web>
+</configuration> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/hello/hello.Web/Web.config b/cs/demo/Ice/sl/hello/hello.Web/Web.config
new file mode 100644
index 00000000000..0598be112f3
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.Web/Web.config
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+
+<!--
+ For more information on how to configure your ASP.NET application, please visit
+ http://go.microsoft.com/fwlink/?LinkId=169433
+ -->
+
+<configuration>
+ <system.web>
+ <compilation debug="true" targetFramework="4.0" />
+ </system.web>
+
+</configuration>
diff --git a/cs/demo/Ice/sl/hello/hello.Web/hello.Web.csproj b/cs/demo/Ice/sl/hello/hello.Web/hello.Web.csproj
new file mode 100644
index 00000000000..dd34cdc3530
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.Web/hello.Web.csproj
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>
+ </ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{581234FD-B61C-428C-A214-966E7E6DF42F}</ProjectGuid>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>hello.Web</RootNamespace>
+ <AssemblyName>hello.Web</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <UseIISExpress>false</UseIISExpress>
+ <SilverlightApplicationList>{07F11600-BFCA-42DE-BF09-BF964E0A9D94}|..\hello\hello.csproj|ClientBin|False</SilverlightApplicationList>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Web.DynamicData" />
+ <Reference Include="System.Web.Entity" />
+ <Reference Include="System.Web.ApplicationServices" />
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="System.Web.Extensions" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Web.Services" />
+ <Reference Include="System.EnterpriseServices" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="ClientBin\hello.xap" />
+ <Content Include="helloTestPage.aspx" />
+ <Content Include="helloTestPage.html" />
+ <Content Include="Silverlight.js" />
+ <Content Include="Web.config" />
+ <Content Include="Web.Debug.config">
+ <DependentUpon>Web.config</DependentUpon>
+ <SubType>Designer</SubType>
+ </Content>
+ <Content Include="Web.Release.config">
+ <DependentUpon>Web.config</DependentUpon>
+ <SubType>Designer</SubType>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>False</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>49182</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>
+ </IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>False</UseCustomServer>
+ <CustomServerUrl>
+ </CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
diff --git a/cs/demo/Ice/sl/hello/hello.Web/helloTestPage.aspx b/cs/demo/Ice/sl/hello/hello.Web/helloTestPage.aspx
new file mode 100644
index 00000000000..b9ad90212bf
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.Web/helloTestPage.aspx
@@ -0,0 +1,74 @@
+<%@ Page Language="C#" AutoEventWireup="true" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head runat="server">
+ <title>hello</title>
+ <style type="text/css">
+ html, body {
+ height: 100%;
+ overflow: auto;
+ }
+ body {
+ padding: 0;
+ margin: 0;
+ }
+ #silverlightControlHost {
+ height: 100%;
+ text-align:center;
+ }
+ </style>
+ <script type="text/javascript" src="Silverlight.js"></script>
+ <script type="text/javascript">
+ function onSilverlightError(sender, args) {
+ var appSource = "";
+ if (sender != null && sender != 0) {
+ appSource = sender.getHost().Source;
+ }
+
+ var errorType = args.ErrorType;
+ var iErrorCode = args.ErrorCode;
+
+ if (errorType == "ImageError" || errorType == "MediaError") {
+ return;
+ }
+
+ var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
+
+ errMsg += "Code: "+ iErrorCode + " \n";
+ errMsg += "Category: " + errorType + " \n";
+ errMsg += "Message: " + args.ErrorMessage + " \n";
+
+ if (errorType == "ParserError") {
+ errMsg += "File: " + args.xamlFile + " \n";
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ else if (errorType == "RuntimeError") {
+ if (args.lineNumber != 0) {
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ errMsg += "MethodName: " + args.methodName + " \n";
+ }
+
+ throw new Error(errMsg);
+ }
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server" style="height:100%">
+ <div id="silverlightControlHost">
+ <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
+ <param name="source" value="ClientBin/hello.xap"/>
+ <param name="onError" value="onSilverlightError" />
+ <param name="background" value="white" />
+ <param name="minRuntimeVersion" value="5.0.61118.0" />
+ <param name="autoUpgrade" value="true" />
+ <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
+ <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
+ </a>
+ </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
+ </form>
+</body>
+</html>
diff --git a/cs/demo/Ice/sl/hello/hello.Web/helloTestPage.html b/cs/demo/Ice/sl/hello/hello.Web/helloTestPage.html
new file mode 100644
index 00000000000..2db07c21842
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.Web/helloTestPage.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+
+<head>
+ <title>hello</title>
+ <style type="text/css">
+ html, body {
+ height: 100%;
+ overflow: auto;
+ }
+ body {
+ padding: 0;
+ margin: 0;
+ }
+ #silverlightControlHost {
+ height: 100%;
+ text-align:center;
+ }
+ </style>
+ <script type="text/javascript" src="Silverlight.js"></script>
+ <script type="text/javascript">
+ function onSilverlightError(sender, args) {
+ var appSource = "";
+ if (sender != null && sender != 0) {
+ appSource = sender.getHost().Source;
+ }
+
+ var errorType = args.ErrorType;
+ var iErrorCode = args.ErrorCode;
+
+ if (errorType == "ImageError" || errorType == "MediaError") {
+ return;
+ }
+
+ var errMsg = "Unhandled Error in Silverlight Application " + appSource + "\n" ;
+
+ errMsg += "Code: "+ iErrorCode + " \n";
+ errMsg += "Category: " + errorType + " \n";
+ errMsg += "Message: " + args.ErrorMessage + " \n";
+
+ if (errorType == "ParserError") {
+ errMsg += "File: " + args.xamlFile + " \n";
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ else if (errorType == "RuntimeError") {
+ if (args.lineNumber != 0) {
+ errMsg += "Line: " + args.lineNumber + " \n";
+ errMsg += "Position: " + args.charPosition + " \n";
+ }
+ errMsg += "MethodName: " + args.methodName + " \n";
+ }
+
+ throw new Error(errMsg);
+ }
+ </script>
+</head>
+<body>
+ <form id="form1" runat="server" style="height:100%">
+ <div id="silverlightControlHost">
+ <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
+ <param name="source" value="ClientBin/hello.xap"/>
+ <param name="onError" value="onSilverlightError" />
+ <param name="background" value="white" />
+ <param name="minRuntimeVersion" value="5.0.61118.0" />
+ <param name="autoUpgrade" value="true" />
+ <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=5.0.61118.0" style="text-decoration:none">
+ <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
+ </a>
+ </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
+ </form>
+</body>
+</html>
diff --git a/cs/demo/Ice/sl/hello/hello.sln b/cs/demo/Ice/sl/hello/hello.sln
new file mode 100644
index 00000000000..ee530ec7634
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello.sln
@@ -0,0 +1,26 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hello", "hello\hello.csproj", "{07F11600-BFCA-42DE-BF09-BF964E0A9D94}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hello.Web", "hello.Web\hello.Web.csproj", "{581234FD-B61C-428C-A214-966E7E6DF42F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {581234FD-B61C-428C-A214-966E7E6DF42F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {581234FD-B61C-428C-A214-966E7E6DF42F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {581234FD-B61C-428C-A214-966E7E6DF42F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {581234FD-B61C-428C-A214-966E7E6DF42F}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/cs/demo/Ice/sl/hello/hello/.gitignore b/cs/demo/Ice/sl/hello/hello/.gitignore
new file mode 100644
index 00000000000..e2ed1384003
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/.gitignore
@@ -0,0 +1,3 @@
+# Dummy file, so that git retains this otherwise empty directory.
+Hello.cs
+Bin/*
diff --git a/cs/demo/Ice/sl/hello/hello/App.xaml b/cs/demo/Ice/sl/hello/hello/App.xaml
new file mode 100644
index 00000000000..2c699124f61
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="hello.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/demo/Ice/sl/hello/hello/App.xaml.cs b/cs/demo/Ice/sl/hello/hello/App.xaml.cs
new file mode 100644
index 00000000000..36272c0870e
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/App.xaml.cs
@@ -0,0 +1,76 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace hello
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ this.RootVisual = new MainPage();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch(Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/demo/Ice/sl/hello/hello/Hello.ice b/cs/demo/Ice/sl/hello/hello/Hello.ice
new file mode 100644
index 00000000000..cdb2f95276d
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/Hello.ice
@@ -0,0 +1,21 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#pragma once
+
+module Demo
+{
+
+interface Hello
+{
+ idempotent void sayHello(int delay);
+ void shutdown();
+};
+
+};
diff --git a/cs/demo/Ice/sl/hello/hello/MainPage.xaml b/cs/demo/Ice/sl/hello/hello/MainPage.xaml
new file mode 100644
index 00000000000..ac3fddcf692
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/MainPage.xaml
@@ -0,0 +1,56 @@
+<UserControl x:Class="hello.MainPage"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
+
+ <StackPanel Margin="10, 10, 10, 10" HorizontalAlignment="Center">
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
+ Margin="5, 5, 5, 5">
+ <TextBlock Text="Host:" Height="25" Width="80" VerticalAlignment="Center"/>
+ <TextBox x:Name="txtHost" HorizontalAlignment="Left"
+ Text="localhost"
+ TextWrapping="NoWrap"
+ VerticalAlignment="Top" Height="25" Width="320"/>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
+ Margin="5, 5, 5, 5">
+ <TextBlock Text="Mode:" Height="25" Width="80" VerticalAlignment="Center"/>
+ <ComboBox x:Name="cmbModes" Height="25" Width="320" ItemsSource="{Binding}"/>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
+ Margin="5, 5, 5, 5">
+ <TextBlock Text="Timeout:" Height="25" Width="80" VerticalAlignment="Center"/>
+ <Slider Height="25" Width="235" IsHitTestVisible="True" Minimum="0" Maximum="2"
+ SmallChange="0.1" LargeChange="0.1" ValueChanged="timeoutValueChanged"/>
+ <TextBox x:Name="txtTimeout" HorizontalAlignment="Right"
+ Text="0 ms"
+ TextWrapping="NoWrap"
+ VerticalAlignment="Top" Height="25" Width="80"
+ Margin="5, 0, 0, 0" IsReadOnly="True"/>
+ </StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
+ Margin="5, 5, 5, 5">
+ <TextBlock Text="Delay:" Height="25" Width="80" VerticalAlignment="Center"/>
+ <Slider Height="25" Width="235" IsHitTestVisible="True" Minimum="0" Maximum="2"
+ SmallChange="0.1" LargeChange="0.1" ValueChanged="delayValueChanged"/>
+ <TextBox x:Name="txtDelay" HorizontalAlignment="Right"
+ Text="0 ms"
+ TextWrapping="NoWrap"
+ VerticalAlignment="Top" Height="25" Width="80"
+ Margin="5, 0, 0, 0" IsReadOnly="True"/>
+ </StackPanel>
+ <Grid Margin="5, 5, 5, 5">
+ <TextBox x:Name="txtOutput"
+ FontSize="12" Text="" TextWrapping="Wrap" IsEnabled="True" Height="120"
+ Width="400" ScrollViewer.HorizontalScrollBarVisibility="Auto"
+ ScrollViewer.VerticalScrollBarVisibility="Auto" IsReadOnly="True"/>
+ </Grid>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center"
+ Margin="5, 5, 5, 5">
+ <Button Name="btnSayHello" Content="Say Hello" Click="btnSayHelloClick" />
+ <Button Name="btnFlush" Content="Flush" Margin="5, 0, 0, 0" IsEnabled="False" Click="btnFlushClick" />
+ <Button Name="btnShutdown" Content="Shutdown" Margin="5, 0, 0, 0" Click="btnShutdownClick" />
+ </StackPanel>
+ </StackPanel>
+</UserControl>
diff --git a/cs/demo/Ice/sl/hello/hello/MainPage.xaml.cs b/cs/demo/Ice/sl/hello/hello/MainPage.xaml.cs
new file mode 100644
index 00000000000..29f67fcf651
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/MainPage.xaml.cs
@@ -0,0 +1,180 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using System.Collections.ObjectModel;
+using Demo;
+
+namespace hello
+{
+ public partial class MainPage : UserControl
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ ObservableCollection<string> modes = new ObservableCollection<string>();
+ modes.Add("Twoway");
+ modes.Add("Oneway");
+ modes.Add("Batch Oneway");
+ cmbModes.DataContext = modes;
+ cmbModes.SelectedIndex = 0;
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.dispatcher = delegate(System.Action action, Ice.Connection connection)
+ {
+ Dispatcher.BeginInvoke(action);
+ };
+ _communicator = Ice.Util.initialize(initData);
+ }
+
+ private void timeoutValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+ {
+ _timeout = (int)Math.Round(e.NewValue * 1000, 0);
+ txtTimeout.Text = _timeout.ToString() + " ms";
+ }
+
+ private void delayValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
+ {
+ _delay = (int)Math.Round(e.NewValue * 1000, 0);
+ txtDelay.Text = _delay.ToString() + " ms";
+ }
+
+ private void btnSayHelloClick(object sender, RoutedEventArgs e)
+ {
+ int mode = cmbModes.SelectedIndex;
+ string host = txtHost.Text;
+ txtOutput.Text = "";
+ try
+ {
+ Ice.ObjectPrx proxy = _communicator.stringToProxy("hello:tcp -h " + host + " -p 4502");
+ switch (mode)
+ {
+ case 0:
+ {
+ proxy = proxy.ice_twoway();
+ break;
+ }
+ case 1:
+ {
+ proxy = proxy.ice_oneway();
+ break;
+ }
+ case 2:
+ {
+ proxy = proxy.ice_batchOneway();
+ btnFlush.IsEnabled = true;
+ break;
+ }
+ default:
+ {
+ throw new ArgumentException("Invalid Mode index " + mode.ToString());
+ }
+ }
+
+ if (_timeout == 0)
+ {
+ proxy = proxy.ice_timeout(-1);
+ }
+ else
+ {
+ proxy = proxy.ice_timeout(_timeout);
+ }
+ HelloPrx hello = HelloPrxHelper.uncheckedCast(proxy);
+ if(mode != 2)
+ {
+ bool response = false;
+ Ice.AsyncResult result = hello.begin_sayHello(_delay).whenCompleted(
+ () =>
+ {
+ response = true;
+ txtOutput.Text = "Ready";
+ },
+ (Ice.Exception ex) =>
+ {
+ response = true;
+ txtOutput.Text = ex.ToString();
+ }).whenSent(
+ (bool sentSynchronously) =>
+ {
+ if(response)
+ {
+ return; // Response was received already.
+ }
+
+ if(mode == 0)
+ {
+ txtOutput.Text = "Wait for response";
+ }
+ else
+ {
+ txtOutput.Text = "Ready";
+ }
+ });
+ if(!result.sentSynchronously())
+ {
+ txtOutput.Text = "Sending request";
+ }
+ }
+ else
+ {
+ txtOutput.Text = "Queued hello request";
+ }
+ }
+ catch(System.Exception ex)
+ {
+ txtOutput.Text = ex.ToString();
+ }
+ }
+
+ private void btnFlushClick(object sender, RoutedEventArgs e)
+ {
+ _communicator.begin_flushBatchRequests().whenCompleted(
+ (Ice.Exception ex) =>
+ {
+ txtOutput.Text = ex.ToString();
+ }).whenSent(
+ (bool sentSynchronously) =>
+ {
+ btnFlush.IsEnabled = false;
+ txtOutput.Text = "Flushed batch requests";
+ });
+ }
+
+ private void btnShutdownClick(object sender, RoutedEventArgs e)
+ {
+ string host = txtHost.Text;
+ txtOutput.Text = "Shutting down...";
+
+ Ice.ObjectPrx proxy = _communicator.stringToProxy("hello:tcp -h " + host + " -p 4502");
+ HelloPrx hello = HelloPrxHelper.uncheckedCast(proxy);
+ hello.begin_shutdown().whenCompleted(
+ () =>
+ {
+ txtOutput.Text = "Ready";
+ },
+ (Ice.Exception ex) =>
+ {
+ txtOutput.Text = ex.ToString();
+ });
+ }
+
+ private int _timeout = 0;
+ private int _delay = 0;
+ private Ice.Communicator _communicator;
+ }
+}
diff --git a/cs/demo/Ice/sl/hello/hello/Properties/AppManifest.xml b/cs/demo/Ice/sl/hello/hello/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/demo/Ice/sl/hello/hello/Properties/AssemblyInfo.cs b/cs/demo/Ice/sl/hello/hello/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..4f27c89ccd1
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("hello")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("hello")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("cad5cad2-4177-4d15-8f0d-c6179c8850da")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/demo/Ice/sl/hello/hello/hello.csproj b/cs/demo/Ice/sl/hello/hello/hello.csproj
new file mode 100644
index 00000000000..33433eb67ab
--- /dev/null
+++ b/cs/demo/Ice/sl/hello/hello/hello.csproj
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{07F11600-BFCA-42DE-BF09-BF964E0A9D94}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>hello</RootNamespace>
+ <AssemblyName>hello</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>hello.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>hello.App</SilverlightAppEntry>
+ <TestPageFileName>helloTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>false</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>Bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>Bin\Release\</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Hello.cs">
+ <SubType>Code</SubType>
+ </Compile>
+ <Compile Include="MainPage.xaml.cs">
+ <DependentUpon>MainPage.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ <Page Include="MainPage.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Hello.ice" />
+ <None Include="Properties\AppManifest.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/demo/democf.sln b/cs/demo/democf.sln
index d3aaa085709..bcedf864226 100755
--- a/cs/demo/democf.sln
+++ b/cs/demo/democf.sln
@@ -1,7 +1,13 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Ice.compact.client", "Ice\compact\Ice.compact.client.csproj", "{95E6B539-E515-4BD4-BDB0-35D7C49C897D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "client", "Ice\compact\hello\client.csproj", "{95E6B539-E515-4BD4-BDB0-35D7C49C897D}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hello", "hello", "{853FE674-7861-4714-A941-FF365EF4DF2A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bidir", "bidir", "{2E7BE181-7EE0-4A89-92F8-724F9FDC3DDD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "server", "Ice\compact\bidir\server.csproj", "{05B11482-32A1-4212-A7F8-2A135FADD164}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -15,8 +21,18 @@ Global
{95E6B539-E515-4BD4-BDB0-35D7C49C897D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{95E6B539-E515-4BD4-BDB0-35D7C49C897D}.Release|Any CPU.Build.0 = Release|Any CPU
{95E6B539-E515-4BD4-BDB0-35D7C49C897D}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {05B11482-32A1-4212-A7F8-2A135FADD164}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {05B11482-32A1-4212-A7F8-2A135FADD164}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {05B11482-32A1-4212-A7F8-2A135FADD164}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {05B11482-32A1-4212-A7F8-2A135FADD164}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {05B11482-32A1-4212-A7F8-2A135FADD164}.Release|Any CPU.Build.0 = Release|Any CPU
+ {05B11482-32A1-4212-A7F8-2A135FADD164}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {95E6B539-E515-4BD4-BDB0-35D7C49C897D} = {853FE674-7861-4714-A941-FF365EF4DF2A}
+ {05B11482-32A1-4212-A7F8-2A135FADD164} = {2E7BE181-7EE0-4A89-92F8-724F9FDC3DDD}
+ EndGlobalSection
EndGlobal
diff --git a/cs/demo/demosl.sln b/cs/demo/demosl.sln
new file mode 100644
index 00000000000..bd20033ba0e
--- /dev/null
+++ b/cs/demo/demosl.sln
@@ -0,0 +1,73 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hello", "Ice\sl\hello\hello\hello.csproj", "{07F11600-BFCA-42DE-BF09-BF964E0A9D94}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hello.Web", "Ice\sl\hello\hello.Web\hello.Web.csproj", "{581234FD-B61C-428C-A214-966E7E6DF42F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "hello", "hello", "{BFB198BC-429D-420F-94B5-360172E91053}"
+ ProjectSection(SolutionItems) = preProject
+ Ice\sl\hello\README.txt = Ice\sl\hello\README.txt
+ EndProjectSection
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "bidir", "bidir", "{92D95920-7E25-4A77-AD00-651D7DA94DFE}"
+ ProjectSection(SolutionItems) = preProject
+ Ice\sl\bidir\README.txt = Ice\sl\bidir\README.txt
+ EndProjectSection
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bidir", "Ice\sl\bidir\bidir\bidir.csproj", "{73FE67BB-A2C1-464A-8F84-7B1282288CBA}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "bidir.Web", "Ice\sl\bidir\bidir.Web\bidir.Web.csproj", "{0F089AE9-9F65-4C33-9F1F-183C6AC6E043}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chat", "Glacier2\sl\chat\chat.csproj", "{78FA0B57-6672-4173-8CA3-C81FA402F4E1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "chat.Web", "Glacier2\sl\chat.Web\chat.Web.csproj", "{C0234952-390B-4C8F-8288-C7B0BADAD80E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "chat", "chat", "{18878230-8C72-4CDC-B458-9140050F0BBF}"
+ ProjectSection(SolutionItems) = preProject
+ Glacier2\sl\README.txt = Glacier2\sl\README.txt
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94}.Release|Any CPU.Build.0 = Release|Any CPU
+ {581234FD-B61C-428C-A214-966E7E6DF42F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {581234FD-B61C-428C-A214-966E7E6DF42F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {581234FD-B61C-428C-A214-966E7E6DF42F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {581234FD-B61C-428C-A214-966E7E6DF42F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {73FE67BB-A2C1-464A-8F84-7B1282288CBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {73FE67BB-A2C1-464A-8F84-7B1282288CBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {73FE67BB-A2C1-464A-8F84-7B1282288CBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {73FE67BB-A2C1-464A-8F84-7B1282288CBA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0F089AE9-9F65-4C33-9F1F-183C6AC6E043}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0F089AE9-9F65-4C33-9F1F-183C6AC6E043}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0F089AE9-9F65-4C33-9F1F-183C6AC6E043}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0F089AE9-9F65-4C33-9F1F-183C6AC6E043}.Release|Any CPU.Build.0 = Release|Any CPU
+ {78FA0B57-6672-4173-8CA3-C81FA402F4E1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {78FA0B57-6672-4173-8CA3-C81FA402F4E1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {78FA0B57-6672-4173-8CA3-C81FA402F4E1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {78FA0B57-6672-4173-8CA3-C81FA402F4E1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C0234952-390B-4C8F-8288-C7B0BADAD80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C0234952-390B-4C8F-8288-C7B0BADAD80E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C0234952-390B-4C8F-8288-C7B0BADAD80E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C0234952-390B-4C8F-8288-C7B0BADAD80E}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {581234FD-B61C-428C-A214-966E7E6DF42F} = {BFB198BC-429D-420F-94B5-360172E91053}
+ {07F11600-BFCA-42DE-BF09-BF964E0A9D94} = {BFB198BC-429D-420F-94B5-360172E91053}
+ {73FE67BB-A2C1-464A-8F84-7B1282288CBA} = {92D95920-7E25-4A77-AD00-651D7DA94DFE}
+ {0F089AE9-9F65-4C33-9F1F-183C6AC6E043} = {92D95920-7E25-4A77-AD00-651D7DA94DFE}
+ {C0234952-390B-4C8F-8288-C7B0BADAD80E} = {18878230-8C72-4CDC-B458-9140050F0BBF}
+ {78FA0B57-6672-4173-8CA3-C81FA402F4E1} = {18878230-8C72-4CDC-B458-9140050F0BBF}
+ EndGlobalSection
+EndGlobal
diff --git a/cs/src/Glacier2/Application.cs b/cs/src/Glacier2/Application.cs
index 7f85daace27..54fd27c658d 100644
--- a/cs/src/Glacier2/Application.cs
+++ b/cs/src/Glacier2/Application.cs
@@ -12,6 +12,8 @@ using System.Diagnostics;
using System.Collections.Generic;
using System.Threading;
+#if !SILVERLIGHT
+
namespace Glacier2
{
@@ -572,3 +574,4 @@ public abstract class Application : Ice.Application
}
}
+#endif
diff --git a/cs/src/Glacier2/SessionHelper.cs b/cs/src/Glacier2/SessionHelper.cs
index 7d2a98bca02..0df336aab71 100644
--- a/cs/src/Glacier2/SessionHelper.cs
+++ b/cs/src/Glacier2/SessionHelper.cs
@@ -75,7 +75,7 @@ public class SessionHelper
if(!_done)
{
-#if COMPACT
+#if COMPACT || SILVERLIGHT
_m.TimedWait(_period);
#else
try
@@ -445,7 +445,7 @@ public class SessionHelper
sessionRefresh.done();
while(true)
{
-#if COMPACT
+#if COMPACT || SILVERLIGHT
_refreshThread.Join();
break;
#else
@@ -563,7 +563,7 @@ public class SessionHelper
{
if(_initData.dispatcher != null)
{
- EventWaitHandle h = new EventWaitHandle(false, EventResetMode.ManualReset);
+ EventWaitHandle h = new ManualResetEvent(false);
_initData.dispatcher(delegate()
{
callback();
diff --git a/cs/src/Ice/Application.cs b/cs/src/Ice/Application.cs
index 89002e5b0d5..8a4e4248ef0 100644
--- a/cs/src/Ice/Application.cs
+++ b/cs/src/Ice/Application.cs
@@ -7,6 +7,8 @@
//
// **********************************************************************
+#if !SILVERLIGHT
+
namespace Ice
{
using System;
@@ -1008,3 +1010,4 @@ namespace Ice
delegate bool CtrlCEventHandler(int sig);
}
+#endif
diff --git a/cs/src/Ice/Arrays.cs b/cs/src/Ice/Arrays.cs
index ff25aa479a6..f737531878e 100644
--- a/cs/src/Ice/Arrays.cs
+++ b/cs/src/Ice/Arrays.cs
@@ -111,63 +111,5 @@ namespace IceUtilInternal
return h;
}
-
- public static void Sort(ref ArrayList array, IComparer comparator)
- {
- //
- // This Sort method implements the merge sort algorithm
- // which is a stable sort (unlike the Sort method of the
- // System.Collections.ArrayList which is unstable).
- //
- Sort1(ref array, 0, array.Count, comparator);
- }
-
- private static void Sort1(ref ArrayList array, int begin, int end, IComparer comparator)
- {
- int mid;
- if(end - begin <= 1)
- {
- return;
- }
-
- mid = (begin + end) / 2;
- Sort1(ref array, begin, mid, comparator);
- Sort1(ref array, mid, end, comparator);
- Merge(ref array, begin, mid, end, comparator);
- }
-
- private static void Merge(ref ArrayList array, int begin, int mid, int end, IComparer comparator)
- {
- int i = begin;
- int j = mid;
- int k = 0;
-
- object[] tmp = new object[end - begin];
- while(i < mid && j < end)
- {
- if(comparator.Compare(array[i], array[j]) <= 0)
- {
- tmp[k++] = array[i++];
- }
- else
- {
- tmp[k++] = array[j++];
- }
- }
-
- while(i < mid)
- {
- tmp[k++] = array[i++];
- }
- while(j < end)
- {
- tmp[k++] = array[j++];
- }
- for(i = 0; i < (end - begin); ++i)
- {
- array[begin + i] = tmp[i];
- }
- }
}
-
}
diff --git a/cs/src/Ice/AssemblyUtil.cs b/cs/src/Ice/AssemblyUtil.cs
index f6e3fd39be6..e0ba2b094ac 100644
--- a/cs/src/Ice/AssemblyUtil.cs
+++ b/cs/src/Ice/AssemblyUtil.cs
@@ -56,8 +56,7 @@ namespace IceInternal
xp_ = v.Major == 5 && v.Minor == 1; // Are we running on XP?
osx_ = false;
-
-#if COMPACT
+#if COMPACT || SILVERLIGHT
//
// Populate the _iceAssemblies list with the fully-qualified names
// of the standard Ice assemblies. The fully-qualified name looks
@@ -82,7 +81,7 @@ namespace IceInternal
_iceAssemblies.Add("IceStorm," + suffix);
}
#else
- if(platform_ == Platform.NonWindows)
+ if (platform_ == Platform.NonWindows)
{
try
{
@@ -113,18 +112,18 @@ namespace IceInternal
public static Type findType(Instance instance, string csharpId)
{
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
loadAssemblies(); // Lazy initialization
#endif
lock(_mutex)
{
- Type t = (Type)_typeTable[csharpId];
- if(t != null)
+ Type t;
+ if (_typeTable.TryGetValue(csharpId, out t))
{
return t;
}
-#if COMPACT
+#if COMPACT || SILVERLIGHT
string[] assemblies = instance.factoryAssemblies();
for(int i = 0; i < assemblies.Length; ++i)
{
@@ -151,7 +150,7 @@ namespace IceInternal
}
}
#else
- foreach(Assembly a in _loadedAssemblies.Values)
+ foreach (Assembly a in _loadedAssemblies.Values)
{
if((t = a.GetType(csharpId)) != null)
{
@@ -164,10 +163,10 @@ namespace IceInternal
return null;
}
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
public static Type[] findTypesWithPrefix(string prefix)
{
- IceUtilInternal.LinkedList l = new IceUtilInternal.LinkedList();
+ LinkedList<Type> l = new LinkedList<Type>();
loadAssemblies(); // Lazy initialization
@@ -180,7 +179,7 @@ namespace IceInternal
{
if(t.AssemblyQualifiedName.IndexOf(prefix, StringComparison.Ordinal) == 0)
{
- l.Add(t);
+ l.AddLast(t);
}
}
}
@@ -207,7 +206,7 @@ namespace IceInternal
}
}
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
//
// Make sure that all assemblies that are referenced by this process
// are actually loaded. This is necessary so we can use reflection
@@ -242,7 +241,7 @@ namespace IceInternal
AssemblyName[] names = a.GetReferencedAssemblies();
foreach(AssemblyName name in names)
{
- if(!_loadedAssemblies.Contains(name.FullName))
+ if(!_loadedAssemblies.ContainsKey(name.FullName))
{
try
{
@@ -263,8 +262,8 @@ namespace IceInternal
#else
private static List<string> _iceAssemblies = new List<string>();
#endif
- private static Hashtable _typeTable = new Hashtable(); // <type name, Type> pairs.
- private static Mutex _mutex = new Mutex();
+ private static Dictionary<string, Type> _typeTable = new Dictionary<string, Type>(); // <type name, Type> pairs.
+ private static Object _mutex = new Object();
public readonly static Runtime runtime_; // Either DotNET or Mono
//
diff --git a/cs/src/Ice/AsyncIOThread.cs b/cs/src/Ice/AsyncIOThread.cs
index 56def39ff3d..fe003a90ef9 100644
--- a/cs/src/Ice/AsyncIOThread.cs
+++ b/cs/src/Ice/AsyncIOThread.cs
@@ -22,6 +22,7 @@ namespace IceInternal
_instance = instance;
_thread = new HelperThread(this);
+#if !SILVERLIGHT
if(instance.initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
{
ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
@@ -32,7 +33,9 @@ namespace IceInternal
{
_thread.Start(ThreadPriority.Normal);
}
-
+#else
+ _thread.Start();
+#endif
}
public void queue(ThreadPoolWorkItem callback)
@@ -143,12 +146,18 @@ namespace IceInternal
_thread.Join();
}
+#if !SILVERLIGHT
public void Start(ThreadPriority priority)
+#else
+ public void Start()
+#endif
{
_thread = new Thread(new ThreadStart(Run));
_thread.IsBackground = true;
_thread.Name = _name;
+#if !SILVERLIGHT
_thread.Priority = priority;
+#endif
_thread.Start();
}
diff --git a/cs/src/Ice/BasicStream.cs b/cs/src/Ice/BasicStream.cs
index 78c7ba2aecb..802ae64c8f2 100644
--- a/cs/src/Ice/BasicStream.cs
+++ b/cs/src/Ice/BasicStream.cs
@@ -15,14 +15,14 @@ namespace IceInternal
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
#endif
using System.Threading;
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
internal static class NativeMethods
{
[DllImport("bzip2.dll")]
@@ -52,7 +52,7 @@ namespace IceInternal
static BasicStream()
{
-#if MANAGED || COMPACT
+#if MANAGED || COMPACT || SILVERLIGHT
//
// Protocol compression is not supported when using managed code.
//
@@ -234,7 +234,7 @@ namespace IceInternal
other._minSeqSize = _minSeqSize;
_minSeqSize = tmpMinSeqSize;
- ArrayList tmpObjectList = other._objectList;
+ List<Ice.Object> tmpObjectList = other._objectList;
other._objectList = _objectList;
_objectList = tmpObjectList;
@@ -597,15 +597,15 @@ namespace IceInternal
throw new Ice.MarshalException("type ids require an encapsulation");
}
- object o = _writeEncapsStack.typeIdMap[id];
- if(o != null)
+ int index;
+ if(_writeEncapsStack.typeIdMap.TryGetValue(id, out index))
{
writeBool(true);
- writeSize((int)o);
+ writeSize(index);
}
else
{
- int index = ++_writeEncapsStack.typeIdIndex;
+ index = ++_writeEncapsStack.typeIdIndex;
_writeEncapsStack.typeIdMap[id] = index;
writeBool(false);
writeString(id);
@@ -625,8 +625,7 @@ namespace IceInternal
if(isIndex)
{
index = readSize();
- id = (string)_readEncapsStack.typeIdMap[index];
- if(id == null)
+ if(!_readEncapsStack.typeIdMap.TryGetValue(index, out id))
{
throw new Ice.UnmarshalOutOfBoundsException("Missing type ID");
}
@@ -769,7 +768,7 @@ namespace IceInternal
public void writeSerializable(object o)
{
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
if(o == null)
{
writeSize(0);
@@ -874,7 +873,7 @@ namespace IceInternal
public object readSerializable()
{
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
int sz = readAndCheckSeqSize(1);
if(sz == 0)
{
@@ -2049,35 +2048,33 @@ namespace IceInternal
if(_writeEncapsStack.toBeMarshaledMap == null) // Lazy initialization
{
- _writeEncapsStack.toBeMarshaledMap = new Hashtable();
- _writeEncapsStack.marshaledMap = new Hashtable();
- _writeEncapsStack.typeIdMap = new Hashtable();
+ _writeEncapsStack.toBeMarshaledMap = new Dictionary<Ice.Object, int>();
+ _writeEncapsStack.marshaledMap = new Dictionary<Ice.Object, int>();
+ _writeEncapsStack.typeIdMap = new Dictionary<string, int>();
}
if(v != null)
{
//
- // Look for this instance in the to-be-marshaled map.
- //
- object p = _writeEncapsStack.toBeMarshaledMap[v];
- if(p == null)
- {
- //
- // Didn't find it, try the marshaled map next.
- //
- object q = _writeEncapsStack.marshaledMap[v];
- if(q == null)
+ // Look for this instance in the to-be-marshaled map.
+ //
+ int p;
+ if(!_writeEncapsStack.toBeMarshaledMap.TryGetValue(v, out p))
+ {
+ //
+ // Didn't find it, try the marshaled map next.
+ //
+ if(!_writeEncapsStack.marshaledMap.TryGetValue(v, out p))
{
- //
- // We haven't seen this instance previously,
- // create a new index, and insert it into the
- // to-be-marshaled map.
- //
- q = ++_writeEncapsStack.writeIndex;
- _writeEncapsStack.toBeMarshaledMap[v] = q;
- }
- p = q;
- }
- writeInt(-((int)p));
+ //
+ // We haven't seen this instance previously,
+ // create a new index, and insert it into the
+ // to-be-marshaled map.
+ //
+ p = ++_writeEncapsStack.writeIndex;
+ _writeEncapsStack.toBeMarshaledMap[v] = p;
+ }
+ }
+ writeInt(-p);
}
else
{
@@ -2104,9 +2101,9 @@ namespace IceInternal
if(_readEncapsStack.patchMap == null) // Lazy initialization
{
- _readEncapsStack.patchMap = new Hashtable();
- _readEncapsStack.unmarshaledMap = new Hashtable();
- _readEncapsStack.typeIdMap = new Hashtable();
+ _readEncapsStack.patchMap = new Dictionary<int, List<IceInternal.IPatcher> >();
+ _readEncapsStack.unmarshaledMap = new Dictionary<int, Ice.Object>();
+ _readEncapsStack.typeIdMap = new Dictionary<int, string>();
}
int index = readInt();
@@ -2122,15 +2119,15 @@ namespace IceInternal
if(index < 0)
{
int i = -index;
- IceUtilInternal.LinkedList patchlist = (IceUtilInternal.LinkedList)_readEncapsStack.patchMap[i];
- if(patchlist == null)
+ List<IceInternal.IPatcher> patchlist;
+ if(!_readEncapsStack.patchMap.TryGetValue(i, out patchlist))
{
//
// We have no outstanding instances to be patched
// for this index, so make a new entry in the
// patch map.
//
- patchlist = new IceUtilInternal.LinkedList();
+ patchlist = new List<IceInternal.IPatcher>();
_readEncapsStack.patchMap[i] = patchlist;
}
//
@@ -2241,7 +2238,7 @@ namespace IceInternal
//
if(_objectList == null)
{
- _objectList = new ArrayList();
+ _objectList = new List<Ice.Object>();
}
_objectList.Add(v);
@@ -2346,9 +2343,10 @@ namespace IceInternal
{
while(_writeEncapsStack.toBeMarshaledMap.Count > 0)
{
- Hashtable savedMap = new Hashtable(_writeEncapsStack.toBeMarshaledMap);
+ Dictionary<Ice.Object, int> savedMap =
+ new Dictionary<Ice.Object, int>(_writeEncapsStack.toBeMarshaledMap);
writeSize(savedMap.Count);
- foreach(DictionaryEntry e in savedMap)
+ foreach(KeyValuePair<Ice.Object, int> e in savedMap)
{
//
// Add an instance from the old
@@ -2367,7 +2365,7 @@ namespace IceInternal
// pass, substract what we have marshaled from the
// toBeMarshaledMap.
//
- foreach(DictionaryEntry e in savedMap)
+ foreach(KeyValuePair<Ice.Object, int> e in savedMap)
{
_writeEncapsStack.toBeMarshaledMap.Remove(e.Key);
}
@@ -2452,10 +2450,10 @@ namespace IceInternal
// must be null.) Patch any pointers in the patch map with
// the new address.
//
- Debug.Assert( ((object)instanceIndex != null && (object)patchIndex == null)
- || ((object)instanceIndex == null && (object)patchIndex != null));
-
- IceUtilInternal.LinkedList patchlist;
+ Debug.Assert(((object)instanceIndex != null && (object)patchIndex == null) ||
+ ((object)instanceIndex == null && (object)patchIndex != null));
+
+ List<IceInternal.IPatcher> patchlist;
Ice.Object v;
if((object)instanceIndex != null)
{
@@ -2463,12 +2461,11 @@ namespace IceInternal
// We have just unmarshaled an instance -- check if
// something needs patching for that instance.
//
- patchlist = (IceUtilInternal.LinkedList)_readEncapsStack.patchMap[instanceIndex];
- if(patchlist == null)
+ if(!_readEncapsStack.patchMap.TryGetValue((int)instanceIndex, out patchlist))
{
return; // We don't have anything to patch for the instance just unmarshaled.
}
- v = (Ice.Object)_readEncapsStack.unmarshaledMap[instanceIndex];
+ v = _readEncapsStack.unmarshaledMap[(int)instanceIndex];
patchIndex = instanceIndex;
}
else
@@ -2477,12 +2474,11 @@ namespace IceInternal
// We have just unmarshaled an index -- check if we
// have unmarshaled the instance for that index yet.
//
- v = (Ice.Object)_readEncapsStack.unmarshaledMap[patchIndex];
- if(v == null)
+ if(!_readEncapsStack.unmarshaledMap.TryGetValue((int)patchIndex, out v))
{
return; // We haven't unmarshaled the instance for this index yet.
}
- patchlist = (IceUtilInternal.LinkedList)_readEncapsStack.patchMap[patchIndex];
+ patchlist = _readEncapsStack.patchMap[(int)patchIndex];
}
Debug.Assert(patchlist != null && patchlist.Count > 0);
Debug.Assert(v != null);
@@ -2516,10 +2512,10 @@ namespace IceInternal
// nothing left to patch for that index for the time
// being.
//
- _readEncapsStack.patchMap.Remove(patchIndex);
+ _readEncapsStack.patchMap.Remove((int)patchIndex);
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
static string getBZ2Error(int error)
{
string rc;
@@ -2588,7 +2584,7 @@ namespace IceInternal
public bool compress(ref BasicStream cstream, int headerSize, int compressionLevel)
{
-#if MANAGED || COMPACT
+#if MANAGED || COMPACT || SILVERLIGHT
cstream = this;
return false;
#else
@@ -2656,7 +2652,7 @@ namespace IceInternal
public BasicStream uncompress(int headerSize)
{
-#if MANAGED || COMPACT
+#if MANAGED || COMPACT || SILVERLIGHT
return this;
#else
if(!_bzlibInstalled)
@@ -2837,8 +2833,7 @@ namespace IceInternal
lock(_exceptionFactories)
{
- factory = (UserExceptionFactory)_exceptionFactories[id];
- if(factory == null)
+ if(!_exceptionFactories.TryGetValue(id, out factory))
{
try
{
@@ -2885,10 +2880,10 @@ namespace IceInternal
// internal byte encodingMajor; // Currently unused
// internal byte encodingMinor; // Currently unused
- internal Hashtable patchMap;
- internal Hashtable unmarshaledMap;
+ internal Dictionary<int, List<IceInternal.IPatcher> > patchMap;
+ internal Dictionary<int, Ice.Object> unmarshaledMap;
internal int typeIdIndex;
- internal Hashtable typeIdMap;
+ internal Dictionary<int, string> typeIdMap;
internal ReadEncaps next;
internal void reset()
@@ -2908,10 +2903,10 @@ namespace IceInternal
internal int start;
internal int writeIndex;
- internal Hashtable toBeMarshaledMap;
- internal Hashtable marshaledMap;
+ internal Dictionary<Ice.Object, int> toBeMarshaledMap;
+ internal Dictionary<Ice.Object, int> marshaledMap;
internal int typeIdIndex;
- internal Hashtable typeIdMap;
+ internal Dictionary<string, int> typeIdMap;
internal WriteEncaps next;
internal void reset()
@@ -2946,9 +2941,10 @@ namespace IceInternal
int _startSeq;
int _minSeqSize;
- private ArrayList _objectList;
+ private List<Ice.Object> _objectList;
- private static Hashtable _exceptionFactories = new Hashtable(); // <type name, factory> pairs.
+ private static Dictionary<string, UserExceptionFactory> _exceptionFactories =
+ new Dictionary<string, UserExceptionFactory>(); // <type name, factory> pairs.
private static bool _bzlibInstalled;
diff --git a/cs/src/Ice/ByteBuffer.cs b/cs/src/Ice/ByteBuffer.cs
index 5143860a371..38dfef99b6e 100644
--- a/cs/src/Ice/ByteBuffer.cs
+++ b/cs/src/Ice/ByteBuffer.cs
@@ -273,7 +273,7 @@ namespace IceInternal
public byte b7;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public short getShort()
@@ -281,7 +281,7 @@ namespace IceInternal
checkUnderflow(2);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
_valBytes.shortVal = *((short*)p);
@@ -321,7 +321,7 @@ namespace IceInternal
_position += len;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public ByteBuffer putShort(short val)
@@ -330,7 +330,7 @@ namespace IceInternal
_valBytes.shortVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
*((short*)p) = _valBytes.shortVal;
@@ -371,7 +371,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public int getInt()
@@ -379,7 +379,7 @@ namespace IceInternal
checkUnderflow(4);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
_valBytes.intVal = *((int*)p);
@@ -432,7 +432,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public ByteBuffer putInt(int pos, int val)
@@ -448,7 +448,7 @@ namespace IceInternal
_valBytes.intVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[pos])
{
*((int*)p) = _valBytes.intVal;
@@ -494,7 +494,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public long getLong()
@@ -502,7 +502,7 @@ namespace IceInternal
checkUnderflow(8);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
_valBytes.longVal = *((long*)p);
@@ -560,7 +560,7 @@ namespace IceInternal
_position += len;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public ByteBuffer putLong(long val)
@@ -569,7 +569,7 @@ namespace IceInternal
_valBytes.longVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
*((long*)p) = _valBytes.longVal;
@@ -628,7 +628,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public float getFloat()
@@ -636,7 +636,7 @@ namespace IceInternal
checkUnderflow(4);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
_valBytes.floatVal = *((float*)p);
@@ -682,7 +682,7 @@ namespace IceInternal
_position += len;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public ByteBuffer putFloat(float val)
@@ -691,7 +691,7 @@ namespace IceInternal
_valBytes.floatVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
*((float*)p) = _valBytes.floatVal;
@@ -738,7 +738,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public double getDouble()
@@ -746,7 +746,7 @@ namespace IceInternal
checkUnderflow(8);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
_valBytes.doubleVal = *((double*)p);
@@ -804,7 +804,7 @@ namespace IceInternal
_position += len;
}
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
unsafe
#endif
public ByteBuffer putDouble(double val)
@@ -813,7 +813,7 @@ namespace IceInternal
_valBytes.doubleVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT
+#if !MANAGED && !COMPACT && !SILVERLIGHT
fixed(byte* p = &_bytes[_position])
{
*((double*)p) = _valBytes.doubleVal;
@@ -926,7 +926,7 @@ namespace IceInternal
private static void throwOutOfRange(string param, object value, string message)
{
-#if COMPACT
+#if COMPACT || SILVERLIGHT
throw new ArgumentOutOfRangeException(param, message);
#else
throw new ArgumentOutOfRangeException(param, value, message);
diff --git a/cs/src/Ice/ConnectionFactory.cs b/cs/src/Ice/ConnectionFactory.cs
index 4f0b6cbf200..354f2207ea6 100644
--- a/cs/src/Ice/ConnectionFactory.cs
+++ b/cs/src/Ice/ConnectionFactory.cs
@@ -1462,7 +1462,7 @@ namespace IceInternal
//
// Operations from EventHandler.
//
- public override bool startAsync(int unused, AsyncCallback callback, ref bool completedSynchronously)
+ public override bool startAsync(int operation, AsyncCallback callback, ref bool completedSynchronously)
{
if(_state >= StateClosed)
{
@@ -1483,7 +1483,7 @@ namespace IceInternal
}
finally
{
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
System.Environment.FailFast(s);
#endif
}
@@ -1510,7 +1510,7 @@ namespace IceInternal
}
finally
{
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
System.Environment.FailFast(s);
#endif
}
@@ -1582,7 +1582,7 @@ namespace IceInternal
}
finally
{
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
System.Environment.FailFast(s);
#endif
}
diff --git a/cs/src/Ice/ConnectionI.cs b/cs/src/Ice/ConnectionI.cs
index 1d84ebe13b7..10e14111078 100644
--- a/cs/src/Ice/ConnectionI.cs
+++ b/cs/src/Ice/ConnectionI.cs
@@ -1045,7 +1045,7 @@ namespace Ice
//
// Operations from EventHandler
//
- public override bool startAsync(int operation, System.AsyncCallback cb, ref bool completedSynchronously)
+ public override bool startAsync(int operation, IceInternal.AsyncCallback cb, ref bool completedSynchronously)
{
if(_state >= StateClosed)
{
diff --git a/cs/src/Ice/EndpointFactoryManager.cs b/cs/src/Ice/EndpointFactoryManager.cs
index 7c429d7410d..1e93c60956c 100644
--- a/cs/src/Ice/EndpointFactoryManager.cs
+++ b/cs/src/Ice/EndpointFactoryManager.cs
@@ -10,7 +10,7 @@
namespace IceInternal
{
- using System.Collections;
+ using System.Collections.Generic;
using System.Diagnostics;
using System.Text.RegularExpressions;
@@ -19,7 +19,7 @@ namespace IceInternal
internal EndpointFactoryManager(Instance instance)
{
instance_ = instance;
- _factories = new ArrayList();
+ _factories = new List<EndpointFactory>();
}
public void add(EndpointFactory factory)
@@ -162,7 +162,7 @@ namespace IceInternal
}
private readonly Instance instance_;
- private readonly ArrayList _factories;
+ private readonly List<EndpointFactory> _factories;
}
}
diff --git a/cs/src/Ice/EndpointHostResolver.cs b/cs/src/Ice/EndpointHostResolver.cs
index 436608b2f98..b9080113669 100644
--- a/cs/src/Ice/EndpointHostResolver.cs
+++ b/cs/src/Ice/EndpointHostResolver.cs
@@ -7,6 +7,7 @@
//
// **********************************************************************
+#if !SILVERLIGHT
namespace IceInternal
{
using System;
@@ -41,7 +42,7 @@ namespace IceInternal
//
try
{
- List<IPEndPoint> addrs = Network.getAddresses(host, port, _instance.protocolSupport(), false);
+ List<EndPoint> addrs = Network.getAddresses(host, port, _instance.protocolSupport(), false);
if(addrs.Count > 0)
{
callback.connectors(endpoint.connectors(addrs));
@@ -203,3 +204,4 @@ namespace IceInternal
private readonly IceUtilInternal.Monitor _m = new IceUtilInternal.Monitor();
}
}
+#endif
diff --git a/cs/src/Ice/EndpointI.cs b/cs/src/Ice/EndpointI.cs
index 0b1d1930715..24a6b0a062d 100644
--- a/cs/src/Ice/EndpointI.cs
+++ b/cs/src/Ice/EndpointI.cs
@@ -119,7 +119,7 @@ namespace IceInternal
//
public abstract bool equivalent(EndpointI endpoint);
- public virtual List<Connector> connectors(List<IPEndPoint> addresses)
+ public virtual List<Connector> connectors(List<EndPoint> addresses)
{
Debug.Assert(false);
return null;
diff --git a/cs/src/Ice/EventHandler.cs b/cs/src/Ice/EventHandler.cs
index d49f03169ed..b266960ac9f 100644
--- a/cs/src/Ice/EventHandler.cs
+++ b/cs/src/Ice/EventHandler.cs
@@ -18,6 +18,7 @@ public abstract class EventHandler
// Called to start a new asynchronous read or write operation.
//
abstract public bool startAsync(int op, AsyncCallback cb, ref bool completedSynchronously);
+
abstract public bool finishAsync(int op);
//
diff --git a/cs/src/Ice/ImplicitContextI.cs b/cs/src/Ice/ImplicitContextI.cs
index 76255a29a97..8dfdfcbf9c0 100644
--- a/cs/src/Ice/ImplicitContextI.cs
+++ b/cs/src/Ice/ImplicitContextI.cs
@@ -172,7 +172,7 @@ namespace Ice
Dictionary<string, string> ctx = null;
lock(this)
{
- ctx = _context.Count == 0 ? prxContext :combine(prxContext);
+ ctx = _context.Count == 0 ? prxContext : combine(prxContext);
}
ContextHelper.write(os, ctx);
}
@@ -206,9 +206,13 @@ namespace Ice
public override Dictionary<string, string> getContext()
{
Dictionary<string, string> threadContext = null;
+ Thread currentThread = Thread.CurrentThread;
lock(this)
{
- threadContext = (Dictionary<string, string>)_map[Thread.CurrentThread];
+ if(_map.ContainsKey(currentThread))
+ {
+ threadContext = (Dictionary<string, string>)_map[currentThread];
+ }
}
if(threadContext == null)
@@ -248,12 +252,10 @@ namespace Ice
Dictionary<string, string> threadContext = null;
lock(this)
{
- threadContext = (Dictionary<string, string>)_map[Thread.CurrentThread];
- }
-
- if(threadContext == null)
- {
- return false;
+ if(!_map.TryGetValue(Thread.CurrentThread, out threadContext))
+ {
+ return false;
+ }
}
return threadContext.ContainsKey(key);
@@ -269,13 +271,12 @@ namespace Ice
Dictionary<string, string> threadContext = null;
lock(this)
{
- threadContext = (Dictionary<string, string>)_map[Thread.CurrentThread];
+ if(!_map.TryGetValue(Thread.CurrentThread, out threadContext))
+ {
+ return "";
+ }
}
- if(threadContext == null)
- {
- return "";
- }
string val = threadContext[key];
if(val == null)
{
@@ -295,26 +296,18 @@ namespace Ice
value = "";
}
- Thread currentThread = Thread.CurrentThread;
-
Dictionary<string, string> threadContext = null;
lock(this)
{
- threadContext = (Dictionary<string, string>)_map[currentThread];
- }
-
- if(threadContext == null)
- {
- threadContext = new Dictionary<string, string>();
- lock(this)
+ if(!_map.TryGetValue(Thread.CurrentThread, out threadContext))
{
- _map.Add(currentThread, threadContext);
+ threadContext = new Dictionary<string, string>();
+ _map.Add(Thread.CurrentThread, threadContext);
}
}
-
+
string oldVal;
- threadContext.TryGetValue(key, out oldVal);
- if(oldVal == null)
+ if(!threadContext.TryGetValue(key, out oldVal))
{
oldVal = "";
}
@@ -333,17 +326,15 @@ namespace Ice
Dictionary<string, string> threadContext = null;
lock(this)
{
- threadContext = (Dictionary<string, string>)_map[Thread.CurrentThread];
- }
-
- if(threadContext == null)
- {
- return "";
+ if(!_map.TryGetValue(Thread.CurrentThread, out threadContext))
+ {
+ return "";
+ }
}
- string val = threadContext[key];
- if(val == null)
+ string val = null;
+ if(!threadContext.TryGetValue(key, out val))
{
val = "";
}
@@ -354,13 +345,12 @@ namespace Ice
return val;
}
- public override void write(Dictionary<string, string> prxContext,
- IceInternal.BasicStream os)
+ public override void write(Dictionary<string, string> prxContext, IceInternal.BasicStream os)
{
Dictionary<string, string> threadContext = null;
lock(this)
{
- threadContext = (Dictionary<string, string>)_map[Thread.CurrentThread];
+ _map.TryGetValue(Thread.CurrentThread, out threadContext);
}
if(threadContext == null || threadContext.Count == 0)
@@ -394,7 +384,10 @@ namespace Ice
Dictionary<string, string> threadContext = null;
lock(this)
{
- threadContext = (Dictionary<string, string>)_map[Thread.CurrentThread];
+ if(!_map.TryGetValue(Thread.CurrentThread, out threadContext))
+ {
+ return new Dictionary<string, string>(prxContext);
+ }
}
Dictionary<string, string> combined = new Dictionary<string, string>(prxContext);
@@ -408,7 +401,8 @@ namespace Ice
//
// map Thread -> Context
//
- private Hashtable _map = new Hashtable();
+ private Dictionary<Thread, Dictionary<string, string> > _map =
+ new Dictionary<Thread, Dictionary<string, string> >();
}
}
diff --git a/cs/src/Ice/Instance.cs b/cs/src/Ice/Instance.cs
index ad04c61b2c3..b9c77cb14d1 100644
--- a/cs/src/Ice/Instance.cs
+++ b/cs/src/Ice/Instance.cs
@@ -49,7 +49,7 @@ namespace IceInternal
return _defaultsAndOverrides;
}
-#if COMPACT
+#if COMPACT || SILVERLIGHT
public string[] factoryAssemblies()
{
return _factoryAssemblies;
@@ -233,6 +233,7 @@ namespace IceInternal
}
}
+#if !SILVERLIGHT
public EndpointHostResolver endpointHostResolver()
{
lock(this)
@@ -246,7 +247,7 @@ namespace IceInternal
return _endpointHostResolver;
}
}
-
+#endif
public RetryQueue
retryQueue()
{
@@ -601,7 +602,7 @@ namespace IceInternal
{
_initData.properties = Ice.Util.createProperties();
}
-
+#if !SILVERLIGHT
lock(_staticLock)
{
if(!_oneOffDone)
@@ -655,9 +656,11 @@ namespace IceInternal
_oneOffDone = true;
}
}
-
+#endif
+
if(_initData.logger == null)
{
+#if !SILVERLIGHT
string logfile = _initData.properties.getProperty("Ice.LogFile");
if(_initData.properties.getPropertyAsInt("Ice.UseSyslog") > 0)
{
@@ -676,9 +679,16 @@ namespace IceInternal
bool console =
_initData.properties.getPropertyAsIntWithDefault("Ice.ConsoleListener",
logfile.Length == 0 ? 1 : 0) > 0;
- _initData.logger =
+ _initData.logger =
new Ice.TraceLoggerI(_initData.properties.getProperty("Ice.ProgramName"), logfile, console);
}
+#else
+ if(Ice.Util.getProcessLogger() is Ice.LoggerI)
+ {
+ _initData.logger =
+ new Ice.TraceLoggerI(_initData.properties.getProperty("Ice.ProgramName"), true);
+ }
+#endif
else
{
_initData.logger = Ice.Util.getProcessLogger();
@@ -689,11 +699,10 @@ namespace IceInternal
_defaultsAndOverrides = new DefaultsAndOverrides(_initData.properties);
-#if COMPACT
+#if COMPACT || SILVERLIGHT
char[] separators = { ' ', '\t', '\n', '\r' };
_factoryAssemblies = _initData.properties.getProperty("Ice.FactoryAssemblies").Split(separators);
#endif
-
{
const int defaultMessageSizeMax = 1024;
int num =
@@ -750,8 +759,10 @@ namespace IceInternal
_endpointFactoryManager.add(tcpEndpointFactory);
EndpointFactory udpEndpointFactory = new UdpEndpointFactory(this);
_endpointFactoryManager.add(udpEndpointFactory);
-
+
+#if !SILVERLIGHT
_pluginManager = new Ice.PluginManagerI(communicator);
+#endif
_outgoingConnectionFactory = new OutgoingConnectionFactory(communicator, this);
@@ -785,14 +796,17 @@ namespace IceInternal
// Load plug-ins.
//
Debug.Assert(_serverThreadPool == null);
+#if !SILVERLIGHT
Ice.PluginManagerI pluginManagerImpl = (Ice.PluginManagerI)_pluginManager;
pluginManagerImpl.loadPlugins(ref args);
+#endif
//
// Create threads.
//
try
{
+#if !SILVERLIGHT
if(initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
{
ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
@@ -803,6 +817,9 @@ namespace IceInternal
{
_timer = new Timer(this);
}
+#else
+ _timer = new Timer(this);
+#endif
}
catch(System.Exception ex)
{
@@ -811,6 +828,7 @@ namespace IceInternal
throw;
}
+#if !SILVERLIGHT
try
{
_endpointHostResolver = new EndpointHostResolver(this);
@@ -821,7 +839,7 @@ namespace IceInternal
_initData.logger.error(s);
throw;
}
-
+#endif
_clientThreadPool = new ThreadPool(this, "Ice.ThreadPool.Client", 0);
//
@@ -844,6 +862,7 @@ namespace IceInternal
//
// Show process id if requested (but only once).
//
+#if !SILVERLIGHT
lock(this)
{
if(!_printProcessIdDone && _initData.properties.getPropertyAsInt("Ice.PrintProcessId") > 0)
@@ -855,7 +874,7 @@ namespace IceInternal
_printProcessIdDone = true;
}
}
-
+#endif
//
// Create the connection monitor and ensure the interval for
// monitoring connections is appropriate for client & server
@@ -875,11 +894,12 @@ namespace IceInternal
// initialization until after it has interacted directly with the
// plug-ins.
//
+#if !SILVERLIGHT
if(_initData.properties.getPropertyAsIntWithDefault("Ice.InitPlugins", 1) > 0)
{
pluginManagerImpl.initializePlugins();
}
-
+#endif
//
// This must be done last as this call creates the Ice.Admin object adapter
// and eventually registers a process proxy with the Ice locator (allowing
@@ -944,8 +964,10 @@ namespace IceInternal
ThreadPool serverThreadPool = null;
ThreadPool clientThreadPool = null;
AsyncIOThread asyncIOThread = null;
- EndpointHostResolver endpointHostResolver = null;
+#if !SILVERLIGHT
+ EndpointHostResolver endpointHostResolver = null;
+#endif
lock(this)
{
_objectAdapterFactory = null;
@@ -979,12 +1001,14 @@ namespace IceInternal
_asyncIOThread = null;
}
+#if !SILVERLIGHT
if(_endpointHostResolver != null)
{
_endpointHostResolver.destroy();
endpointHostResolver = _endpointHostResolver;
_endpointHostResolver = null;
}
+#endif
if(_timer != null)
{
@@ -1053,18 +1077,19 @@ namespace IceInternal
{
asyncIOThread.joinWithThread();
}
+#if !SILVERLIGHT
if(endpointHostResolver != null)
{
endpointHostResolver.joinWithThread();
}
-
+#endif
if(_initData.properties.getPropertyAsInt("Ice.Warn.UnusedProperties") > 0)
{
- ArrayList unusedProperties = ((Ice.PropertiesI)_initData.properties).getUnusedProperties();
- if(unusedProperties.Count != 0)
+ List<string> unusedProperties = ((Ice.PropertiesI)_initData.properties).getUnusedProperties();
+ if (unusedProperties.Count != 0)
{
StringBuilder message = new StringBuilder("The following properties were set but never read:");
- foreach(string s in unusedProperties)
+ foreach (string s in unusedProperties)
{
message.Append("\n ");
message.Append(s);
@@ -1083,7 +1108,7 @@ namespace IceInternal
private Ice.InitializationData _initData; // Immutable, not reset by destroy().
private TraceLevels _traceLevels; // Immutable, not reset by destroy().
private DefaultsAndOverrides _defaultsAndOverrides; // Immutable, not reset by destroy().
-#if COMPACT
+#if COMPACT || SILVERLIGHT
private string[] _factoryAssemblies; // Immutable, not reset by destroy().
#endif
private int _messageSizeMax; // Immutable, not reset by destroy().
@@ -1102,7 +1127,9 @@ namespace IceInternal
private ThreadPool _clientThreadPool;
private ThreadPool _serverThreadPool;
private AsyncIOThread _asyncIOThread;
+#if !SILVERLIGHT
private EndpointHostResolver _endpointHostResolver;
+#endif
private Timer _timer;
private RetryQueue _retryQueue;
private EndpointFactoryManager _endpointFactoryManager;
@@ -1112,9 +1139,11 @@ namespace IceInternal
private HashSet<string> _adminFacetFilter = new HashSet<string>();
private Ice.Identity _adminIdentity;
+#if !SILVERLIGHT
private static bool _printProcessIdDone = false;
private static bool _oneOffDone = false;
+#endif
private static System.Object _staticLock = new System.Object();
}
}
diff --git a/cs/src/Ice/LinkedList.cs b/cs/src/Ice/LinkedList.cs
deleted file mode 100644
index e8543cf7324..00000000000
--- a/cs/src/Ice/LinkedList.cs
+++ /dev/null
@@ -1,304 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-namespace IceUtilInternal
-{
- using System;
- using System.Collections;
- using System.Diagnostics;
-
- public class LinkedList : ICollection, ICloneable
- {
- public LinkedList()
- {
- _head = null;
- _tail = null;
- _count = 0;
- }
-
- public LinkedList(LinkedList l)
- {
- _head = null;
- _tail = null;
- _count = 0;
-
- Node cursor = l._head;
- while(cursor != null)
- {
- Add(cursor.val);
- cursor = cursor.next;
- }
- }
-
- public int Count
- {
- get
- {
- return _count;
- }
- }
-
- public bool IsSynchronized
- {
- get
- {
- return false;
- }
- }
-
- public object SyncRoot
- {
- get
- {
- return this;
- }
- }
-
- public void CopyTo(Array array, int index)
- {
- //
- // Check preconditions.
- //
- if(array == null)
- {
- throw new ArgumentNullException("array", "array parameter must not be null");
- }
- if(index < 0)
- {
-#if COMPACT
- throw new ArgumentOutOfRangeException("index", "index must not be less than zero");
-#else
- throw new ArgumentOutOfRangeException("index", _count, "index must not be less than zero");
-#endif
- }
- if(index >= array.Length)
- {
- throw new ArgumentException("index out of bounds for array", "index");
- }
- if(array.Length - index > _count)
- {
- throw new ArgumentException("insufficient room in array", "array");
- }
- if(array.Rank != 1)
- {
- throw new ArgumentException("array must be one-dimensional", "array");
- }
-
- //
- // Copy the elements.
- //
- Node n = _head;
- while(n != null)
- {
- array.SetValue(n.val, index++);
- n = (Node)n.next;
- }
- }
-
- public IEnumerator GetEnumerator()
- {
- return new Enumerator(this);
- }
-
- public object Clone()
- {
- LinkedList l = new LinkedList();
- Node cursor = _head;
- while(cursor != null)
- {
- l.Add(cursor.val);
- cursor = cursor.next;
- }
- return l;
- }
-
- public void Add(object value)
- {
- Node n = new Node();
- n.val = value;
- if(_tail == null)
- {
- n.prev = null;
- n.next = null;
- _head = n;
- _tail = n;
- }
- else
- {
- n.prev = _tail;
- n.next = null;
- _tail.next = n;
- _tail = n;
- }
- _count++;
- }
-
- public void AddFirst(object value)
- {
- Node n = new Node();
- n.val = value;
- if(_head == null)
- {
- n.prev = null;
- n.next = null;
- _head = n;
- _tail = n;
- }
- else
- {
- n.prev = null;
- n.next = _head;
- _head.prev = n;
- _head = n;
- }
- _count++;
- }
-
- public bool Remove(object value)
- {
- Node n = _head;
- while(n != null)
- {
- if(n.val == value)
- {
- RemoveNode(n);
- return true;
- }
- n = n.next;
- }
- return false;
- }
-
- private void RemoveNode(Node n)
- {
- Debug.Assert(n != null);
- Debug.Assert(_count != 0);
-
- if(n.prev != null)
- {
- n.prev.next = n.next;
- }
- else
- {
- _head = n.next;
- }
- if(n.next != null)
- {
- n.next.prev = n.prev;
- }
- else
- {
- _tail = n.prev;
- }
- _count--;
- }
-
- internal class Node
- {
- internal Node next;
- internal Node prev;
- internal object val;
- }
-
- private Node _head;
- private Node _tail;
- private int _count;
-
- public class Enumerator : IEnumerator
- {
- internal Enumerator(LinkedList list)
- {
- _list = list;
- _current = null;
- _movePrev = null;
- _moveNext = null;
- _removed = false;
- }
-
- public void Reset()
- {
- _current = null;
- _movePrev = null;
- _moveNext = null;
- _removed = false;
- }
-
- public object Current
- {
- get
- {
- if(_current == null)
- {
- throw new InvalidOperationException("iterator not positioned on an element");
- }
- return _current.val;
- }
- }
-
- public bool MoveNext()
- {
- if(_removed)
- {
- _current = _moveNext;
- _moveNext = null;
- _movePrev = null;
- _removed = false;
- }
- else
- {
- if(_current == _list._tail) // Make sure the iterator "sticks" if on last element.
- {
- return false;
- }
- _current = _current == null ? _list._head : _current.next;
- }
- return _current != null;
- }
-
- public bool MovePrev()
- {
- if(_removed)
- {
- _current = _movePrev;
- _movePrev = null;
- _moveNext = null;
- _removed = false;
- }
- else
- {
- if(_current == _list._head) // Make sure the iterator "sticks" if on first element.
- {
- return false;
- }
- _current = _current == null ? _list._tail : _current.prev;
- }
- return _current != null;
- }
-
- public void Remove()
- {
- if(_current == null)
- {
- throw new InvalidOperationException("iterator is not positioned on an element");
- }
- _removed = true;
- _moveNext = _current.next; // Remember where to move next for call to MoveNext().
- _movePrev = _current.prev; // Remember where to move next for call to MovePrev().
- _list.RemoveNode(_current);
- _current = null;
- }
-
- private LinkedList _list; // The list we are iterating over.
- private Node _current; // Current iterator position.
- private Node _moveNext; // Remembers node that preceded a removed element.
- private Node _movePrev; // Remembers node that followed a removed element.
- private bool _removed; // True after a call to Remove(), false otherwise.
- }
- }
-}
diff --git a/cs/src/Ice/LocatorInfo.cs b/cs/src/Ice/LocatorInfo.cs
index 95b899b5365..326eef71291 100644
--- a/cs/src/Ice/LocatorInfo.cs
+++ b/cs/src/Ice/LocatorInfo.cs
@@ -825,8 +825,8 @@ namespace IceInternal
{
internal LocatorManager(Ice.Properties properties)
{
- _table = new Hashtable();
- _locatorTables = new Hashtable();
+ _table = new Dictionary<Ice.LocatorPrx, LocatorInfo>();
+ _locatorTables = new Dictionary<Ice.Identity, LocatorTable>();
_background = properties.getPropertyAsInt("Ice.BackgroundLocatorCacheUpdates") > 0;
}
@@ -865,16 +865,16 @@ namespace IceInternal
lock(this)
{
- LocatorInfo info = (LocatorInfo)_table[locator];
- if(info == null)
+ LocatorInfo info = null;
+ if(!_table.TryGetValue(locator, out info))
{
//
// Rely on locator identity for the adapter table. We want to
// have only one table per locator (not one per locator
// proxy).
//
- LocatorTable table = (LocatorTable)_locatorTables[locator.ice_getIdentity()];
- if(table == null)
+ LocatorTable table = null;
+ if(!_locatorTables.TryGetValue(locator.ice_getIdentity(), out table))
{
table = new LocatorTable();
_locatorTables[locator.ice_getIdentity()] = table;
@@ -888,8 +888,8 @@ namespace IceInternal
}
}
- private Hashtable _table;
- private Hashtable _locatorTables;
+ private Dictionary<Ice.LocatorPrx, LocatorInfo> _table;
+ private Dictionary<Ice.Identity, LocatorTable> _locatorTables;
private readonly bool _background;
}
@@ -897,8 +897,8 @@ namespace IceInternal
{
internal LocatorTable()
{
- _adapterEndpointsTable = new Hashtable();
- _objectTable = new Hashtable();
+ _adapterEndpointsTable = new Dictionary<string, EndpointTableEntry>();
+ _objectTable = new Dictionary<Ice.Identity, ReferenceTableEntry>();
}
internal void clear()
@@ -920,11 +920,12 @@ namespace IceInternal
lock(this)
{
- EndpointTableEntry entry = (EndpointTableEntry)_adapterEndpointsTable[adapter];
- if(entry != null)
+ EndpointTableEntry entry = null;
+ if(_adapterEndpointsTable.TryGetValue(adapter, out entry))
{
cached = checkTTL(entry.time, ttl);
return entry.endpoints;
+
}
cached = false;
return null;
@@ -944,9 +945,13 @@ namespace IceInternal
{
lock(this)
{
- EndpointTableEntry entry = (EndpointTableEntry)_adapterEndpointsTable[adapter];
- _adapterEndpointsTable.Remove(adapter);
- return entry != null ? entry.endpoints : null;
+ EndpointTableEntry entry = null;
+ if(_adapterEndpointsTable.TryGetValue(adapter, out entry))
+ {
+ _adapterEndpointsTable.Remove(adapter);
+ return entry.endpoints;
+ }
+ return null;
}
}
@@ -960,8 +965,8 @@ namespace IceInternal
lock(this)
{
- ReferenceTableEntry entry = (ReferenceTableEntry)_objectTable[id];
- if(entry != null)
+ ReferenceTableEntry entry = null;
+ if(_objectTable.TryGetValue(id, out entry))
{
cached = checkTTL(entry.time, ttl);
return entry.reference;
@@ -983,9 +988,13 @@ namespace IceInternal
{
lock(this)
{
- ReferenceTableEntry entry = (ReferenceTableEntry)_objectTable[id];
- _objectTable.Remove(id);
- return entry != null ? entry.reference : null;
+ ReferenceTableEntry entry = null;
+ if(_objectTable.TryGetValue(id, out entry))
+ {
+ _objectTable.Remove(id);
+ return entry.reference;
+ }
+ return null;
}
}
@@ -1026,8 +1035,8 @@ namespace IceInternal
public Reference reference;
}
- private Hashtable _adapterEndpointsTable;
- private Hashtable _objectTable;
+ private Dictionary<string, EndpointTableEntry> _adapterEndpointsTable;
+ private Dictionary<Ice.Identity, ReferenceTableEntry> _objectTable;
}
}
diff --git a/cs/src/Ice/LoggerI.cs b/cs/src/Ice/LoggerI.cs
index 914230948c1..e232847286c 100644
--- a/cs/src/Ice/LoggerI.cs
+++ b/cs/src/Ice/LoggerI.cs
@@ -16,7 +16,7 @@ namespace Ice
#if COMPACT
using System.IO;
#endif
-
+
public abstract class LoggerI : Logger
{
public LoggerI(string prefix)
@@ -156,6 +156,27 @@ namespace Ice
private bool _console = false;
private TextWriter _writer;
}
+#elif SILVERLIGHT
+ public sealed class TraceLoggerI : LoggerI
+ {
+ public TraceLoggerI(string prefix, bool console)
+ : base(prefix)
+ {
+ _console = console;
+ }
+
+ public override Logger cloneWithPrefix(string prefix)
+ {
+ return new TraceLoggerI(prefix, _console);
+ }
+
+ protected override void write(string message)
+ {
+ System.Console.Error.WriteLine(message);
+ }
+
+ private bool _console = false;
+ }
#else
public sealed class TraceLoggerI : LoggerI
{
diff --git a/cs/src/Ice/Makefile b/cs/src/Ice/Makefile
index 77afe2b5817..a7fedaa6976 100644
--- a/cs/src/Ice/Makefile
+++ b/cs/src/Ice/Makefile
@@ -50,7 +50,6 @@ SRCS = Acceptor.cs \
IncomingAsync.cs \
Incoming.cs \
Instance.cs \
- LinkedList.cs \
LocalObject.cs \
LocatorInfo.cs \
LoggerI.cs \
diff --git a/cs/src/Ice/Makefile.mak b/cs/src/Ice/Makefile.mak
index 516b317ed30..81dcec2b656 100644
--- a/cs/src/Ice/Makefile.mak
+++ b/cs/src/Ice/Makefile.mak
@@ -51,7 +51,6 @@ SRCS = Acceptor.cs \
IncomingAsync.cs \
Incoming.cs \
Instance.cs \
- LinkedList.cs \
LocalObject.cs \
LocatorInfo.cs \
LoggerI.cs \
diff --git a/cs/src/Ice/Monitor.cs b/cs/src/Ice/Monitor.cs
index 8202c19008f..a445832d95c 100644
--- a/cs/src/Ice/Monitor.cs
+++ b/cs/src/Ice/Monitor.cs
@@ -75,39 +75,45 @@ namespace IceUtilInternal
}
LockerEvent e = acquireEvent();
- _waitQueue.Enqueue(e);
+ try
+ {
+ _waitQueue.Enqueue(e);
- //
- // Preserve the lock count until we reaquire the lock.
- //
- int lockCount = _lockCount;
- _lockCount = 0;
+ //
+ // Preserve the lock count until we reaquire the lock.
+ //
+ int lockCount = _lockCount;
+ _lockCount = 0;
- //
- // Fully release the lock.
- //
- for(int i = 0; i < lockCount; ++i)
- {
- _mutex.ReleaseMutex();
- }
+ //
+ // Fully release the lock.
+ //
+ for(int i = 0; i < lockCount; ++i)
+ {
+ _mutex.ReleaseMutex();
+ }
- //
- // Wait for the event to be set.
- //
- e.ev.WaitOne();
+ //
+ // Wait for the event to be set.
+ //
+ e.ev.WaitOne();
- //
- // Reacquire the lock the same number of times.
- //
- for(int i = 0; i < lockCount; ++i)
- {
- _mutex.WaitOne();
- }
+ //
+ // Reacquire the lock the same number of times.
+ //
+ for(int i = 0; i < lockCount; ++i)
+ {
+ _mutex.WaitOne();
+ }
- _lockCount = lockCount;
+ _lockCount = lockCount;
- Debug.Assert(e.notified);
- releaseEvent(e);
+ Debug.Assert(e.notified);
+ }
+ finally
+ {
+ releaseEvent(e);
+ }
}
public bool TimedWait(int timeout)
@@ -118,46 +124,43 @@ namespace IceUtilInternal
}
LockerEvent e = acquireEvent();
- _waitQueue.Enqueue(e);
-
- //
- // Preserve the lock count until we reaquire the lock.
- //
- int lockCount = _lockCount;
- _lockCount = 0;
-
- //
- // Fully release the lock.
- //
- for(int i = 0; i < lockCount; ++i)
+ try
{
- _mutex.ReleaseMutex();
- }
+ _waitQueue.Enqueue(e);
- //
- // Wait for the event to be set or the timeout to expire.
- //
- e.ev.WaitOne(timeout, false);
+ //
+ // Preserve the lock count until we reaquire the lock.
+ //
+ int lockCount = _lockCount;
+ _lockCount = 0;
- //
- // Reacquire the lock the same number of times.
- //
- for(int i = 0; i < lockCount; ++i)
- {
- _mutex.WaitOne();
- }
+ //
+ // Fully release the lock.
+ //
+ for(int i = 0; i < lockCount; ++i)
+ {
+ _mutex.ReleaseMutex();
+ }
- _lockCount = lockCount;
+ //
+ // Wait for the event to be set or the timeout to expire.
+ //
+ e.ev.WaitOne(timeout, false);
- if(e.notified)
- {
- releaseEvent(e);
- return true;
+ //
+ // Reacquire the lock the same number of times.
+ //
+ for(int i = 0; i < lockCount; ++i)
+ {
+ _mutex.WaitOne();
+ }
+
+ _lockCount = lockCount;
+ return e.notified;
}
- else
+ finally
{
- e.timedOut = true;
- return false;
+ releaseEvent(e);
}
}
@@ -171,16 +174,8 @@ namespace IceUtilInternal
// Set the first event in the wait queue.
//
LockerEvent h = _waitQueue.Dequeue();
- if(!h.timedOut)
- {
- h.notified = true;
- h.ev.Set();
- break;
- }
- else
- {
- releaseEvent(h);
- }
+ h.notified = true;
+ h.ev.Set();
}
}
}
@@ -194,21 +189,14 @@ namespace IceUtilInternal
//
foreach(LockerEvent h in _waitQueue)
{
- if(!h.timedOut)
- {
- h.notified = true;
- h.ev.Set();
- }
- else
- {
- releaseEvent(h);
- }
+ h.notified = true;
+ h.ev.Set();
}
_waitQueue.Clear();
}
}
- private LockerEvent acquireEvent()
+ private LockerEvent acquireEvent()
{
if(_eventPool == null)
{
@@ -233,7 +221,6 @@ namespace IceUtilInternal
internal class LockerEvent
{
internal System.Threading.EventWaitHandle ev;
- internal bool timedOut;
internal bool notified;
internal LockerEvent next;
@@ -246,7 +233,6 @@ namespace IceUtilInternal
internal void Reset()
{
ev.Reset();
- timedOut = false;
notified = false;
}
}
diff --git a/cs/src/Ice/Network.cs b/cs/src/Ice/Network.cs
index 30994abb5ef..3609ac8c6e6 100644
--- a/cs/src/Ice/Network.cs
+++ b/cs/src/Ice/Network.cs
@@ -29,34 +29,101 @@ namespace IceInternal
public const int EnableIPv4 = 0;
public const int EnableIPv6 = 1;
public const int EnableBoth = 2;
-
+
+#if COMPACT
+ public static SocketError socketErrorCode(SocketException ex)
+ {
+ return (SocketError)ex.ErrorCode;
+ }
+#else
+ public static SocketError socketErrorCode(SocketException ex)
+ {
+ return ex.SocketErrorCode;
+ }
+#endif
+
+#if COMPACT
//
- // Magic numbers taken from winsock2.h
+ // SocketError enumeration isn't available with Silverlight
//
- const int WSAEINTR = 10004;
- const int WSAEFAULT = 10014;
- const int WSAEINVAL = 10022;
- const int WSAEMFILE = 10024;
- const int WSAEWOULDBLOCK = 10035;
- const int WSAEINPROGRESS = 10036; // Deprecated in winsock2, but still used by Mono Beta 1
- const int WSAEMSGSIZE = 10040;
- const int WSAENETDOWN = 10050;
- const int WSAENETUNREACH = 10051;
- const int WSAENETRESET = 10052;
- const int WSAECONNABORTED = 10053;
- const int WSAECONNRESET = 10054;
- const int WSAENOBUFS = 10055;
- const int WSAENOTCONN = 10057;
- const int WSAESHUTDOWN = 10058;
- const int WSAETIMEDOUT = 10060;
- const int WSAECONNREFUSED = 10061;
- const int WSAEHOSTUNREACH = 10065;
- const int WSATRY_AGAIN = 11002;
-
- private static IPEndPoint getAddressImpl(string host, int port, int protocol, bool server)
+ public enum SocketError
+ {
+ Interrupted = 10004, // A blocking Socket call was canceled.
+ //AccessDenied =10013, // An attempt was made to access a Socket in a way that is forbidden by its access permissions.
+ Fault = 10014, // An invalid pointer address was detected by the underlying socket provider.
+ InvalidArgument = 10022, // An invalid argument was supplied to a Socket member.
+ TooManyOpenSockets = 10024, // There are too many open sockets in the underlying socket provider.
+ WouldBlock = 10035, // An operation on a nonblocking socket cannot be completed immediately.
+ InProgress = 10036, // A blocking operation is in progress.
+ //AlreadyInProgress = 10037, // The nonblocking Socket already has an operation in progress.
+ //NotSocket = 10038, // A Socket operation was attempted on a non-socket.
+ //DestinationAddressRequired = 10039, // A required address was omitted from an operation on a Socket.
+ MessageSize = 10040, // The datagram is too long.
+ //ProtocolType = 10041, // The protocol type is incorrect for this Socket.
+ //ProtocolOption = 10042, // An unknown, invalid, or unsupported option or level was used with a Socket.
+ //ProtocolNotSupported = 10043, // The protocol is not implemented or has not been configured.
+ //SocketNotSupported = 10044, // The support for the specified socket type does not exist in this address family.
+ //OperationNotSupported = 10045, // The address family is not supported by the protocol family.
+ //ProtocolFamilyNotSupported = 10046, // The protocol family is not implemented or has not been configured.
+ //AddressFamilyNotSupported = 10047, // The address family specified is not supported.
+ //AddressAlreadyInUse = 10048, // Only one use of an address is normally permitted.
+ //AddressNotAvailable = 10049, // The selected IP address is not valid in this context.
+ NetworkDown = 10050, // The network is not available.
+ NetworkUnreachable = 10051, // No route to the remote host exists.
+ NetworkReset = 10052, // The application tried to set KeepAlive on a connection that has already timed out.
+ ConnectionAborted = 10053, // The connection was aborted by the .NET Framework or the underlying socket provider.
+ ConnectionReset = 10054, // The connection was reset by the remote peer.
+ NoBufferSpaceAvailable = 10055, // No free buffer space is available for a Socket operation.
+ //IsConnected = 10056, // The Socket is already connected.
+ NotConnected = 10057, // The application tried to send or receive data, and the Socket is not connected.
+ Shutdown = 10058, // A request to send or receive data was disallowed because the Socket has already been closed.
+ TimedOut = 10060, // The connection attempt timed out, or the connected host has failed to respond.
+ ConnectionRefused = 10061, // The remote host is actively refusing a connection.
+ //HostDown = 10064, // The operation failed because the remote host is down.
+ HostUnreachable = 10065, // There is no network route to the specified host.
+ //ProcessLimit = 10067, // Too many processes are using the underlying socket provider.
+ //SystemNotReady = 10091, // The network subsystem is unavailable.
+ //VersionNotSupported = 10092, // The version of the underlying socket provider is out of range.
+ //NotInitialized = 10093, // The underlying socket provider has not been initialized.
+ //Disconnecting = 10101, // A graceful shutdown is in progress.
+ //TypeNotFound = 10109, // The specified class was not found.
+ //HostNotFound = 11001, // No such host is known. The name is not an official host name or alias.
+ TryAgain = 11002, // The name of the host could not be resolved. Try again later.
+ //NoRecovery = 11003, // The error is unrecoverable or the requested database cannot be located.
+ //NoData = 11004, // The requested name or IP address was not found on the name server.
+ //IOPending = 997, // The application has initiated an overlapped operation that cannot be completed immediately.
+ OperationAborted =995 // The overlapped operation was aborted due to the closure of the Socket.
+ }
+#endif
+
+ private static EndPoint getAddressImpl(string host, int port, int protocol, bool server)
{
if(host.Length == 0)
{
+#if SILVERLIGHT
+ if(server)
+ {
+ if(protocol != EnableIPv4)
+ {
+ return new DnsEndPoint(IPAddress.IPv6Any.ToString(), port);
+ }
+ else
+ {
+ return new DnsEndPoint(IPAddress.Any.ToString(), port);
+ }
+ }
+ else
+ {
+ if(protocol != EnableIPv4)
+ {
+ return new DnsEndPoint(IPAddress.IPv6Loopback.ToString(), port);
+ }
+ else
+ {
+ return new DnsEndPoint(IPAddress.Loopback.ToString(), port);
+ }
+ }
+#else
if(server)
{
if(protocol != EnableIPv4)
@@ -79,11 +146,15 @@ namespace IceInternal
return new IPEndPoint(IPAddress.Loopback, port);
}
}
+#endif
}
+#if SILVERLIGHT
+ return new DnsEndPoint(host, port);
+#else
int retry = 5;
- repeatGetHostByName:
+ repeatGetHostByName:
try
{
try
@@ -99,11 +170,11 @@ namespace IceInternal
{
}
-#if COMPACT
+# if COMPACT
foreach(IPAddress a in Dns.GetHostEntry(host).AddressList)
-#else
+# else
foreach(IPAddress a in Dns.GetHostAddresses(host))
-#endif
+# endif
{
if((a.AddressFamily == AddressFamily.InterNetwork && protocol != EnableIPv6) ||
(a.AddressFamily == AddressFamily.InterNetworkV6 && protocol != EnableIPv4))
@@ -112,9 +183,9 @@ namespace IceInternal
}
}
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
- if(ex.NativeErrorCode == WSATRY_AGAIN && --retry >= 0)
+ if(socketErrorCode(ex) == SocketError.TryAgain && --retry >= 0)
{
goto repeatGetHostByName;
}
@@ -135,65 +206,66 @@ namespace IceInternal
Ice.DNSException dns = new Ice.DNSException();
dns.host = host;
throw dns;
+#endif
}
- public static bool interrupted(Win32Exception ex)
+ public static bool interrupted(SocketException ex)
{
- return ex.NativeErrorCode == WSAEINTR;
+ return socketErrorCode(ex) == SocketError.Interrupted;
}
- public static bool acceptInterrupted(Win32Exception ex)
+ public static bool acceptInterrupted(SocketException ex)
{
if(interrupted(ex))
{
return true;
}
- int error = ex.NativeErrorCode;
- return error == WSAECONNABORTED ||
- error == WSAECONNRESET ||
- error == WSAETIMEDOUT;
+ SocketError error = socketErrorCode(ex);
+ return error == SocketError.ConnectionAborted ||
+ error == SocketError.ConnectionReset ||
+ error == SocketError.TimedOut;
}
- public static bool noBuffers(Win32Exception ex)
+ public static bool noBuffers(SocketException ex)
{
- int error = ex.NativeErrorCode;
- return error == WSAENOBUFS ||
- error == WSAEFAULT;
+ SocketError error = socketErrorCode(ex);
+ return error == SocketError.NoBufferSpaceAvailable ||
+ error == SocketError.Fault;
}
- public static bool wouldBlock(Win32Exception ex)
+ public static bool wouldBlock(SocketException ex)
{
- return ex.NativeErrorCode == WSAEWOULDBLOCK;
+ return socketErrorCode(ex) == SocketError.WouldBlock;
}
- public static bool connectFailed(Win32Exception ex)
+ public static bool connectFailed(SocketException ex)
{
- int error = ex.NativeErrorCode;
- return error == WSAECONNREFUSED ||
- error == WSAETIMEDOUT ||
- error == WSAENETUNREACH ||
- error == WSAEHOSTUNREACH ||
- error == WSAECONNRESET ||
- error == WSAESHUTDOWN ||
- error == WSAECONNABORTED ||
- error == WSAENETDOWN;
+ SocketError error = socketErrorCode(ex);
+ return error == SocketError.ConnectionRefused ||
+ error == SocketError.TimedOut ||
+ error == SocketError.NetworkUnreachable ||
+ error == SocketError.HostUnreachable ||
+ error == SocketError.ConnectionReset ||
+ error == SocketError.Shutdown ||
+ error == SocketError.ConnectionAborted ||
+ error == SocketError.NetworkDown;
}
- public static bool connectInProgress(Win32Exception ex)
+ public static bool connectInProgress(SocketException ex)
{
- int error = ex.NativeErrorCode;
- return error == WSAEWOULDBLOCK ||
- error == WSAEINPROGRESS;
+ SocketError error = socketErrorCode(ex);
+ return error == SocketError.WouldBlock ||
+ error == SocketError.InProgress;
}
- public static bool connectionLost(Win32Exception ex)
+ public static bool connectionLost(SocketException ex)
{
- int error = ex.NativeErrorCode;
- return error == WSAECONNRESET ||
- error == WSAESHUTDOWN ||
- error == WSAECONNABORTED ||
- error == WSAENETDOWN ||
- error == WSAENETRESET;
+ SocketError error = socketErrorCode(ex);
+ return error == SocketError.ConnectionReset ||
+ error == SocketError.Shutdown ||
+ error == SocketError.ConnectionAborted ||
+ error == SocketError.NetworkDown ||
+ error == SocketError.NetworkReset;
}
public static bool connectionLost(System.IO.IOException ex)
@@ -202,9 +274,9 @@ namespace IceInternal
// In some cases the IOException has an inner exception that we can pass directly
// to the other overloading of connectionLost().
//
- if(ex.InnerException != null && ex.InnerException is Win32Exception)
+ if(ex.InnerException != null && ex.InnerException is SocketException)
{
- return connectionLost(ex.InnerException as Win32Exception);
+ return connectionLost(ex.InnerException as SocketException);
}
//
@@ -229,28 +301,30 @@ namespace IceInternal
return false;
}
- public static bool connectionRefused(Win32Exception ex)
+ public static bool connectionRefused(SocketException ex)
{
- return ex.NativeErrorCode == WSAECONNREFUSED;
+ return socketErrorCode(ex) == SocketError.ConnectionRefused;
}
- public static bool notConnected(Win32Exception ex)
+ public static bool notConnected(SocketException ex)
{
- // BUGFIX: WSAEINVAL because shutdown() under MacOS returns EINVAL if the server side is gone.
- // BUGFIX: shutdown() under Vista might return WSAECONNRESET
- return ex.NativeErrorCode == WSAENOTCONN ||
- ex.NativeErrorCode == WSAEINVAL ||
- ex.NativeErrorCode == WSAECONNRESET;
+ // BUGFIX: SocketError.InvalidArgument because shutdown() under MacOS returns EINVAL
+ // if the server side is gone.
+ // BUGFIX: shutdown() under Vista might return SocketError.ConnectionReset
+ SocketError error = socketErrorCode(ex);
+ return error == SocketError.NotConnected ||
+ error == SocketError.InvalidArgument ||
+ error == SocketError.ConnectionReset;
}
- public static bool recvTruncated(Win32Exception ex)
+ public static bool recvTruncated(SocketException ex)
{
- return ex.NativeErrorCode == WSAEMSGSIZE;
+ return socketErrorCode(ex) == SocketError.MessageSize;
}
- public static bool operationAborted(Win32Exception ex)
+ public static bool operationAborted(SocketException ex)
{
- return ex.NativeErrorCode == 995;
+ return socketErrorCode(ex) == SocketError.OperationAborted;
}
public static bool timeout(System.IO.IOException ex)
@@ -266,7 +340,7 @@ namespace IceInternal
{
try
{
- return ex != null && ((Win32Exception)ex).NativeErrorCode == WSAEMFILE;
+ return ex != null && socketErrorCode((SocketException)ex) == SocketError.TooManyOpenSockets;
}
catch(InvalidCastException)
{
@@ -327,13 +401,20 @@ namespace IceInternal
{
throw new Ice.SocketException(ex);
}
+ catch(ArgumentException ex)
+ {
+ throw new Ice.SocketException(ex);
+ }
+
if(!udp)
{
try
{
setTcpNoDelay(socket);
+#if !SILVERLIGHT
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, 1);
+#endif
}
catch(SocketException ex)
{
@@ -376,26 +457,31 @@ namespace IceInternal
}
}
- public static void setBlock(Socket socket, bool block)
+ public static void setTcpNoDelay(Socket socket)
{
try
{
- socket.Blocking = block;
+#if SILVERLIGHT
+ socket.NoDelay = true;
+#else
+ socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1);
+#endif
}
- catch(SocketException ex)
+ catch(System.Exception ex)
{
closeSocketNoThrow(socket);
throw new Ice.SocketException(ex);
}
}
- public static void setTcpNoDelay(Socket socket)
+#if !SILVERLIGHT
+ public static void setBlock(Socket socket, bool block)
{
try
{
- socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1);
+ socket.Blocking = block;
}
- catch(System.Exception ex)
+ catch(SocketException ex)
{
closeSocketNoThrow(socket);
throw new Ice.SocketException(ex);
@@ -414,12 +500,17 @@ namespace IceInternal
throw new Ice.SocketException(ex);
}
}
+#endif
public static void setSendBufferSize(Socket socket, int sz)
{
try
{
+#if SILVERLIGHT
+ socket.SendBufferSize = sz;
+#else
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendBuffer, sz);
+#endif
}
catch(SocketException ex)
{
@@ -433,7 +524,11 @@ namespace IceInternal
int sz;
try
{
+#if SILVERLIGHT
+ sz = socket.SendBufferSize;
+#else
sz = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendBuffer);
+#endif
}
catch(SocketException ex)
{
@@ -447,7 +542,11 @@ namespace IceInternal
{
try
{
+#if SILVERLIGHT
+ socket.ReceiveBufferSize = sz;
+#else
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer, sz);
+#endif
}
catch(SocketException ex)
{
@@ -461,7 +560,11 @@ namespace IceInternal
int sz = 0;
try
{
+#if SILVERLIGHT
+ sz = socket.ReceiveBufferSize;
+#else
sz = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer);
+#endif
}
catch(SocketException ex)
{
@@ -471,6 +574,7 @@ namespace IceInternal
return sz;
}
+#if !SILVERLIGHT
public static void setReuseAddress(Socket socket, bool reuse)
{
try
@@ -483,7 +587,7 @@ namespace IceInternal
throw new Ice.SocketException(ex);
}
}
-
+
public static void setMcastGroup(Socket socket, IPAddress group, string iface)
{
try
@@ -496,7 +600,7 @@ namespace IceInternal
ifaceAddr = getInterfaceAddress(iface);
if(ifaceAddr == IPAddress.Any)
{
- ifaceAddr = getAddress(iface, 0, EnableIPv4).Address;
+ ifaceAddr = ((IPEndPoint)getAddress(iface, 0, EnableIPv4)).Address;
}
}
socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership,
@@ -531,11 +635,15 @@ namespace IceInternal
throw new Ice.SocketException(ex);
}
}
-
+#endif
+
public static void setMcastTtl(Socket socket, int ttl, AddressFamily family)
{
try
{
+#if SILVERLIGHT
+ socket.Ttl = (short)ttl;
+#else
if(family == AddressFamily.InterNetwork)
{
socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, ttl);
@@ -544,6 +652,7 @@ namespace IceInternal
{
socket.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.MulticastTimeToLive, ttl);
}
+#endif
}
catch(SocketException ex)
{
@@ -551,7 +660,8 @@ namespace IceInternal
throw new Ice.SocketException(ex);
}
}
-
+
+#if !SILVERLIGHT
public static IPEndPoint doBind(Socket socket, EndPoint addr)
{
try
@@ -585,7 +695,9 @@ namespace IceInternal
throw new Ice.SocketException(ex);
}
}
+#endif
+#if !SILVERLIGHT
public static bool doConnect(Socket fd, EndPoint addr)
{
repeatConnect:
@@ -643,7 +755,6 @@ namespace IceInternal
throw new Ice.ConnectionRefusedException();
}
}
-
return true;
}
@@ -665,7 +776,14 @@ namespace IceInternal
//
IPAddress any = fd.AddressFamily == AddressFamily.InterNetworkV6 ? IPAddress.IPv6Any : IPAddress.Any;
fd.Bind(new IPEndPoint(any, 0));
- return fd.BeginConnect(addr, callback, state);
+ return fd.BeginConnect(addr,
+ delegate(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ callback(result.AsyncState);
+ }
+ }, state);
}
catch(SocketException ex)
{
@@ -691,7 +809,6 @@ namespace IceInternal
// NOTE: It's the caller's responsability to close the socket upon
// failure to connect. The socket isn't closed by this method.
//
-
try
{
fd.EndConnect(result);
@@ -728,63 +845,43 @@ namespace IceInternal
}
}
}
+#endif
- public static IPEndPoint getAddress(string host, int port, int protocol)
+ public static EndPoint getAddress(string host, int port, int protocol)
{
return getAddressImpl(host, port, protocol, false);
}
-
- public static IPEndPoint getAddressForServer(string host, int port, int protocol)
+
+ public static EndPoint getAddressForServer(string host, int port, int protocol)
{
return getAddressImpl(host, port, protocol, true);
}
- public static int compareAddress(IPEndPoint addr1, IPEndPoint addr2)
+ public static List<EndPoint> getAddresses(string host, int port, int protocol)
{
- if(addr1.Port < addr2.Port)
- {
- return -1;
- }
- else if(addr2.Port < addr1.Port)
- {
- return 1;
- }
-
- byte[] larr = addr1.Address.GetAddressBytes();
- byte[] rarr = addr2.Address.GetAddressBytes();
-
- if(larr.Length < rarr.Length)
- {
- return -1;
- }
- else if(rarr.Length < larr.Length)
- {
- return 1;
- }
+ return getAddresses(host, port, protocol, true);
+ }
- for(int i = 0; i < larr.Length; i++)
+ public static List<EndPoint> getAddresses(string host, int port, int protocol, bool blocking)
+ {
+ List<EndPoint> addresses = new List<EndPoint>();
+#if SILVERLIGHT
+ if(host.Length == 0)
{
- if(larr[i] < rarr[i])
+ if(protocol != EnableIPv4)
{
- return -1;
+ addresses.Add(new DnsEndPoint(IPAddress.IPv6Loopback.ToString(), port));
}
- else if(rarr[i] < larr[i])
+ else
{
- return 1;
+ addresses.Add(new DnsEndPoint(IPAddress.Loopback.ToString(), port));
}
}
-
- return 0;
- }
-
- public static List<IPEndPoint> getAddresses(string host, int port, int protocol)
- {
- return getAddresses(host, port, protocol, true);
- }
-
- public static List<IPEndPoint> getAddresses(string host, int port, int protocol, bool blocking)
- {
- List<IPEndPoint> addresses = new List<IPEndPoint>();
+ else
+ {
+ addresses.Add(new DnsEndPoint(host, port));
+ }
+#else
if(host.Length == 0)
{
if(protocol != EnableIPv4)
@@ -796,7 +893,6 @@ namespace IceInternal
{
addresses.Add(new IPEndPoint(IPAddress.Loopback, port));
}
- return addresses;
}
else
{
@@ -826,11 +922,11 @@ namespace IceInternal
}
}
-#if COMPACT
+# if COMPACT
foreach(IPAddress a in Dns.GetHostEntry(host).AddressList)
-#else
+# else
foreach(IPAddress a in Dns.GetHostAddresses(host))
-#endif
+# endif
{
if((a.AddressFamily == AddressFamily.InterNetwork && protocol != EnableIPv6) ||
(a.AddressFamily == AddressFamily.InterNetworkV6 && protocol != EnableIPv4))
@@ -839,9 +935,9 @@ namespace IceInternal
}
}
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
- if(ex.NativeErrorCode == WSATRY_AGAIN && --retry >= 0)
+ if(socketErrorCode(ex) == SocketError.TryAgain && --retry >= 0)
{
goto repeatGetHostByName;
}
@@ -866,21 +962,23 @@ namespace IceInternal
throw e;
}
}
-
+#endif
return addresses;
}
public static IPAddress[] getLocalAddresses(int protocol)
{
- ArrayList addresses;
-
+#if SILVERLIGHT
+ return new List<IPAddress>().ToArray();
+#else
+ List<IPAddress> addresses;
int retry = 5;
- repeatGetHostByName:
+ repeatGetHostByName:
try
{
- addresses = new ArrayList();
-#if !COMPACT
+ addresses = new List<IPAddress>();
+# if !COMPACT
if(AssemblyUtil.runtime_ != AssemblyUtil.Runtime.Mono)
{
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
@@ -902,13 +1000,13 @@ namespace IceInternal
}
}
else
-#endif
+# endif
{
-#if COMPACT
+# if COMPACT
foreach(IPAddress a in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
-#else
+# else
foreach(IPAddress a in Dns.GetHostAddresses(Dns.GetHostName()))
-#endif
+# endif
{
if((a.AddressFamily == AddressFamily.InterNetwork && protocol != EnableIPv6) ||
(a.AddressFamily == AddressFamily.InterNetworkV6 && protocol != EnableIPv4))
@@ -921,9 +1019,9 @@ namespace IceInternal
}
}
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
- if(ex.NativeErrorCode == WSATRY_AGAIN && --retry >= 0)
+ if(socketErrorCode(ex) == SocketError.TryAgain && --retry >= 0)
{
goto repeatGetHostByName;
}
@@ -938,7 +1036,8 @@ namespace IceInternal
throw e;
}
- return (IPAddress[])addresses.ToArray(typeof(IPAddress));
+ return addresses.ToArray();
+#endif
}
public static void
@@ -1053,7 +1152,11 @@ namespace IceInternal
public static string fdLocalAddressToString(Socket socket)
{
System.Text.StringBuilder s = new System.Text.StringBuilder();
- IPEndPoint localEndpoint = getLocalAddress(socket);
+#if SILVERLIGHT
+ // Silverlight Socket doesn't expose the local endpoint
+ s.Append("local address = <not available>");
+#else
+ IPEndPoint localEndpoint = (IPEndPoint)getLocalAddress(socket);
if(localEndpoint == null)
{
// This might occur if connect was not called yet, see also comments in doBeginConnectAsync
@@ -1064,34 +1167,52 @@ namespace IceInternal
s.Append("local address = " + localEndpoint.Address);
s.Append(":" + localEndpoint.Port);
}
+#endif
return s.ToString();
}
public static string
- addressesToString(IPEndPoint localEndpoint, IPEndPoint remoteEndpoint)
+ addressesToString(EndPoint localEndpoint, EndPoint remoteEndpoint)
{
System.Text.StringBuilder s = new System.Text.StringBuilder();
- if(localEndpoint == null)
+#if SILVERLIGHT
+ DnsEndPoint remoteDnsEndPoint = (DnsEndPoint)remoteEndpoint;
+ // Silverlight Socket doesn't expose the local endpoint
+ s.Append("local address = <not available>");
+
+ if(remoteDnsEndPoint == null)
+ {
+ s.Append("\nremote address = <not connected>");
+ }
+ else
+ {
+ s.Append("\nremote address = " + remoteDnsEndPoint.Host);
+ s.Append(":" + remoteDnsEndPoint.Port);
+ }
+#else
+ IPEndPoint localPEndpoint = (IPEndPoint)localEndpoint;
+ IPEndPoint remoteIPEndPoint = (IPEndPoint)remoteEndpoint;
+ if(localPEndpoint == null)
{
// This might occur if connect was not called yet, see also comments in doBeginConnectAsync
s.Append("local address = <not bound>");
}
else
{
- s.Append("local address = " + localEndpoint.Address);
- s.Append(":" + localEndpoint.Port);
+ s.Append("local address = " + localPEndpoint.Address);
+ s.Append(":" + localPEndpoint.Port);
}
- if(remoteEndpoint == null)
+ if(remoteIPEndPoint == null)
{
s.Append("\nremote address = <not connected>");
}
else
{
- s.Append("\nremote address = " + remoteEndpoint.Address);
- s.Append(":" + remoteEndpoint.Port);
+ s.Append("\nremote address = " + remoteIPEndPoint.Address);
+ s.Append(":" + remoteIPEndPoint.Port);
}
-
+#endif
return s.ToString();
}
@@ -1101,28 +1222,31 @@ namespace IceInternal
return addr.ToString();
}
- public static IPEndPoint
+ public static EndPoint
getLocalAddress(Socket socket)
- {
- IPEndPoint localEndpoint;
+ {
+ EndPoint localEndpoint = null;
+ // Silverlight socket doesn't exposes a local endpoint
+#if !SILVERLIGHT
try
{
- localEndpoint = (IPEndPoint)socket.LocalEndPoint;
+ localEndpoint = (EndPoint)socket.LocalEndPoint;
}
catch(SocketException ex)
{
throw new Ice.SocketException(ex);
}
+#endif
return localEndpoint;
}
- public static IPEndPoint
+ public static EndPoint
getRemoteAddress(Socket socket)
{
- IPEndPoint remoteEndpoint = null;
+ EndPoint remoteEndpoint = null;
try
{
- remoteEndpoint = (IPEndPoint)socket.RemoteEndPoint;
+ remoteEndpoint = (EndPoint)socket.RemoteEndPoint;
}
catch(SocketException)
{
@@ -1133,7 +1257,7 @@ namespace IceInternal
private static int
getInterfaceIndex(string name)
{
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
foreach(NetworkInterface ni in nics)
{
@@ -1154,7 +1278,7 @@ namespace IceInternal
private static IPAddress
getInterfaceAddress(string name)
{
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
foreach(NetworkInterface ni in nics)
{
@@ -1174,5 +1298,39 @@ namespace IceInternal
#endif
return IPAddress.Any;
}
+
+ public static string
+ endpointAddressToString(EndPoint endpoint)
+ {
+ System.Text.StringBuilder s = new System.Text.StringBuilder();
+ if(endpoint != null)
+ {
+#if SILVERLIGHT
+ DnsEndPoint dnsEndpoint = (DnsEndPoint) endpoint;
+ s.Append(dnsEndpoint.Host);
+#else
+ IPEndPoint ipEndpoint = (IPEndPoint) endpoint;
+ s.Append(ipEndpoint.Address.ToString());
+#endif
+ }
+ return s.ToString();
+ }
+
+ public static int
+ endpointPort(EndPoint endpoint)
+ {
+ int port = -1;
+ if(endpoint != null)
+ {
+#if SILVERLIGHT
+ DnsEndPoint dnsEndpoint = (DnsEndPoint) endpoint;
+ port = dnsEndpoint.Port;
+#else
+ IPEndPoint ipEndpoint = (IPEndPoint) endpoint;
+ port = ipEndpoint.Port;
+#endif
+ }
+ return port;
+ }
}
}
diff --git a/cs/src/Ice/Object.cs b/cs/src/Ice/Object.cs
index 8159aeed3ef..e251b233cdb 100644
--- a/cs/src/Ice/Object.cs
+++ b/cs/src/Ice/Object.cs
@@ -62,7 +62,7 @@ namespace Ice
/// <summary>
/// the base interface for servants.
/// </summary>
- public interface Object : System.ICloneable
+ public interface Object : System.ICloneable
{
/// <summary>
/// This method is deprecated. Use GetHashCode instead.
diff --git a/cs/src/Ice/ObjectFactoryManager.cs b/cs/src/Ice/ObjectFactoryManager.cs
index d09ca4b1c3e..8c3970b87b0 100644
--- a/cs/src/Ice/ObjectFactoryManager.cs
+++ b/cs/src/Ice/ObjectFactoryManager.cs
@@ -10,7 +10,7 @@
namespace IceInternal
{
- using System.Collections;
+ using System.Collections.Generic;
public sealed class ObjectFactoryManager
{
@@ -18,8 +18,7 @@ namespace IceInternal
{
lock(this)
{
- object o = _factoryMap[id];
- if(o != null)
+ if(_factoryMap.ContainsKey(id))
{
Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException();
ex.id = id;
@@ -35,8 +34,7 @@ namespace IceInternal
object o = null;
lock(this)
{
- o = _factoryMap[id];
- if(o == null)
+ if(!_factoryMap.ContainsKey(id))
{
Ice.NotRegisteredException ex = new Ice.NotRegisteredException();
ex.id = id;
@@ -52,7 +50,9 @@ namespace IceInternal
{
lock(this)
{
- return (Ice.ObjectFactory)_factoryMap[id];
+ Ice.ObjectFactory factory = null;
+ _factoryMap.TryGetValue(id, out factory);
+ return factory;
}
}
@@ -61,17 +61,17 @@ namespace IceInternal
//
internal ObjectFactoryManager()
{
- _factoryMap = new Hashtable();
+ _factoryMap = new Dictionary<string, Ice.ObjectFactory>();
}
internal void destroy()
{
- Hashtable oldMap = null;
+ Dictionary<string, Ice.ObjectFactory> oldMap = null;
lock(this)
{
oldMap = _factoryMap;
- _factoryMap = new Hashtable();
+ _factoryMap = new Dictionary<string, Ice.ObjectFactory>();
}
foreach(Ice.ObjectFactory factory in oldMap.Values)
@@ -80,7 +80,7 @@ namespace IceInternal
}
}
- private Hashtable _factoryMap;
+ private Dictionary<string, Ice.ObjectFactory> _factoryMap;
}
}
diff --git a/cs/src/Ice/Options.cs b/cs/src/Ice/Options.cs
index 46b9b2b15ad..8424e8651ac 100644
--- a/cs/src/Ice/Options.cs
+++ b/cs/src/Ice/Options.cs
@@ -7,7 +7,7 @@
//
// **********************************************************************
-using System.Collections;
+using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
@@ -38,7 +38,7 @@ namespace IceUtilInternal
State state = State.Normal;
string arg = "";
- ArrayList vec = new ArrayList();
+ List<string> vec = new List<string>();
for(int i = 0; i < l.Length; ++i)
{
@@ -400,7 +400,7 @@ namespace IceUtilInternal
}
}
- return (string[])vec.ToArray(typeof(string));
+ return (string[])vec.ToArray();
}
}
}
diff --git a/cs/src/Ice/OutgoingAsync.cs b/cs/src/Ice/OutgoingAsync.cs
index 978bcae8ac1..56532af2dee 100644
--- a/cs/src/Ice/OutgoingAsync.cs
+++ b/cs/src/Ice/OutgoingAsync.cs
@@ -257,7 +257,11 @@ namespace IceInternal
{
if(waitHandle_ == null)
{
+#if SILVERLIGHT
+ waitHandle_ = new ManualResetEvent(false);
+#else
waitHandle_ = new EventWaitHandle(false, EventResetMode.ManualReset);
+#endif
}
if((state_ & Done) != 0)
{
diff --git a/cs/src/Ice/OutputBase.cs b/cs/src/Ice/OutputBase.cs
index 038cbeffaa8..7e2f9e02ed4 100644
--- a/cs/src/Ice/OutputBase.cs
+++ b/cs/src/Ice/OutputBase.cs
@@ -10,7 +10,7 @@
namespace IceUtilInternal
{
-using System.Collections;
+using System.Collections.Generic;
using System.IO;
using System.Diagnostics;
@@ -24,7 +24,7 @@ public class OutputBase
indent_ = 0;
indentSize_ = 4;
useTab_ = true;
- indentSave_ = new Stack();
+ indentSave_ = new Stack<int>();
separator_ = true;
}
@@ -36,7 +36,7 @@ public class OutputBase
indent_ = 0;
indentSize_ = 4;
useTab_ = true;
- indentSave_ = new Stack();
+ indentSave_ = new Stack<int>();
separator_ = true;
}
@@ -48,7 +48,7 @@ public class OutputBase
indent_ = 0;
indentSize_ = 4;
useTab_ = true;
- indentSave_ = new Stack();
+ indentSave_ = new Stack<int>();
separator_ = true;
}
@@ -185,7 +185,7 @@ public class OutputBase
protected internal int pos_;
protected internal int indent_;
protected internal int indentSize_;
- protected internal Stack indentSave_;
+ protected internal Stack<int> indentSave_;
protected internal bool useTab_;
protected internal bool separator_;
}
diff --git a/cs/src/Ice/PluginManagerI.cs b/cs/src/Ice/PluginManagerI.cs
index 081d6d7083a..9e128ebf71d 100644
--- a/cs/src/Ice/PluginManagerI.cs
+++ b/cs/src/Ice/PluginManagerI.cs
@@ -7,6 +7,7 @@
//
// **********************************************************************
+#if !SILVERLIGHT
namespace Ice
{
using System;
@@ -518,3 +519,4 @@ namespace Ice
private static bool _sslWarnOnce = false;
}
}
+#endif
diff --git a/cs/src/Ice/PropertiesI.cs b/cs/src/Ice/PropertiesI.cs
index a514a048123..ac6736b59ba 100644
--- a/cs/src/Ice/PropertiesI.cs
+++ b/cs/src/Ice/PropertiesI.cs
@@ -42,8 +42,8 @@ namespace Ice
lock(this)
{
string result = "";
- PropertyValue pv = (PropertyValue)_properties[key];
- if(pv != null)
+ PropertyValue pv;
+ if(_properties.TryGetValue(key, out pv))
{
pv.used = true;
result = pv.val;
@@ -57,8 +57,8 @@ namespace Ice
lock(this)
{
string result = val;
- PropertyValue pv = (PropertyValue)_properties[key];
- if(pv != null)
+ PropertyValue pv;
+ if(_properties.TryGetValue(key, out pv))
{
pv.used = true;
result = pv.val;
@@ -76,24 +76,21 @@ namespace Ice
{
lock(this)
{
- PropertyValue pv = (PropertyValue)_properties[key];
- if(pv == null)
+ PropertyValue pv;
+ if(!_properties.TryGetValue(key, out pv))
{
- return val;
+ return val;
}
- else
+ pv.used = true;
+ try
{
- pv.used = true;
- try
- {
- return System.Int32.Parse(pv.val, CultureInfo.InvariantCulture);
- }
- catch(System.FormatException)
- {
- Ice.Util.getProcessLogger().warning("numeric property " + key +
- " set to non-numeric value, defaulting to " + val);
- return val;
- }
+ return System.Int32.Parse(pv.val, CultureInfo.InvariantCulture);
+ }
+ catch(System.FormatException)
+ {
+ Ice.Util.getProcessLogger().warning("numeric property " + key +
+ " set to non-numeric value, defaulting to " + val);
+ return val;
}
}
}
@@ -112,26 +109,24 @@ namespace Ice
lock(this)
{
- PropertyValue pv = (PropertyValue)_properties[key];
- if(pv == null)
+ PropertyValue pv;
+ if(!_properties.TryGetValue(key, out pv))
+ {
+ return val;
+ }
+
+ pv.used = true;
+
+ string[] result = IceUtilInternal.StringUtil.splitString(pv.val, ", \t\r\n");
+ if(result == null)
{
+ Ice.Util.getProcessLogger().warning("mismatched quotes in property " + key
+ + "'s value, returning default value");
return val;
}
else
{
- pv.used = true;
-
- string[] result = IceUtilInternal.StringUtil.splitString(pv.val, ", \t\r\n");
- if(result == null)
- {
- Ice.Util.getProcessLogger().warning("mismatched quotes in property " + key
- + "'s value, returning default value");
- return val;
- }
- else
- {
- return result;
- }
+ return result;
}
}
}
@@ -219,8 +214,8 @@ namespace Ice
//
if(val != null && val.Length > 0)
{
- PropertyValue pv = (PropertyValue)_properties[key];
- if(pv != null)
+ PropertyValue pv;
+ if(_properties.TryGetValue(key, out pv))
{
pv.val = val;
}
@@ -243,9 +238,9 @@ namespace Ice
{
string[] result = new string[_properties.Count];
int i = 0;
- foreach(DictionaryEntry entry in _properties)
+ foreach(KeyValuePair<string, PropertyValue> entry in _properties)
{
- result[i++] = "--" + entry.Key + "=" + ((PropertyValue)entry.Value).val;
+ result[i++] = "--" + entry.Key + "=" + entry.Value.val;
}
return result;
}
@@ -259,7 +254,7 @@ namespace Ice
}
pfx = "--" + pfx;
- ArrayList result = new ArrayList();
+ List<string> result = new List<string>();
for(int i = 0; i < options.Length; i++)
{
string opt = options[i];
@@ -297,6 +292,7 @@ namespace Ice
public void load(string file)
{
+#if !SILVERLIGHT
if(IceInternal.AssemblyUtil.platform_ == IceInternal.AssemblyUtil.Platform.Windows &&
(file.StartsWith("HKLM\\", StringComparison.Ordinal)))
{
@@ -319,6 +315,7 @@ namespace Ice
}
else
{
+#endif
try
{
using(System.IO.StreamReader sr = new System.IO.StreamReader(file))
@@ -332,7 +329,9 @@ namespace Ice
fe.path = file;
throw fe;
}
+#if !SILVERLIGHT
}
+#endif
}
public Properties ice_clone_()
@@ -342,15 +341,15 @@ namespace Ice
return new PropertiesI(this);
}
}
-
- public ArrayList getUnusedProperties()
+
+ public List<string> getUnusedProperties()
{
lock(this)
{
- ArrayList unused = new ArrayList();
- foreach(DictionaryEntry entry in _properties)
+ List<string> unused = new List<string>();
+ foreach(KeyValuePair<string, PropertyValue> entry in _properties)
{
- if(!((PropertyValue)entry.Value).used)
+ if(!entry.Value.used)
{
unused.Add(entry.Key);
}
@@ -361,37 +360,33 @@ namespace Ice
internal PropertiesI(PropertiesI p)
{
- _properties = new Hashtable();
- foreach(DictionaryEntry entry in p._properties)
- {
- _properties[entry.Key] = new PropertyValue((PropertyValue)entry.Value);
- }
+ _properties = new Dictionary<string, PropertyValue>(p._properties);
}
internal PropertiesI()
{
- _properties = new Hashtable();
+ _properties = new Dictionary<string, PropertyValue>();
}
internal PropertiesI(ref string[] args, Properties defaults)
{
if(defaults == null)
{
- _properties = new Hashtable();
+ _properties = new Dictionary<string, PropertyValue>();
}
else
{
_properties = ((PropertiesI)defaults)._properties;
}
- PropertyValue pv = (PropertyValue)_properties["Ice.ProgramName"];
- if(pv == null)
+ PropertyValue pv;
+ if(_properties.TryGetValue("Ice.ProgramName", out pv))
{
- _properties["Ice.ProgramName"] = new PropertyValue(System.AppDomain.CurrentDomain.FriendlyName, true);
+ pv.used = true;
}
else
{
- pv.used = true;
+ _properties["Ice.ProgramName"] = new PropertyValue(System.AppDomain.CurrentDomain.FriendlyName, true);
}
bool loadConfigFiles = false;
@@ -423,7 +418,7 @@ namespace Ice
//
// If Ice.Config is not set, load from ICE_CONFIG (if set)
//
- loadConfigFiles = (_properties["Ice.Config"] == null);
+ loadConfigFiles = !_properties.ContainsKey("Ice.Config");
}
if(loadConfigFiles)
@@ -626,7 +621,7 @@ namespace Ice
{
string val = getProperty("Ice.Config");
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
if(val.Length == 0 || val.Equals("1"))
{
string s = System.Environment.GetEnvironmentVariable("ICE_CONFIG");
@@ -650,6 +645,6 @@ namespace Ice
_properties["Ice.Config"] = new PropertyValue(val, true);
}
- private Hashtable _properties;
+ private Dictionary<string, PropertyValue> _properties;
}
}
diff --git a/cs/src/Ice/ProtocolPluginFacade.cs b/cs/src/Ice/ProtocolPluginFacade.cs
index adac4589b59..27c8a3b268e 100644
--- a/cs/src/Ice/ProtocolPluginFacade.cs
+++ b/cs/src/Ice/ProtocolPluginFacade.cs
@@ -17,11 +17,12 @@ namespace IceInternal
//
Ice.Communicator getCommunicator();
+#if !SILVERLIGHT
//
// Get the endpoint host resolver.
//
IceInternal.EndpointHostResolver getEndpointHostResolver();
-
+#endif
//
// Get the protocol support.
//
@@ -71,6 +72,7 @@ namespace IceInternal
return _communicator;
}
+#if !SILVERLIGHT
//
// Get the endpoint host resolver.
//
@@ -78,6 +80,7 @@ namespace IceInternal
{
return _instance.endpointHostResolver();
}
+#endif
//
// Get the protocol support.
diff --git a/cs/src/Ice/Reference.cs b/cs/src/Ice/Reference.cs
index 7d5759f2838..c52bfa90a6e 100644
--- a/cs/src/Ice/Reference.cs
+++ b/cs/src/Ice/Reference.cs
@@ -1360,7 +1360,7 @@ namespace IceInternal
private EndpointI[] filterEndpoints(EndpointI[] allEndpoints)
{
- ArrayList endpoints = new ArrayList();
+ List<EndpointI> endpoints = new List<EndpointI>();
//
// Filter out unknown endpoints.
@@ -1385,7 +1385,7 @@ namespace IceInternal
//
// Filter out datagram endpoints.
//
- ArrayList tmp = new ArrayList();
+ List<EndpointI> tmp = new List<EndpointI>();
foreach(EndpointI endpoint in endpoints)
{
if(!endpoint.datagram())
@@ -1403,7 +1403,7 @@ namespace IceInternal
//
// Filter out non-datagram endpoints.
//
- ArrayList tmp = new ArrayList();
+ List<EndpointI> tmp = new List<EndpointI>();
foreach(EndpointI endpoint in endpoints)
{
if(endpoint.datagram())
@@ -1431,7 +1431,7 @@ namespace IceInternal
Debug.Assert(r >= i && r < endpoints.Count);
if(r != i)
{
- object tmp = endpoints[i];
+ EndpointI tmp = endpoints[i];
endpoints[i] = endpoints[r];
endpoints[r] = tmp;
}
@@ -1461,7 +1461,7 @@ namespace IceInternal
DefaultsAndOverrides overrides = getInstance().defaultsAndOverrides();
if(overrides.overrideSecure ? overrides.overrideSecureValue : getSecure())
{
- ArrayList tmp = new ArrayList();
+ List<EndpointI> tmp = new List<EndpointI>();
foreach(EndpointI endpoint in endpoints)
{
if(endpoint.secure())
@@ -1473,11 +1473,11 @@ namespace IceInternal
}
else if(getPreferSecure())
{
- IceUtilInternal.Arrays.Sort(ref endpoints, _preferSecureEndpointComparator);
+ Sort(ref endpoints, _preferSecureEndpointComparator);
}
else
{
- IceUtilInternal.Arrays.Sort(ref endpoints, _preferNonSecureEndpointComparator);
+ Sort(ref endpoints, _preferNonSecureEndpointComparator);
}
EndpointI[] arr = new EndpointI[endpoints.Count];
@@ -1642,17 +1642,15 @@ namespace IceInternal
}
}
- private class EndpointComparator : IComparer
+ private class EndpointComparator : IComparer<IceInternal.EndpointI>
{
public EndpointComparator(bool preferSecure)
{
_preferSecure = preferSecure;
}
- public int Compare(object l, object r)
+ public int Compare(IceInternal.EndpointI le, IceInternal.EndpointI re)
{
- IceInternal.EndpointI le = (IceInternal.EndpointI)l;
- IceInternal.EndpointI re = (IceInternal.EndpointI)r;
bool ls = le.secure();
bool rs = re.secure();
if((ls && rs) || (!ls && !rs))
@@ -1685,6 +1683,63 @@ namespace IceInternal
private bool _preferSecure;
}
+
+ private static void Sort(ref List<IceInternal.EndpointI> array, IComparer<IceInternal.EndpointI> comparator)
+ {
+ //
+ // This Sort method implements the merge sort algorithm
+ // which is a stable sort (unlike the Sort method of the
+ // System.Collections.ArrayList which is unstable).
+ //
+ Sort1(ref array, 0, array.Count, comparator);
+ }
+
+ private static void Sort1(ref List<IceInternal.EndpointI> array, int begin, int end, IComparer<IceInternal.EndpointI> comparator)
+ {
+ int mid;
+ if(end - begin <= 1)
+ {
+ return;
+ }
+
+ mid = (begin + end) / 2;
+ Sort1(ref array, begin, mid, comparator);
+ Sort1(ref array, mid, end, comparator);
+ Merge(ref array, begin, mid, end, comparator);
+ }
+
+ private static void Merge(ref List<IceInternal.EndpointI> array, int begin, int mid, int end, IComparer<IceInternal.EndpointI> comparator)
+ {
+ int i = begin;
+ int j = mid;
+ int k = 0;
+
+ IceInternal.EndpointI[] tmp = new IceInternal.EndpointI[end - begin];
+ while(i < mid && j < end)
+ {
+ if(comparator.Compare(array[i], array[j]) <= 0)
+ {
+ tmp[k++] = array[i++];
+ }
+ else
+ {
+ tmp[k++] = array[j++];
+ }
+ }
+
+ while(i < mid)
+ {
+ tmp[k++] = array[i++];
+ }
+ while(j < end)
+ {
+ tmp[k++] = array[j++];
+ }
+ for(i = 0; i < (end - begin); ++i)
+ {
+ array[begin + i] = tmp[i];
+ }
+ }
private static EndpointComparator _preferNonSecureEndpointComparator = new EndpointComparator(false);
private static EndpointComparator _preferSecureEndpointComparator = new EndpointComparator(true);
diff --git a/cs/src/Ice/ReferenceFactory.cs b/cs/src/Ice/ReferenceFactory.cs
index d01b5bb420c..b1b03ecc17e 100644
--- a/cs/src/Ice/ReferenceFactory.cs
+++ b/cs/src/Ice/ReferenceFactory.cs
@@ -353,11 +353,11 @@ namespace IceInternal
return create(ident, facet, mode, secure, null, null, propertyPrefix);
}
- ArrayList endpoints = new ArrayList();
+ List<EndpointI> endpoints = new List<EndpointI>();
if(s[beg] == ':')
{
- ArrayList unknownEndpoints = new ArrayList();
+ List<string> unknownEndpoints = new List<string>();
end = beg;
while(end < s.Length && s[end] == ':')
@@ -440,7 +440,7 @@ namespace IceInternal
instance_.initializationData().logger.warning(msg.ToString());
}
- EndpointI[] ep = (EndpointI[])endpoints.ToArray(typeof(EndpointI));
+ EndpointI[] ep = endpoints.ToArray();
return create(ident, facet, mode, secure, ep, null, propertyPrefix);
}
else if(s[beg] == '@')
@@ -629,13 +629,17 @@ namespace IceInternal
// set.
//
WeakReference w = new WeakReference(@ref);
- WeakReference val = (WeakReference)_references[w];
- if(val != null)
+ object v;
+ if(_references.TryGetValue(w, out v))
{
- Reference r = (Reference)val.Target;
- if(r != null && r.Equals(@ref))
+ WeakReference val = (WeakReference)v;
+ if(val != null)
{
- return r;
+ Reference r = (Reference)val.Target;
+ if(r != null && r.Equals(@ref))
+ {
+ return r;
+ }
}
}
_references[w] = w;
@@ -668,7 +672,7 @@ namespace IceInternal
}
}
- ArrayList unknownProps = new ArrayList();
+ List<string> unknownProps = new List<string>();
Dictionary<string, string> props
= instance_.initializationData().properties.getPropertiesForPrefix(prefix + ".");
foreach(String prop in props.Keys)
@@ -820,7 +824,7 @@ namespace IceInternal
private Ice.Communicator _communicator;
private Ice.RouterPrx _defaultRouter;
private Ice.LocatorPrx _defaultLocator;
- private Hashtable _references = new Hashtable();
+ private Dictionary<Object, Object> _references = new Dictionary<Object, Object>();
}
}
diff --git a/cs/src/Ice/SliceChecksums.cs b/cs/src/Ice/SliceChecksums.cs
index d4f63cb24db..b72d38ca32e 100644
--- a/cs/src/Ice/SliceChecksums.cs
+++ b/cs/src/Ice/SliceChecksums.cs
@@ -19,7 +19,7 @@ namespace Ice
{
public static Dictionary<string, string> checksums = new Dictionary<string, string>();
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
static SliceChecksums()
{
Type[] types = IceInternal.AssemblyUtil.findTypesWithPrefix("IceInternal.SliceChecksums");
diff --git a/cs/src/Ice/SysLoggerI.cs b/cs/src/Ice/SysLoggerI.cs
index 1354af063fa..71aee38c187 100644
--- a/cs/src/Ice/SysLoggerI.cs
+++ b/cs/src/Ice/SysLoggerI.cs
@@ -7,6 +7,7 @@
//
// **********************************************************************
+#if !SILVERLIGHT
using System.Net.Sockets;
namespace Ice
@@ -120,8 +121,8 @@ namespace Ice
//
try
{
- _host = IceInternal.Network.getAddress(System.Net.Dns.GetHostName(), _port,
- IceInternal.Network.EnableBoth).Address;
+ _host = ((System.Net.IPEndPoint)IceInternal.Network.getAddress(System.Net.Dns.GetHostName(), _port,
+ IceInternal.Network.EnableBoth)).Address;
_socket = new UdpClient();
_socket.Connect(_host, _port);
}
@@ -225,3 +226,4 @@ namespace Ice
}
}
+#endif
diff --git a/cs/src/Ice/TcpAcceptor.cs b/cs/src/Ice/TcpAcceptor.cs
index 21a1d58be34..d997ca8c5ff 100644
--- a/cs/src/Ice/TcpAcceptor.cs
+++ b/cs/src/Ice/TcpAcceptor.cs
@@ -7,6 +7,8 @@
//
// **********************************************************************
+#if !SILVERLIGHT
+
namespace IceInternal
{
@@ -57,7 +59,13 @@ namespace IceInternal
{
try
{
- _result = _fd.BeginAccept(callback, state);
+ _result = _fd.BeginAccept(delegate(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ callback(result.AsyncState);
+ }
+ }, state);
}
catch(SocketException ex)
{
@@ -90,9 +98,9 @@ namespace IceInternal
}
Network.setBlock(_acceptFd, false);
-#if !COMPACT
+# if !COMPACT
Network.setTcpBufSize(_acceptFd, instance_.initializationData().properties, _logger);
-#endif
+# endif
if(_traceLevels.network >= 1)
{
@@ -125,12 +133,12 @@ namespace IceInternal
try
{
- _addr = Network.getAddressForServer(host, port, instance_.protocolSupport());
+ _addr = (IPEndPoint)Network.getAddressForServer(host, port, instance_.protocolSupport());
_fd = Network.createSocket(false, _addr.AddressFamily);
Network.setBlock(_fd, false);
-#if !COMPACT
+# if !COMPACT
Network.setTcpBufSize(_fd, instance_.initializationData().properties, _logger);
-#endif
+# endif
if(AssemblyUtil.platform_ != AssemblyUtil.Platform.Windows)
{
//
@@ -172,5 +180,5 @@ namespace IceInternal
private IPEndPoint _addr;
private IAsyncResult _result;
}
-
}
+#endif
diff --git a/cs/src/Ice/TcpConnector.cs b/cs/src/Ice/TcpConnector.cs
index 7045e258ebd..8af5f967246 100644
--- a/cs/src/Ice/TcpConnector.cs
+++ b/cs/src/Ice/TcpConnector.cs
@@ -28,8 +28,13 @@ namespace IceInternal
try
{
+
+#if SILVERLIGHT
+ Socket fd = Network.createSocket(false, AddressFamily.InterNetwork);
+#else
Socket fd = Network.createSocket(false, _addr.AddressFamily);
Network.setBlock(fd, false);
+#endif
#if !COMPACT
Network.setTcpBufSize(fd, _instance.initializationData().properties, _logger);
#endif
@@ -58,12 +63,16 @@ namespace IceInternal
//
// Only for use by TcpEndpoint
//
- internal TcpConnector(Instance instance, IPEndPoint addr, int timeout, string connectionId)
+ internal TcpConnector(Instance instance, EndPoint addr, int timeout, string connectionId)
{
_instance = instance;
_traceLevels = instance.traceLevels();
_logger = instance.initializationData().logger;
- _addr = addr;
+#if SILVERLIGHT
+ _addr = (DnsEndPoint)addr;
+#else
+ _addr = (IPEndPoint)addr;
+#endif
_timeout = timeout;
_connectionId = connectionId;
@@ -100,7 +109,7 @@ namespace IceInternal
return false;
}
- return Network.compareAddress(_addr, p._addr) == 0;
+ return _addr.Equals(p._addr);
}
public override string ToString()
@@ -116,7 +125,11 @@ namespace IceInternal
private Instance _instance;
private TraceLevels _traceLevels;
private Ice.Logger _logger;
+#if SILVERLIGHT
+ private DnsEndPoint _addr;
+#else
private IPEndPoint _addr;
+#endif
private int _timeout;
private string _connectionId;
private int _hashCode;
diff --git a/cs/src/Ice/TcpEndpointI.cs b/cs/src/Ice/TcpEndpointI.cs
index 6012874b68e..42150007914 100644
--- a/cs/src/Ice/TcpEndpointI.cs
+++ b/cs/src/Ice/TcpEndpointI.cs
@@ -391,11 +391,17 @@ namespace IceInternal
return connectors(Network.getAddresses(_host, _port, _instance.protocolSupport()));
}
+
public override void connectors_async(EndpointI_connectors callback)
{
+#if SILVERLIGHT
+ callback.connectors(connectors());
+#else
_instance.endpointHostResolver().resolve(_host, _port, this, callback);
+#endif
}
+
//
// Return an acceptor for this endpoint, or null if no acceptors
// is available. In case an acceptor is created, this operation
@@ -405,9 +411,13 @@ namespace IceInternal
//
public override Acceptor acceptor(ref EndpointI endpoint, string adapterName)
{
+#if SILVERLIGHT
+ throw new Ice.FeatureNotSupportedException("server endpoint not supported for `" + ToString() + "'");
+#else
TcpAcceptor p = new TcpAcceptor(_instance, _host, _port);
endpoint = new TcpEndpointI(_instance, _host, p.effectivePort(), _timeout, _connectionId, _compress);
return p;
+#endif
}
//
@@ -449,10 +459,10 @@ namespace IceInternal
return tcpEndpointI._host.Equals(_host) && tcpEndpointI._port == _port;
}
- public override List<Connector> connectors(List<IPEndPoint> addresses)
+ public override List<Connector> connectors(List<EndPoint> addresses)
{
List<Connector> connectors = new List<Connector>();
- foreach(IPEndPoint addr in addresses)
+ foreach(EndPoint addr in addresses)
{
connectors.Add(new TcpConnector(_instance, addr, _timeout, _connectionId));
}
diff --git a/cs/src/Ice/TcpTransceiver.cs b/cs/src/Ice/TcpTransceiver.cs
index c7210b1d37b..dab6897e12f 100644
--- a/cs/src/Ice/TcpTransceiver.cs
+++ b/cs/src/Ice/TcpTransceiver.cs
@@ -29,8 +29,23 @@ namespace IceInternal
{
try
{
+#if SILVERLIGHT
+ if(_writeEventArgs.SocketError != SocketError.Success)
+ {
+ SocketException ex = new SocketException((int)_writeEventArgs.SocketError);
+ if(Network.connectionRefused(ex))
+ {
+ throw new Ice.ConnectionRefusedException(ex);
+ }
+ else
+ {
+ throw new Ice.ConnectFailedException(ex);
+ }
+ }
+#else
Network.doFinishConnectAsync(_fd, _writeResult);
_writeResult = null;
+#endif
_state = StateConnected;
_desc = Network.fdToString(_fd);
}
@@ -88,9 +103,9 @@ namespace IceInternal
public bool write(Buffer buf)
{
-#if COMPACT
+#if COMPACT || SILVERLIGHT
//
- // The Compact Framework does not support the use of synchronous socket
+ // Silverlight and the Compact .NET Frameworks don't support the use of synchronous socket
// operations on a non-blocking socket. Returning false here forces the
// caller to schedule an asynchronous operation.
//
@@ -128,7 +143,7 @@ namespace IceInternal
{
ret = _fd.Send(buf.b.rawBytes(), buf.b.position(), packetSize, SocketFlags.None);
}
- catch(Win32Exception e)
+ catch(SocketException e)
{
if(Network.wouldBlock(e))
{
@@ -173,9 +188,9 @@ namespace IceInternal
public bool read(Buffer buf)
{
-#if COMPACT
+#if COMPACT || SILVERLIGHT
//
- // The .NET Compact Framework does not support the use of synchronous socket
+ // Silverlight and the Compact .NET Framework don't support the use of synchronous socket
// operations on a non-blocking socket.
//
return false;
@@ -211,7 +226,7 @@ namespace IceInternal
throw new Ice.ConnectionLostException();
}
}
- catch(Win32Exception e)
+ catch(SocketException e)
{
if(Network.wouldBlock(e))
{
@@ -236,7 +251,7 @@ namespace IceInternal
remaining -= ret;
buf.b.position(position += ret);
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
//
// On Mono, calling shutdownReadWrite() followed by read() causes Socket.Receive() to
@@ -268,8 +283,13 @@ namespace IceInternal
public bool startRead(Buffer buf, AsyncCallback callback, object state)
{
+#if SILVERLIGHT
+ Debug.Assert(_fd != null && _readEventArgs != null);
+#else
Debug.Assert(_fd != null && _readResult == null);
+#endif
+#if !COMPACT && !SILVERLIGHT
// COMPILERFIX: Workaround for Mac OS X broken poll(), see Mono bug #470120
if(AssemblyUtil.osx_)
{
@@ -278,6 +298,7 @@ namespace IceInternal
Network.setBlock(_fd, true);
}
}
+#endif
int packetSize = buf.b.remaining();
if(_maxReceivePacketSize > 0 && packetSize > _maxReceivePacketSize)
@@ -287,10 +308,18 @@ namespace IceInternal
try
{
- _readResult = _fd.BeginReceive(buf.b.rawBytes(), buf.b.position(), packetSize, SocketFlags.None,
- callback, state);
+ _readCallback = callback;
+#if SILVERLIGHT
+ _readEventArgs.UserToken = state;
+ _readEventArgs.SetBuffer(buf.b.rawBytes(), buf.b.position(), packetSize);
+ return !_fd.ReceiveAsync(_readEventArgs);
+#else
+ _readResult = _fd.BeginReceive(buf.b.rawBytes(), buf.b.position(), packetSize, SocketFlags.None,
+ readCompleted, state);
+ return _readResult.CompletedSynchronously;
+#endif
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.connectionLost(ex))
{
@@ -299,29 +328,43 @@ namespace IceInternal
throw new Ice.SocketException(ex);
}
-
- return _readResult.CompletedSynchronously;
}
public void finishRead(Buffer buf)
{
if(_fd == null) // Transceiver was closed
+#if SILVERLIGHT
+ {
+ _readEventArgs = null;
+ return;
+ }
+ Debug.Assert(_fd != null && _readEventArgs != null);
+#else
{
_readResult = null;
return;
}
-
Debug.Assert(_fd != null && _readResult != null);
+#endif
try
{
+#if SILVERLIGHT
+ if(_readEventArgs.SocketError != SocketError.Success)
+ {
+ throw new SocketException((int)_readEventArgs.SocketError);
+ }
+ int ret = _readEventArgs.BytesTransferred;
+#else
int ret = _fd.EndReceive(_readResult);
_readResult = null;
+#endif
if(ret == 0)
{
throw new Ice.ConnectionLostException();
}
+#if !COMPACT && !SILVERLIGHT
// COMPILERFIX: Workaround for Mac OS X broken poll(), see Mono bug #470120
if(AssemblyUtil.osx_)
{
@@ -330,6 +373,7 @@ namespace IceInternal
Network.setBlock(_fd, false);
}
}
+#endif
Debug.Assert(ret > 0);
if(_traceLevels.network >= 3)
@@ -350,7 +394,7 @@ namespace IceInternal
buf.b.position(buf.b.position() + ret);
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.connectionLost(ex))
{
@@ -367,8 +411,13 @@ namespace IceInternal
public bool startWrite(Buffer buf, AsyncCallback callback, object state, out bool completed)
{
+#if SILVERLIGHT
+ Debug.Assert(_fd != null && _writeEventArgs != null);
+#else
Debug.Assert(_fd != null && _writeResult == null);
+#endif
+#if !COMPACT && !SILVERLIGHT
// COMPILERFIX: Workaround for Mac OS X broken poll(), see Mono bug #470120
if(AssemblyUtil.osx_)
{
@@ -377,12 +426,19 @@ namespace IceInternal
Network.setBlock(_fd, true);
}
}
+#endif
if(_state < StateConnected)
{
- _writeResult = Network.doConnectAsync(_fd, _addr, callback, state);
completed = false;
+ _writeCallback = callback;
+#if SILVERLIGHT
+ _writeEventArgs.UserToken = state;
+ return !_fd.ConnectAsync(_writeEventArgs);
+#else
+ _writeResult = Network.doConnectAsync(_fd, _addr, callback, state);
return _writeResult.CompletedSynchronously;
+#endif
}
//
@@ -397,10 +453,20 @@ namespace IceInternal
try
{
+ _writeCallback = callback;
+#if SILVERLIGHT
+ _writeEventArgs.UserToken = state;
+ _writeEventArgs.SetBuffer(buf.b.rawBytes(), buf.b.position(), packetSize);
+ bool completedSynchronously = !_fd.SendAsync(_writeEventArgs);
+#else
_writeResult = _fd.BeginSend(buf.b.rawBytes(), buf.b.position(), packetSize, SocketFlags.None,
- callback, state);
+ writeCompleted, state);
+ bool completedSynchronously = _writeResult.CompletedSynchronously;
+#endif
+ completed = packetSize == buf.b.remaining();
+ return completedSynchronously;
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.connectionLost(ex))
{
@@ -413,9 +479,6 @@ namespace IceInternal
{
throw new Ice.ConnectionLostException(ex);
}
-
- completed = packetSize == buf.b.remaining();
- return _writeResult.CompletedSynchronously;
}
public void finishWrite(Buffer buf)
@@ -426,11 +489,19 @@ namespace IceInternal
{
buf.b.position(buf.size()); // Assume all the data was sent for at-most-once semantics.
}
+#if SILVERLIGHT
+ _writeEventArgs = null;
+#else
_writeResult = null;
+#endif
return;
}
+#if SILVERLIGHT
+ Debug.Assert(_fd != null && _writeEventArgs != null);
+#else
Debug.Assert(_fd != null && _writeResult != null);
+#endif
if(_state < StateConnected)
{
@@ -439,14 +510,23 @@ namespace IceInternal
try
{
+#if SILVERLIGHT
+ if(_writeEventArgs.SocketError != SocketError.Success)
+ {
+ throw new SocketException((int)_writeEventArgs.SocketError);
+ }
+ int ret = _writeEventArgs.BytesTransferred;
+#else
int ret = _fd.EndSend(_writeResult);
_writeResult = null;
+#endif
if(ret == 0)
{
throw new Ice.ConnectionLostException();
}
Debug.Assert(ret > 0);
+#if !COMPACT && !SILVERLIGHT
// COMPILERFIX: Workaround for Mac OS X broken poll(), see Mono bug #470120
if(AssemblyUtil.osx_)
{
@@ -455,6 +535,7 @@ namespace IceInternal
Network.setBlock(_fd, false);
}
}
+#endif
if(_traceLevels.network >= 3)
{
@@ -474,7 +555,7 @@ namespace IceInternal
buf.b.position(buf.b.position() + ret);
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.connectionLost(ex))
{
@@ -499,20 +580,12 @@ namespace IceInternal
{
Debug.Assert(_fd != null);
Ice.TCPConnectionInfo info = new Ice.TCPConnectionInfo();
- IPEndPoint localEndpoint = Network.getLocalAddress(_fd);
- info.localAddress = localEndpoint.Address.ToString();
- info.localPort = localEndpoint.Port;
- IPEndPoint remoteEndpoint = Network.getRemoteAddress(_fd);
- if(remoteEndpoint != null)
- {
- info.remoteAddress = remoteEndpoint.Address.ToString();
- info.remotePort = remoteEndpoint.Port;
- }
- else
- {
- info.remoteAddress = "";
- info.remotePort = -1;
- }
+ EndPoint localEndpoint = Network.getLocalAddress(_fd);
+ info.localAddress = Network.endpointAddressToString(localEndpoint);
+ info.localPort = Network.endpointPort(localEndpoint);
+ EndPoint remoteEndpoint = Network.getRemoteAddress(_fd);
+ info.remoteAddress = Network.endpointAddressToString(remoteEndpoint);
+ info.remotePort = Network.endpointPort(remoteEndpoint);
return info;
}
@@ -532,10 +605,29 @@ namespace IceInternal
//
// Only for use by TcpConnector, TcpAcceptor
//
- internal TcpTransceiver(Instance instance, Socket fd, IPEndPoint addr, bool connected)
+ internal TcpTransceiver(Instance instance, Socket fd, EndPoint addr, bool connected)
{
_fd = fd;
_addr = addr;
+
+#if SILVERLIGHT
+ _readEventArgs = new SocketAsyncEventArgs();
+ if(instance.initializationData().properties.getProperty("Ice.ClientAccessPolicyProtocol").Equals("Http"))
+ {
+ _readEventArgs.SocketClientAccessPolicyProtocol = SocketClientAccessPolicyProtocol.Http;
+ }
+ _readEventArgs.RemoteEndPoint = _addr;
+ _readEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
+
+ _writeEventArgs = new SocketAsyncEventArgs();
+ if(instance.initializationData().properties.getProperty("Ice.ClientAccessPolicyProtocol").Equals("Http"))
+ {
+ _writeEventArgs.SocketClientAccessPolicyProtocol = SocketClientAccessPolicyProtocol.Http;
+ }
+ _writeEventArgs.RemoteEndPoint = _addr;
+ _writeEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
+#endif
+
_traceLevels = instance.traceLevels();
_logger = instance.initializationData().logger;
_stats = instance.initializationData().stats;
@@ -555,8 +647,42 @@ namespace IceInternal
}
}
+#if SILVERLIGHT
+ internal void ioCompleted(object sender, SocketAsyncEventArgs e)
+ {
+ switch (e.LastOperation)
+ {
+ case SocketAsyncOperation.Receive:
+ _readCallback(e.UserToken);
+ break;
+ case SocketAsyncOperation.Send:
+ case SocketAsyncOperation.Connect:
+ _writeCallback(e.UserToken);
+ break;
+ default:
+ throw new ArgumentException("The last operation completed on the socket was not a receive or send");
+ }
+ }
+#else
+ internal void readCompleted(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ _readCallback(result.AsyncState);
+ }
+ }
+
+ internal void writeCompleted(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ _writeCallback(result.AsyncState);
+ }
+ }
+#endif
+
private Socket _fd;
- private IPEndPoint _addr;
+ private EndPoint _addr;
private TraceLevels _traceLevels;
private Ice.Logger _logger;
private Ice.Stats _stats;
@@ -565,9 +691,20 @@ namespace IceInternal
private int _maxSendPacketSize;
private int _maxReceivePacketSize;
+#if !COMPACT && !SILVERLIGHT
private int _blocking = 0;
+#endif
+
+#if SILVERLIGHT
+ private SocketAsyncEventArgs _writeEventArgs;
+ private SocketAsyncEventArgs _readEventArgs;
+#else
private IAsyncResult _writeResult;
private IAsyncResult _readResult;
+#endif
+
+ AsyncCallback _writeCallback;
+ AsyncCallback _readCallback;
private const int StateNeedConnect = 0;
private const int StateConnectPending = 1;
diff --git a/cs/src/Ice/ThreadPool.cs b/cs/src/Ice/ThreadPool.cs
index 4b3e64f4d06..5f8175231dd 100644
--- a/cs/src/Ice/ThreadPool.cs
+++ b/cs/src/Ice/ThreadPool.cs
@@ -16,6 +16,7 @@ namespace IceInternal
using System.Threading;
public delegate void ThreadPoolWorkItem();
+ public delegate void AsyncCallback(object state);
internal struct ThreadPoolMessage
{
@@ -199,6 +200,7 @@ namespace IceInternal
}
_stackSize = stackSize;
+#if !SILVERLIGHT
_hasPriority = properties.getProperty(_prefix + ".ThreadPriority").Length > 0;
_priority = IceInternal.Util.stringToThreadPriority(properties.getProperty(_prefix + ".ThreadPriority"));
if(!_hasPriority)
@@ -206,6 +208,7 @@ namespace IceInternal
_hasPriority = properties.getProperty("Ice.ThreadPriority").Length > 0;
_priority = IceInternal.Util.stringToThreadPriority(properties.getProperty("Ice.ThreadPriority"));
}
+#endif
if(_instance.traceLevels().threadPool >= 1)
{
@@ -223,6 +226,7 @@ namespace IceInternal
{
WorkerThread thread = new WorkerThread(this, _threadPrefix + "-" + _threadIndex++);
_threads.Add(thread);
+#if !SILVERLIGHT
if(_hasPriority)
{
thread.start(_priority);
@@ -231,6 +235,9 @@ namespace IceInternal
{
thread.start(ThreadPriority.Normal);
}
+#else
+ thread.start();
+#endif
}
}
catch(System.Exception ex)
@@ -390,6 +397,7 @@ namespace IceInternal
try
{
WorkerThread t = new WorkerThread(this, _threadPrefix + "-" + _threadIndex++);
+#if !SILVERLIGHT
if(_hasPriority)
{
t.start(_priority);
@@ -398,6 +406,9 @@ namespace IceInternal
{
t.start(ThreadPriority.Normal);
}
+#else
+ t.start();
+#endif
_threads.Add(t);
}
catch(System.Exception ex)
@@ -665,22 +676,12 @@ namespace IceInternal
public void asyncReadCallback(object state)
{
- IAsyncResult result = (IAsyncResult)state;
- if(result.CompletedSynchronously)
- {
- return;
- }
- messageCallback(new ThreadPoolCurrent(this, (EventHandler)result.AsyncState, SocketOperation.Read));
+ messageCallback(new ThreadPoolCurrent(this, (EventHandler)state, SocketOperation.Read));
}
public void asyncWriteCallback(object state)
{
- IAsyncResult result = (IAsyncResult)state;
- if(result.CompletedSynchronously)
- {
- return;
- }
- messageCallback(new ThreadPoolCurrent(this, (EventHandler)result.AsyncState, SocketOperation.Write));
+ messageCallback(new ThreadPoolCurrent(this, (EventHandler)state, SocketOperation.Write));
}
public void messageCallback(ThreadPoolCurrent current)
@@ -736,6 +737,7 @@ namespace IceInternal
_thread.Join();
}
+#if !SILVERLIGHT
public void start(ThreadPriority priority)
{
if(_threadPool._stackSize == 0)
@@ -751,6 +753,15 @@ namespace IceInternal
_thread.Priority = priority;
_thread.Start();
}
+#else
+ public void start()
+ {
+ _thread = new Thread(new ThreadStart(Run));
+ _thread.IsBackground = true;
+ _thread.Name = _name;
+ _thread.Start();
+ }
+#endif
public void Run()
{
@@ -801,8 +812,10 @@ namespace IceInternal
private readonly int _sizeMax; // Maximum number of threads.
private readonly int _sizeWarn; // If _inUse reaches _sizeWarn, a "low on threads" warning will be printed.
private readonly bool _serialize; // True if requests need to be serialized over the connection.
+#if !SILVERLIGHT
private readonly ThreadPriority _priority;
private readonly bool _hasPriority = false;
+#endif
private readonly int _serverIdleTime;
private readonly int _threadIdleTime;
private readonly int _stackSize;
diff --git a/cs/src/Ice/Time.cs b/cs/src/Ice/Time.cs
index a853a9df5f0..21195543ca6 100644
--- a/cs/src/Ice/Time.cs
+++ b/cs/src/Ice/Time.cs
@@ -9,6 +9,7 @@
namespace IceInternal
{
+#if !SILVERLIGHT
using System.Diagnostics;
public sealed class Time
@@ -25,4 +26,20 @@ namespace IceInternal
private static Stopwatch _stopwatch = new Stopwatch();
}
+#else
+ public sealed class Time
+ {
+ static Time()
+ {
+ _begin = System.DateTime.Now.Ticks;
+ }
+
+ public static long currentMonotonicTimeMillis()
+ {
+ return (System.DateTime.Now.Ticks - _begin) / 10000;
+ }
+
+ private static long _begin;
+ }
+#endif
}
diff --git a/cs/src/Ice/Timer.cs b/cs/src/Ice/Timer.cs
index 23bcc7bce12..23f1335640e 100644
--- a/cs/src/Ice/Timer.cs
+++ b/cs/src/Ice/Timer.cs
@@ -18,6 +18,7 @@ namespace IceInternal
using System;
using System.Diagnostics;
using System.Threading;
+ using System.Collections;
using System.Collections.Generic;
public interface TimerTask
@@ -66,7 +67,16 @@ namespace IceInternal
try
{
_tasks.Add(task, token);
+#if SILVERLIGHT
+ int index = _tokens.BinarySearch(token);
+ Debug.Assert(index < 0);
+ if(index < 0)
+ {
+ _tokens.Insert(~index, token);
+ }
+#else
_tokens.Add(token, null);
+#endif
}
catch(System.ArgumentException)
{
@@ -99,7 +109,16 @@ namespace IceInternal
try
{
_tasks.Add(task, token);
+#if SILVERLIGHT
+ int index = _tokens.BinarySearch(token);
+ Debug.Assert(index < 0);
+ if(index < 0)
+ {
+ _tokens.Insert(~index, token);
+ }
+#else
_tokens.Add(token, null);
+#endif
}
catch(System.ArgumentException)
{
@@ -145,17 +164,27 @@ namespace IceInternal
//
// Only for use by Instance.
//
+#if !SILVERLIGHT
internal Timer(IceInternal.Instance instance, ThreadPriority priority)
{
init(instance, priority, true);
}
-
+#endif
+
internal Timer(IceInternal.Instance instance)
{
+#if !SILVERLIGHT
init(instance, ThreadPriority.Normal, false);
+#else
+ init(instance);
+#endif
}
- internal void init(IceInternal.Instance instance, ThreadPriority priority, bool hasPriority)
+#if !SILVERLIGHT
+ internal void init(IceInternal.Instance instance, ThreadPriority priority, bool hasPriority)
+#else
+ internal void init(IceInternal.Instance instance)
+#endif
{
_instance = instance;
@@ -168,10 +197,12 @@ namespace IceInternal
_thread = new Thread(new ThreadStart(Run));
_thread.IsBackground = true;
_thread.Name = threadName + "Ice.Timer";
+#if !SILVERLIGHT
if(hasPriority)
{
_thread.Priority = priority;
}
+#endif
_thread.Start();
}
@@ -194,7 +225,16 @@ namespace IceInternal
if(_tasks.ContainsKey(token.task))
{
token.scheduledTime = Time.currentMonotonicTimeMillis() + token.delay;
+#if SILVERLIGHT
+ int index = _tokens.BinarySearch(token);
+ Debug.Assert(index < 0);
+ if(index < 0)
+ {
+ _tokens.Insert(~index, token);
+ }
+#else
_tokens.Add(token, null);
+#endif
}
}
}
@@ -221,7 +261,11 @@ namespace IceInternal
long now = Time.currentMonotonicTimeMillis();
Token first = null;
+#if SILVERLIGHT
+ foreach(Token t in _tokens)
+#else
foreach(Token t in _tokens.Keys)
+#endif
{
first = t;
break;
@@ -351,6 +395,8 @@ namespace IceInternal
#if COMPACT
private IDictionary<Token, object> _tokens = new SortedList<Token, object>();
+#elif SILVERLIGHT
+ private List<Token> _tokens = new List<Token>();
#else
private IDictionary<Token, object> _tokens = new SortedDictionary<Token, object>();
#endif
@@ -361,5 +407,6 @@ namespace IceInternal
private Thread _thread;
private readonly IceUtilInternal.Monitor _m = new IceUtilInternal.Monitor();
- }
+}
+
}
diff --git a/cs/src/Ice/UdpConnector.cs b/cs/src/Ice/UdpConnector.cs
index 1e572d02305..1f1b43ea7f8 100644
--- a/cs/src/Ice/UdpConnector.cs
+++ b/cs/src/Ice/UdpConnector.cs
@@ -29,12 +29,16 @@ namespace IceInternal
//
// Only for use by TcpEndpoint
//
- internal UdpConnector(Instance instance, IPEndPoint addr, string mcastInterface, int mcastTtl,
+ internal UdpConnector(Instance instance, EndPoint addr, string mcastInterface, int mcastTtl,
byte protocolMajor, byte protocolMinor, byte encodingMajor, byte encodingMinor,
string connectionId)
{
instance_ = instance;
- _addr = addr;
+#if SILVERLIGHT
+ _addr = (DnsEndPoint)addr;
+#else
+ _addr = (IPEndPoint)addr;
+#endif
_mcastInterface = mcastInterface;
_mcastTtl = mcastTtl;
_protocolMajor = protocolMajor;
@@ -102,7 +106,7 @@ namespace IceInternal
return false;
}
- return Network.compareAddress(_addr, p._addr) == 0;
+ return _addr.Equals(p._addr);
}
public override string ToString()
@@ -116,7 +120,11 @@ namespace IceInternal
}
private Instance instance_;
+#if SILVERLIGHT
+ private DnsEndPoint _addr;
+#else
private IPEndPoint _addr;
+#endif
private string _mcastInterface;
private int _mcastTtl;
private byte _protocolMajor;
diff --git a/cs/src/Ice/UdpEndpointI.cs b/cs/src/Ice/UdpEndpointI.cs
index e76e6d54c85..1f9764c79da 100644
--- a/cs/src/Ice/UdpEndpointI.cs
+++ b/cs/src/Ice/UdpEndpointI.cs
@@ -614,11 +614,16 @@ namespace IceInternal
return connectors(Network.getAddresses(_host, _port, instance_.protocolSupport()));
}
+
public override void connectors_async(EndpointI_connectors callback)
{
+#if SILVERLIGHT
+ callback.connectors(connectors());
+#else
instance_.endpointHostResolver().resolve(_host, _port, this, callback);
+#endif
}
-
+
//
// Return an acceptor for this endpoint, or null if no acceptors
// is available. In case an acceptor is created, this operation
@@ -674,10 +679,10 @@ namespace IceInternal
return udpEndpointI._host.Equals(_host) && udpEndpointI._port == _port;
}
- public override List<Connector> connectors(List<IPEndPoint> addresses)
+ public override List<Connector> connectors(List<EndPoint> addresses)
{
List<Connector> connectors = new List<Connector>();
- foreach(IPEndPoint addr in addresses)
+ foreach(EndPoint addr in addresses)
{
connectors.Add(new UdpConnector(instance_, addr, _mcastInterface, _mcastTtl, _protocolMajor,
_protocolMinor, _encodingMajor, _encodingMinor, _connectionId));
diff --git a/cs/src/Ice/UdpTransceiver.cs b/cs/src/Ice/UdpTransceiver.cs
index d8f7107fb72..ecc51c5a0fb 100644
--- a/cs/src/Ice/UdpTransceiver.cs
+++ b/cs/src/Ice/UdpTransceiver.cs
@@ -29,15 +29,16 @@ namespace IceInternal
}
else if(_state <= StateConnectPending)
{
- if(Network.isMulticast(_addr))
+#if !SILVERLIGHT
+ if(Network.isMulticast((IPEndPoint)_addr))
{
- Network.setMcastGroup(_fd, _addr.Address, _mcastInterface);
-
+ Network.setMcastGroup(_fd, ((IPEndPoint)_addr).Address, _mcastInterface);
if(_mcastTtl != -1)
{
Network.setMcastTtl(_fd, _mcastTtl, _addr.AddressFamily);
}
}
+#endif
_state = StateConnected;
}
@@ -77,9 +78,9 @@ namespace IceInternal
public bool write(Buffer buf)
{
-#if COMPACT
+#if COMPACT || SILVERLIGHT
//
- // The Compact Framework does not support the use of synchronous socket
+ // Silverlight and the Compact .NET Framework don't support the use of synchronous socket
// operations on a non-blocking socket. Returning false here forces the
// caller to schedule an asynchronous operation.
//
@@ -110,7 +111,7 @@ namespace IceInternal
}
break;
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.interrupted(ex))
{
@@ -158,9 +159,9 @@ namespace IceInternal
public bool read(Buffer buf)
{
-#if COMPACT
+#if COMPACT || SILVERLIGHT
//
- // The Compact Framework does not support the use of synchronous socket
+ // Silverlight and the Compact .NET Framework don't support the use of synchronous socket
// operations on a non-blocking socket. Returning false here forces the
// caller to schedule an asynchronous operation.
//
@@ -203,7 +204,7 @@ namespace IceInternal
}
break;
}
- catch(Win32Exception e)
+ catch(SocketException e)
{
if(Network.recvTruncated(e))
{
@@ -292,13 +293,26 @@ namespace IceInternal
{
if(_state == StateConnected)
{
- _readResult = _fd.BeginReceive(buf.b.rawBytes(), 0, buf.b.limit(), SocketFlags.None, callback,
- state);
+ _readCallback = callback;
+#if SILVERLIGHT
+ _readEventArgs.UserToken = state;
+ _readEventArgs.SetBuffer(buf.b.rawBytes(), buf.b.position(), packetSize);
+ return !_fd.ReceiveAsync(_readEventArgs);
+#else
+ _readResult = _fd.BeginReceive(buf.b.rawBytes(), 0, buf.b.limit(), SocketFlags.None,
+ readCompleted, state);
+ return _readResult.CompletedSynchronously;
+#endif
}
else
{
Debug.Assert(_incoming);
-
+ _readCallback = callback;
+#if SILVERLIGHT
+ _readEventArgs.UserToken = state;
+ _readEventArgs.SetBuffer(buf.b.rawBytes(), 0, buf.b.limit());
+ return !_fd.ReceiveFromAsync(_readEventArgs);
+#else
EndPoint peerAddr = _peerAddr;
if(peerAddr == null)
{
@@ -312,16 +326,18 @@ namespace IceInternal
peerAddr = new IPEndPoint(IPAddress.IPv6Any, 0);
}
}
-
_readResult = _fd.BeginReceiveFrom(buf.b.rawBytes(), 0, buf.b.limit(), SocketFlags.None,
- ref peerAddr, callback, state);
+ ref peerAddr, readCompleted, state);
+ return _readResult.CompletedSynchronously;
+#endif
}
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.recvTruncated(ex))
{
- // Nothing todo
+ // Nothing todo
+ return true;
}
else
{
@@ -335,8 +351,6 @@ namespace IceInternal
}
}
}
-
- return _readResult.CompletedSynchronously;
}
public void finishRead(Buffer buf)
@@ -349,6 +363,17 @@ namespace IceInternal
int ret;
try
{
+#if SILVERLIGHT
+ if(_readEventArgs.SocketError != SocketError.Success)
+ {
+ throw new SocketException((int)_readEventArgs.SocketError);
+ }
+ ret = _readEventArgs.BytesTransferred;
+ if(_state != StateConnected)
+ {
+ _peerAddr = _readEventArgs.RemoteEndPoint;
+ }
+#else
Debug.Assert(_readResult != null);
if(_state == StateConnected)
{
@@ -370,8 +395,9 @@ namespace IceInternal
_peerAddr = (IPEndPoint)peerAddr;
}
_readResult = null;
+#endif
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.recvTruncated(ex))
{
@@ -413,7 +439,11 @@ namespace IceInternal
// If we must connect, then we connect to the first peer that
// sends us a packet.
//
+#if SILVERLIGHT
+ bool connected = !_fd.ConnectAsync(_readEventArgs);
+#else
bool connected = Network.doConnect(_fd, _peerAddr);
+#endif
Debug.Assert(connected);
_state = StateConnected; // We're connected now
@@ -444,9 +474,14 @@ namespace IceInternal
if(!_incoming && _state < StateConnected)
{
Debug.Assert(_addr != null);
- _writeResult = Network.doConnectAsync(_fd, _addr, callback, state);
completed = false;
+#if SILVERLIGHT
+ _writeEventArgs.UserToken = state;
+ return !_fd.ConnectAsync(_writeEventArgs);
+#else
+ _writeResult = Network.doConnectAsync(_fd, _addr, callback, state);
return _writeResult.CompletedSynchronously;
+#endif
}
Debug.Assert(_fd != null);
@@ -456,11 +491,22 @@ namespace IceInternal
Debug.Assert(buf.b.position() == 0);
+ bool completedSynchronously;
try
{
+ _writeCallback = callback;
+
if(_state == StateConnected)
{
- _writeResult = _fd.BeginSend(buf.b.rawBytes(), 0, buf.b.limit(), SocketFlags.None, callback, state);
+#if SILVERLIGHT
+ _writeEventArgs.UserToken = state;
+ _writeEventArgs.SetBuffer(buf.b.rawBytes(), 0, buf.b.limit());
+ completedSynchronously = !_fd.SendAsync(_writeEventArgs);
+#else
+ _writeResult = _fd.BeginSend(buf.b.rawBytes(), 0, buf.b.limit(), SocketFlags.None,
+ writeCompleted, state);
+ completedSynchronously = _writeResult.CompletedSynchronously;
+#endif
}
else
{
@@ -468,11 +514,19 @@ namespace IceInternal
{
throw new Ice.SocketException();
}
+#if SILVERLIGHT
+ _writeEventArgs.RemoteEndPoint = _peerAddr;
+ _writeEventArgs.UserToken = state;
+ _writeEventArgs.SetBuffer(buf.b.rawBytes(), 0, buf.b.limit());
+ completedSynchronously = !_fd.SendToAsync(_writeEventArgs);
+#else
_writeResult = _fd.BeginSendTo(buf.b.rawBytes(), 0, buf.b.limit(), SocketFlags.None, _peerAddr,
- callback, state);
+ writeCompleted, state);
+ completedSynchronously = _writeResult.CompletedSynchronously;
+#endif
}
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.connectionLost(ex))
{
@@ -485,7 +539,7 @@ namespace IceInternal
}
completed = true;
- return _writeResult.CompletedSynchronously;
+ return completedSynchronously;
}
public void finishWrite(Buffer buf)
@@ -493,22 +547,48 @@ namespace IceInternal
if(_fd == null)
{
buf.b.position(buf.size()); // Assume all the data was sent for at-most-once semantics.
+#if SILVERLIGHT
+ _writeEventArgs = null;
+#else
_writeResult = null;
+#endif
return;
}
if(!_incoming && _state < StateConnected)
{
+#if SILVERLIGHT
+ if(_writeEventArgs.SocketError != SocketError.Success)
+ {
+ SocketException ex = new SocketException((int)_writeEventArgs.SocketError);
+ if(Network.connectionRefused(ex))
+ {
+ throw new Ice.ConnectionRefusedException(ex);
+ }
+ else
+ {
+ throw new Ice.ConnectFailedException(ex);
+ }
+ }
+#else
Debug.Assert(_writeResult != null);
Network.doFinishConnectAsync(_fd, _writeResult);
_writeResult = null;
+#endif
return;
}
int ret;
try
{
- if(_state == StateConnected)
+#if SILVERLIGHT
+ if(_writeEventArgs.SocketError != SocketError.Success)
+ {
+ throw new SocketException((int)_writeEventArgs.SocketError);
+ }
+ ret = _writeEventArgs.BytesTransferred;
+#else
+ if (_state == StateConnected)
{
ret = _fd.EndSend(_writeResult);
}
@@ -517,8 +597,9 @@ namespace IceInternal
ret = _fd.EndSendTo(_writeResult);
}
_writeResult = null;
+#endif
}
- catch(Win32Exception ex)
+ catch(SocketException ex)
{
if(Network.connectionLost(ex))
{
@@ -562,15 +643,15 @@ namespace IceInternal
{
Debug.Assert(_fd != null);
Ice.UDPConnectionInfo info = new Ice.UDPConnectionInfo();
- IPEndPoint localEndpoint = Network.getLocalAddress(_fd);
- info.localAddress = localEndpoint.Address.ToString();
- info.localPort = localEndpoint.Port;
+ EndPoint localEndpoint = Network.getLocalAddress(_fd);
+ info.localAddress = Network.endpointAddressToString(localEndpoint);
+ info.localPort = Network.endpointPort(localEndpoint);
if(_state == StateNotConnected)
{
if(_peerAddr != null)
{
- info.remoteAddress = _peerAddr.Address.ToString();
- info.remotePort = _peerAddr.Port;
+ info.remoteAddress = Network.endpointAddressToString(_peerAddr);
+ info.remotePort = Network.endpointPort(_peerAddr);
}
else
{
@@ -580,11 +661,11 @@ namespace IceInternal
}
else
{
- IPEndPoint remoteEndpoint = Network.getRemoteAddress(_fd);
+ EndPoint remoteEndpoint = Network.getRemoteAddress(_fd);
if(remoteEndpoint != null)
{
- info.remoteAddress = remoteEndpoint.Address.ToString();
- info.remotePort = remoteEndpoint.Port;
+ info.remoteAddress = Network.endpointAddressToString(remoteEndpoint);
+ info.remotePort = Network.endpointPort(remoteEndpoint);
}
else
{
@@ -593,12 +674,14 @@ namespace IceInternal
}
}
+#if !SILVERLIGHT
if(_mcastAddr != null)
{
- info.mcastAddress = _mcastAddr.Address.ToString();
- info.mcastPort = _mcastAddr.Port;
+ info.mcastAddress = Network.endpointAddressToString(_mcastAddr);
+ info.mcastPort = Network.endpointPort(_mcastAddr);
}
else
+#endif
{
info.mcastAddress = "";
info.mcastPort = -1;
@@ -645,27 +728,44 @@ namespace IceInternal
s = Network.fdToString(_fd);
}
+#if !SILVERLIGHT
if(_mcastAddr != null)
{
s += "\nmulticast address = " + Network.addrToString(_mcastAddr);
- }
+ }
+#endif
return s;
}
public int effectivePort()
{
- return _addr.Port;
+#if SILVERLIGHT
+ return ((DnsEndPoint)_addr).Port;
+#else
+ return ((IPEndPoint)_addr).Port;
+#endif
}
//
// Only for use by UdpConnector.
//
- internal UdpTransceiver(Instance instance, IPEndPoint addr, string mcastInterface, int mcastTtl)
+ internal UdpTransceiver(Instance instance, EndPoint addr, string mcastInterface, int mcastTtl)
{
_traceLevels = instance.traceLevels();
_logger = instance.initializationData().logger;
_stats = instance.initializationData().stats;
_addr = addr;
+
+#if SILVERLIGHT
+ _readEventArgs = new SocketAsyncEventArgs();
+ _readEventArgs.RemoteEndPoint = _addr;
+ _readEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
+
+ _writeEventArgs = new SocketAsyncEventArgs();
+ _writeEventArgs.RemoteEndPoint = _addr;
+ _writeEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
+#endif
+
_mcastInterface = mcastInterface;
_mcastTtl = mcastTtl;
_state = StateNeedConnect;
@@ -675,7 +775,9 @@ namespace IceInternal
{
_fd = Network.createSocket(true, _addr.AddressFamily);
setBufSize(instance);
+#if !SILVERLIGHT
Network.setBlock(_fd, false);
+#endif
}
catch(Ice.LocalException)
{
@@ -698,18 +800,33 @@ namespace IceInternal
try
{
_addr = Network.getAddressForServer(host, port, instance.protocolSupport());
+
+#if SILVERLIGHT
+ _readEventArgs = new SocketAsyncEventArgs();
+ _readEventArgs.RemoteEndPoint = _addr;
+ _readEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
+
+ _writeEventArgs = new SocketAsyncEventArgs();
+ _writeEventArgs.RemoteEndPoint = _addr;
+ _writeEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
+#endif
+
_fd = Network.createSocket(true, _addr.AddressFamily);
setBufSize(instance);
+#if !SILVERLIGHT
Network.setBlock(_fd, false);
+#endif
if(_traceLevels.network >= 2)
{
string s = "attempting to bind to udp socket " + Network.addrToString(_addr);
_logger.trace(_traceLevels.networkCat, s);
}
- if(Network.isMulticast(_addr))
+
+#if !SILVERLIGHT
+ if(Network.isMulticast((IPEndPoint)_addr))
{
Network.setReuseAddress(_fd, true);
- _mcastAddr = _addr;
+ _mcastAddr = (IPEndPoint)_addr;
if(AssemblyUtil.platform_ == AssemblyUtil.Platform.Windows)
{
//
@@ -731,7 +848,7 @@ namespace IceInternal
_addr = Network.doBind(_fd, _addr);
if(port == 0)
{
- _mcastAddr.Port = _addr.Port;
+ _mcastAddr.Port = ((IPEndPoint)_addr).Port;
}
Network.setMcastGroup(_fd, _mcastAddr.Address, mcastInterface);
}
@@ -756,19 +873,22 @@ namespace IceInternal
}
_addr = Network.doBind(_fd, _addr);
}
-
+#endif
if(_traceLevels.network >= 1)
{
StringBuilder s = new StringBuilder("starting to receive udp packets\n");
- s.Append(ToString());
-
- List<string> interfaces =
- Network.getHostsForEndpointExpand(_addr.Address.ToString(), instance.protocolSupport(), true);
+ s.Append(ToString());
+#if SILVERLIGHT
+ s.Append("\nlocal interfaces: " + ((DnsEndPoint)_addr).Host);
+#else
+ List<string> interfaces = Network.getHostsForEndpointExpand(((IPEndPoint)_addr).Address.ToString(),
+ instance.protocolSupport(), true);
if(interfaces.Count != 0)
{
s.Append("\nlocal interfaces: ");
s.Append(String.Join(", ", interfaces.ToArray()));
}
+#endif
_logger.trace(_traceLevels.networkCat, s.ToString());
}
}
@@ -847,6 +967,39 @@ namespace IceInternal
}
}
+#if SILVERLIGHT
+ internal void ioCompleted(object sender, SocketAsyncEventArgs e)
+ {
+ switch (e.LastOperation)
+ {
+ case SocketAsyncOperation.Receive:
+ _readCallback(e.UserToken);
+ break;
+ case SocketAsyncOperation.Send:
+ _writeCallback(e.UserToken);
+ break;
+ default:
+ throw new ArgumentException("The last operation completed on the socket was not a receive or send");
+ }
+ }
+#else
+ internal void readCompleted(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ _readCallback(result.AsyncState);
+ }
+ }
+
+ internal void writeCompleted(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ _writeCallback(result.AsyncState);
+ }
+ }
+#endif
+
private TraceLevels _traceLevels;
private Ice.Logger _logger;
private Ice.Stats _stats;
@@ -855,14 +1008,24 @@ namespace IceInternal
private int _rcvSize;
private int _sndSize;
private Socket _fd;
- private IPEndPoint _addr;
+ private EndPoint _addr;
+#if !SILVERLIGHT
private IPEndPoint _mcastAddr = null;
- private IPEndPoint _peerAddr = null;
+#endif
+ private EndPoint _peerAddr = null;
private string _mcastInterface = null;
private int _mcastTtl = -1;
+#if SILVERLIGHT
+ private SocketAsyncEventArgs _writeEventArgs;
+ private SocketAsyncEventArgs _readEventArgs;
+#else
private IAsyncResult _writeResult;
private IAsyncResult _readResult;
+#endif
+
+ AsyncCallback _writeCallback;
+ AsyncCallback _readCallback;
private const int StateNeedConnect = 0;
private const int StateConnectPending = 1;
diff --git a/cs/src/Ice/Util.cs b/cs/src/Ice/Util.cs
index 017db4bdf12..f9d11aac99f 100644
--- a/cs/src/Ice/Util.cs
+++ b/cs/src/Ice/Util.cs
@@ -506,6 +506,7 @@ namespace IceInternal
return new ProtocolPluginFacadeI(communicator);
}
+#if !SILVERLIGHT
public static System.Threading.ThreadPriority stringToThreadPriority(string s)
{
if(String.IsNullOrEmpty(s))
@@ -538,5 +539,16 @@ namespace IceInternal
}
return ThreadPriority.Normal;
}
+#endif
+ }
+}
+
+#if SILVERLIGHT
+namespace System
+{
+ public interface ICloneable
+ {
+ Object Clone();
}
}
+#endif
diff --git a/cs/src/Ice/ValueWriter.cs b/cs/src/Ice/ValueWriter.cs
index 17f6966d40d..24f50221ff5 100644
--- a/cs/src/Ice/ValueWriter.cs
+++ b/cs/src/Ice/ValueWriter.cs
@@ -11,6 +11,7 @@ namespace IceInternal
{
using System.Collections;
+ using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using IceUtilInternal;
@@ -22,7 +23,7 @@ namespace IceInternal
writeValue(null, obj, null, output);
}
- private static void writeValue(string name, object val, Hashtable objectTable, OutputBase output)
+ private static void writeValue(string name, object val, Dictionary<Ice.Object, object> objectTable, OutputBase output)
{
if(val == null)
{
@@ -46,10 +47,10 @@ namespace IceInternal
output.print(val.ToString());
output.print("\"");
}
- else if(val is CollectionBase)
+ else if(val is IList)
{
int n = 0;
- IEnumerator i = ((CollectionBase)val).GetEnumerator();
+ IEnumerator i = ((IList)val).GetEnumerator();
while(i.MoveNext())
{
string elem = (name != null ? name : "");
@@ -77,7 +78,7 @@ namespace IceInternal
//
// Check for recursion.
//
- if(objectTable != null && objectTable.Contains(val))
+ if(objectTable != null && objectTable.ContainsKey((Ice.Object)val))
{
writeName(name, output);
output.print("(recursive)");
@@ -86,9 +87,9 @@ namespace IceInternal
{
if(objectTable == null)
{
- objectTable = new Hashtable();
+ objectTable = new Dictionary<Ice.Object, object>();
}
- objectTable[val] = null;
+ objectTable[(Ice.Object)val] = null;
writeFields(name, val, c, objectTable, output);
}
}
@@ -107,7 +108,7 @@ namespace IceInternal
}
}
- private static void writeFields(string name, object obj, System.Type c, Hashtable objectTable,
+ private static void writeFields(string name, object obj, System.Type c, Dictionary<Ice.Object, object> objectTable,
OutputBase output)
{
if(!c.Equals(typeof(object)))
diff --git a/cs/src/IceSSL/AcceptorI.cs b/cs/src/IceSSL/AcceptorI.cs
index 8c9b7c59c2f..fd1648e2984 100644
--- a/cs/src/IceSSL/AcceptorI.cs
+++ b/cs/src/IceSSL/AcceptorI.cs
@@ -63,7 +63,7 @@ namespace IceSSL
}
}
- public bool startAccept(AsyncCallback callback, object state)
+ public bool startAccept(IceInternal.AsyncCallback callback, object state)
{
//
// The plug-in may not be fully initialized.
@@ -77,7 +77,13 @@ namespace IceSSL
try
{
- _result = _fd.BeginAccept(callback, state);
+ _result = _fd.BeginAccept(delegate(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ callback(result.AsyncState);
+ }
+ }, state);
return _result.CompletedSynchronously;
}
catch(SocketException ex)
@@ -155,7 +161,7 @@ namespace IceSSL
try
{
- _addr = IceInternal.Network.getAddressForServer(host, port, _instance.protocolSupport());
+ _addr = (IPEndPoint)IceInternal.Network.getAddressForServer(host, port, _instance.protocolSupport());
_fd = IceInternal.Network.createSocket(false, _addr.AddressFamily);
IceInternal.Network.setBlock(_fd, false);
IceInternal.Network.setTcpBufSize(_fd, _instance.communicator().getProperties(), _logger);
diff --git a/cs/src/IceSSL/ConnectorI.cs b/cs/src/IceSSL/ConnectorI.cs
index cf387fd268b..78595c318ea 100644
--- a/cs/src/IceSSL/ConnectorI.cs
+++ b/cs/src/IceSSL/ConnectorI.cs
@@ -118,7 +118,7 @@ namespace IceSSL
return false;
}
- return IceInternal.Network.compareAddress(_addr, p._addr) == 0;
+ return _addr.Equals(p._addr);
}
public override string ToString()
diff --git a/cs/src/IceSSL/EndpointI.cs b/cs/src/IceSSL/EndpointI.cs
index af6d7de138b..40b2eed39ca 100644
--- a/cs/src/IceSSL/EndpointI.cs
+++ b/cs/src/IceSSL/EndpointI.cs
@@ -449,12 +449,12 @@ namespace IceSSL
return sslEndpointI._host.Equals(_host) && sslEndpointI._port == _port;
}
- public override List<IceInternal.Connector> connectors(List<IPEndPoint> addresses)
+ public override List<IceInternal.Connector> connectors(List<EndPoint> addresses)
{
List<IceInternal.Connector> connectors = new List<IceInternal.Connector>();
- foreach(IPEndPoint addr in addresses)
+ foreach(EndPoint addr in addresses)
{
- connectors.Add(new ConnectorI(_instance, _host, addr, _timeout, _connectionId));
+ connectors.Add(new ConnectorI(_instance, _host, (IPEndPoint)addr, _timeout, _connectionId));
}
return connectors;
}
diff --git a/cs/src/IceSSL/TransceiverI.cs b/cs/src/IceSSL/TransceiverI.cs
index 88ad2426039..3ddb342fe14 100644
--- a/cs/src/IceSSL/TransceiverI.cs
+++ b/cs/src/IceSSL/TransceiverI.cs
@@ -126,7 +126,7 @@ namespace IceSSL
return false; // Caller will use async read.
}
- public bool startRead(IceInternal.Buffer buf, AsyncCallback callback, object state)
+ public bool startRead(IceInternal.Buffer buf, IceInternal.AsyncCallback callback, object state)
{
Debug.Assert(_fd != null);
@@ -138,7 +138,8 @@ namespace IceSSL
try
{
- _readResult = _stream.BeginRead(buf.b.rawBytes(), buf.b.position(), packetSize, callback, state);
+ _readCallback = callback;
+ _readResult = _stream.BeginRead(buf.b.rawBytes(), buf.b.position(), packetSize, readCompleted, state);
return _readResult.CompletedSynchronously;
}
catch(IOException ex)
@@ -232,7 +233,8 @@ namespace IceSSL
}
}
- public bool startWrite(IceInternal.Buffer buf, AsyncCallback callback, object state, out bool completed)
+ public bool startWrite(IceInternal.Buffer buf, IceInternal.AsyncCallback callback, object state,
+ out bool completed)
{
Debug.Assert(_fd != null);
@@ -263,7 +265,8 @@ namespace IceSSL
try
{
- _writeResult = _stream.BeginWrite(buf.b.rawBytes(), buf.b.position(), packetSize, callback, state);
+ _writeCallback = callback;
+ _writeResult = _stream.BeginWrite(buf.b.rawBytes(), buf.b.position(), packetSize, writeCompleted, state);
completed = packetSize == buf.b.remaining();
return _writeResult.CompletedSynchronously;
}
@@ -434,10 +437,10 @@ namespace IceSSL
{
Debug.Assert(_fd != null && _stream != null);
IceSSL.NativeConnectionInfo info = new IceSSL.NativeConnectionInfo();
- IPEndPoint localEndpoint = IceInternal.Network.getLocalAddress(_fd);
+ IPEndPoint localEndpoint = (IPEndPoint)IceInternal.Network.getLocalAddress(_fd);
info.localAddress = localEndpoint.Address.ToString();
info.localPort = localEndpoint.Port;
- IPEndPoint remoteEndpoint = IceInternal.Network.getRemoteAddress(_fd);
+ IPEndPoint remoteEndpoint = (IPEndPoint)IceInternal.Network.getRemoteAddress(_fd);
if(remoteEndpoint != null)
{
info.remoteAddress = remoteEndpoint.Address.ToString();
@@ -468,7 +471,7 @@ namespace IceSSL
return info;
}
- private bool beginAuthenticate(AsyncCallback callback, object state)
+ private bool beginAuthenticate(IceInternal.AsyncCallback callback, object state)
{
NetworkStream ns = new NetworkStream(_fd, true);
_stream = new SslStream(ns, false, new RemoteCertificateValidationCallback(validationCallback), null);
@@ -483,7 +486,13 @@ namespace IceSSL
_writeResult = _stream.BeginAuthenticateAsClient(_host, _instance.certs(),
_instance.protocols(),
_instance.checkCRL() > 0,
- callback, state);
+ delegate(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ callback(result.AsyncState);
+ }
+ }, state);
}
else
{
@@ -500,7 +509,14 @@ namespace IceSSL
}
_writeResult = _stream.BeginAuthenticateAsServer(cert, _verifyPeer > 1, _instance.protocols(),
- _instance.checkCRL() > 0, callback, state);
+ _instance.checkCRL() > 0,
+ delegate(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ callback(result.AsyncState);
+ }
+ }, state);
}
}
catch(IOException ex)
@@ -738,6 +754,22 @@ namespace IceSSL
return true;
}
+ internal void readCompleted(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ _readCallback(result.AsyncState);
+ }
+ }
+
+ internal void writeCompleted(IAsyncResult result)
+ {
+ if(!result.CompletedSynchronously)
+ {
+ _writeCallback(result.AsyncState);
+ }
+ }
+
private Instance _instance;
private Socket _fd;
private string _host;
@@ -754,6 +786,8 @@ namespace IceSSL
private int _state;
private IAsyncResult _writeResult;
private IAsyncResult _readResult;
+ private IceInternal.AsyncCallback _readCallback;
+ private IceInternal.AsyncCallback _writeCallback;
private X509Certificate2[] _chain;
private const int StateNeedConnect = 0;
diff --git a/cs/src/Makefile.mak b/cs/src/Makefile.mak
index cb2ece80039..bfd84b5412a 100644
--- a/cs/src/Makefile.mak
+++ b/cs/src/Makefile.mak
@@ -11,12 +11,16 @@ top_srcdir = ..
!include $(top_srcdir)\config\Make.rules.mak.cs
-SUBDIRS = Ice IceStorm Glacier2 IcePatch2 IceGrid IceBox
+SUBDIRS = Ice IceStorm Glacier2 IcePatch2 IceGrid
-!if "$(COMPACT)" != "yes"
+!if "$(COMPACT)" != "yes" && "$(SILVERLIGHT)" != "yes"
SUBDIRS = $(SUBDIRS) IceSSL
!endif
+!if "$(SILVERLIGHT)" != "yes"
+SUBDIRS = $(SUBDIRS) IceBox PolicyServer
+!endif
+
$(EVERYTHING)::
@for %i in ( $(SUBDIRS) ) do \
@echo "making $@ in %i" && \
diff --git a/cs/src/PolicyServer/AssemblyInfo.cs b/cs/src/PolicyServer/AssemblyInfo.cs
new file mode 100644
index 00000000000..fc57cb98c8a
--- /dev/null
+++ b/cs/src/PolicyServer/AssemblyInfo.cs
@@ -0,0 +1,45 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice for Silverlight is licensed to you under the terms
+// described in the ICESL_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("PolicyServer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("PolicyServer")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ddd45a23-8a57-4389-aad4-401a2ae2a7fa")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/src/PolicyServer/Makefile.mak b/cs/src/PolicyServer/Makefile.mak
new file mode 100644
index 00000000000..54a9e1b2c75
--- /dev/null
+++ b/cs/src/PolicyServer/Makefile.mak
@@ -0,0 +1,39 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice for Silverlight is licensed to you under the terms
+# described in the ICESL_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..\..
+
+TARGETS = $(bindir)\policyserver.exe
+TARGETS_CONFIG = $(TARGETS:.exe=.exe.config)
+
+SRCS = PolicyServer.cs \
+ AssemblyInfo.cs
+
+!include $(top_srcdir)\config\Make.rules.mak.cs
+
+MCS = csc -nologo
+
+MCSFLAGS = -warnaserror -d:MAKEFILE_BUILD
+!if "$(DEBUG)" == "yes"
+MCSFLAGS = $(MCSFLAGS) -debug -define:DEBUG
+!endif
+
+!if "$(OPTIMIZE)" == "yes"
+MCSFLAGS = $(MCSFLAGS) -optimize+
+!endif
+
+MCSFLAGS = $(MCSFLAGS) -target:exe
+
+$(bindir)\policyserver.exe: $(SRCS)
+ $(MCS) $(MCSFLAGS) -out:$@ $(SRCS)
+
+!if "$(DEBUG)" == "yes"
+clean::
+ del /q $(bindir)\policyserver.pdb
+!endif \ No newline at end of file
diff --git a/cs/src/PolicyServer/PolicyServer.cs b/cs/src/PolicyServer/PolicyServer.cs
new file mode 100644
index 00000000000..487700dfe17
--- /dev/null
+++ b/cs/src/PolicyServer/PolicyServer.cs
@@ -0,0 +1,127 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice for Silverlight is licensed to you under the terms
+// described in the ICESL_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.IO;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+using System.Text;
+
+namespace PolicyService
+{
+
+//
+// This class implements a simple policy server for
+// Silverlight.
+//
+public sealed class PolicyServer : IDisposable
+{
+ public PolicyServer(string ipAddress, string policyFile)
+ {
+ _ipAddress = ipAddress;
+ _policyFile = policyFile;
+ }
+
+ public void Start()
+ {
+ IPAddress address = null;
+ try
+ {
+ address = IPAddress.Parse(_ipAddress);
+ }
+ catch(System.FormatException ex)
+ {
+ Console.WriteLine("Invalid IP address format: " + _ipAddress);
+ Console.WriteLine(ex.ToString());
+ return;
+ }
+ // Read policy file
+ try
+ {
+ _policyBytes = File.ReadAllBytes(_policyFile);
+ }
+ catch(System.IO.IOException ex)
+ {
+ Console.WriteLine("Error reading policy file: " + _policyFile);
+ Console.WriteLine(ex.ToString());
+ return;
+ }
+ _policyListener = new TcpListener(address, 943);
+ try
+ {
+ // Listen for policy requests
+ _policyListener.Start();
+ }
+ catch(SocketException ex)
+ {
+ Console.WriteLine("Error starting Policy Server:\n" + ex.ToString());
+ return;
+ }
+ Console.WriteLine("Policy Server started...");
+ // Start policy response thread
+ Thread policyThread = new Thread(ServePolicy);
+ policyThread.IsBackground = true;
+ policyThread.Start();
+ policyThread.Join();
+ }
+
+ private void ServePolicy()
+ {
+ while(true)
+ {
+ Console.WriteLine("Accepting Policy Requests...");
+ using(Socket client = _policyListener.AcceptSocket())
+ {
+ Console.WriteLine("Policy Request Accepted...");
+
+ // Get policy request header
+ byte[] buffer = new byte[1024];
+ int bytesReceived = client.Receive(buffer);
+
+ // Basic check of request header
+ string header = Encoding.UTF8.GetString(buffer, 0, bytesReceived);
+ if(header == "<policy-file-request/>")
+ {
+ client.Send(_policyBytes, 0, _policyBytes.Length, SocketFlags.None);
+ }
+ }
+ }
+ }
+
+ public void Dispose()
+ {
+ }
+
+ private string _ipAddress = "";
+ private string _policyFile = "";
+ private byte[] _policyBytes = null; // byte array used to store the response in memory.
+ private TcpListener _policyListener = null;
+}
+
+class Program
+{
+ static void Main(string[] args)
+ {
+ if(args.Length == 2)
+ {
+ // Start our Policy Service
+ using (PolicyServer server = new PolicyServer(args[0], args[1]))
+ {
+ server.Start();
+ }
+ }
+ else
+ {
+ Console.WriteLine("Usage: PolicyServer <ip-address> <policy-file>");
+ }
+ }
+}
+
+}
diff --git a/cs/test/Ice/adapterDeactivation/AllTests.cs b/cs/test/Ice/adapterDeactivation/AllTests.cs
index 08fdaf74d77..e2016faf0c9 100644
--- a/cs/test/Ice/adapterDeactivation/AllTests.cs
+++ b/cs/test/Ice/adapterDeactivation/AllTests.cs
@@ -10,77 +10,90 @@
using System;
using Test;
-public class AllTests
-{
- private static void test(bool b)
- {
- if (!b)
- {
- throw new System.Exception();
- }
- }
-
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
+
+public class AllTests : TestCommon.TestApp
+{
+
+#if SILVERLIGHT
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static TestIntfPrx allTests(Ice.Communicator communicator)
- {
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
- string @ref = "test:default -p 12010";
- Ice.ObjectPrx @base = communicator.stringToProxy(@ref);
- test(@base != null);
- Console.Out.WriteLine("ok");
-
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
- TestIntfPrx obj = TestIntfPrxHelper.checkedCast(@base);
- test(obj != null);
- test(obj.Equals(@base));
- Console.Out.WriteLine("ok");
-
- {
- Console.Out.Write("creating/destroying/recreating object adapter... ");
- Console.Out.Flush();
- Ice.ObjectAdapter adapter =
- communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default");
- try
- {
- communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default");
- test(false);
- }
- catch(Ice.AlreadyRegisteredException)
- {
- }
- adapter.destroy();
-
- //
- // Use a different port than the first adapter to avoid an "address already in use" error.
- //
- adapter = communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default");
- adapter.destroy();
- Console.Out.WriteLine("ok");
- }
-
- Console.Out.Write("creating/activating/deactivating object adapter in one operation... ");
- Console.Out.Flush();
- obj.transient();
- Console.Out.WriteLine("ok");
-
- Console.Out.Write("deactivating object adapter in the server... ");
- Console.Out.Flush();
- obj.deactivate();
- Console.Out.WriteLine("ok");
-
- Console.Out.Write("testing whether server is gone... ");
- Console.Out.Flush();
- try
- {
- obj.ice_ping();
- throw new System.ApplicationException();
- }
- catch(Ice.LocalException)
- {
- Console.Out.WriteLine("ok");
- }
-
+#endif
+ {
+ Write("testing stringToProxy... ");
+ Flush();
+ string @ref = "test:default -p 12010";
+ Ice.ObjectPrx @base = communicator.stringToProxy(@ref);
+ test(@base != null);
+ WriteLine("ok");
+
+ Write("testing checked cast... ");
+ Flush();
+ TestIntfPrx obj = TestIntfPrxHelper.checkedCast(@base);
+ test(obj != null);
+ test(obj.Equals(@base));
+ WriteLine("ok");
+
+#if !SILVERLIGHT
+ {
+ Write("creating/destroying/recreating object adapter... ");
+ Flush();
+ Ice.ObjectAdapter adapter =
+ communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default");
+ try
+ {
+ communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default");
+ test(false);
+ }
+ catch (Ice.AlreadyRegisteredException)
+ {
+ }
+ adapter.destroy();
+
+ //
+ // Use a different port than the first adapter to avoid an "address already in use" error.
+ //
+ adapter = communicator.createObjectAdapterWithEndpoints("TransientTestAdapter", "default");
+ adapter.destroy();
+ Console.Out.WriteLine("ok");
+ }
+#endif
+ Write("creating/activating/deactivating object adapter in one operation... ");
+ Flush();
+ obj.transient();
+ WriteLine("ok");
+
+ Write("deactivating object adapter in the server... ");
+ Flush();
+ obj.deactivate();
+ WriteLine("ok");
+
+ Write("testing whether server is gone... ");
+ Flush();
+ try
+ {
+ obj.ice_ping();
+ test(false);
+ }
+ catch(Ice.LocalException)
+ {
+ WriteLine("ok");
+ }
+
+#if !SILVERLIGHT
return obj;
- }
+#endif
+ }
}
diff --git a/cs/test/Ice/adapterDeactivation/App.xaml b/cs/test/Ice/adapterDeactivation/App.xaml
new file mode 100644
index 00000000000..eaa4c7ed634
--- /dev/null
+++ b/cs/test/Ice/adapterDeactivation/App.xaml
@@ -0,0 +1,7 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="adapterDeactivation.App"
+ >
+ <Application.Resources>
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/adapterDeactivation/App.xaml.cs b/cs/test/Ice/adapterDeactivation/App.xaml.cs
new file mode 100644
index 00000000000..b3701975102
--- /dev/null
+++ b/cs/test/Ice/adapterDeactivation/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace adapterDeactivation
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch(Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/adapterDeactivation/Makefile b/cs/test/Ice/adapterDeactivation/Makefile
index 3a7e3021ae9..f75dacd72fc 100644
--- a/cs/test/Ice/adapterDeactivation/Makefile
+++ b/cs/test/Ice/adapterDeactivation/Makefile
@@ -11,9 +11,9 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe
-C_SRCS = Client.cs AllTests.cs
+C_SRCS = Client.cs AllTests.cs ../../TestCommon/TestApp.cs
S_SRCS = Server.cs CookieI.cs ServantLocatorI.cs TestI.cs
-COL_SRCS = Collocated.cs AllTests.cs CookieI.cs ServantLocatorI.cs TestI.cs
+COL_SRCS = Collocated.cs AllTests.cs CookieI.cs ServantLocatorI.cs TestI.cs ../../TestCommon/TestApp.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/adapterDeactivation/Makefile.mak b/cs/test/Ice/adapterDeactivation/Makefile.mak
index 294e57e6a63..14c9aab451c 100644
--- a/cs/test/Ice/adapterDeactivation/Makefile.mak
+++ b/cs/test/Ice/adapterDeactivation/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe
-C_SRCS = Client.cs AllTests.cs
+C_SRCS = Client.cs AllTests.cs ..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs CookieI.cs ServantLocatorI.cs TestI.cs
-COL_SRCS = Collocated.cs AllTests.cs CookieI.cs ServantLocatorI.cs TestI.cs
+COL_SRCS = Collocated.cs AllTests.cs CookieI.cs ServantLocatorI.cs TestI.cs ..\..\TestCommon\TestApp.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/adapterDeactivation/Properties/AppManifest.xml b/cs/test/Ice/adapterDeactivation/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/adapterDeactivation/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/adapterDeactivation/Properties/AssemblyInfo.cs b/cs/test/Ice/adapterDeactivation/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..3a590bb744e
--- /dev/null
+++ b/cs/test/Ice/adapterDeactivation/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("adapterDeactivation")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("adapterDeactivation")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("2fd7fe0f-de28-4b62-bbdb-e40fa6ba823a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/adapterDeactivation/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/adapterDeactivation/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..4ce974c4f87
--- /dev/null
+++ b/cs/test/Ice/adapterDeactivation/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Adapter Deactivation Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Adapter Deactivation Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Adapter Deactivation Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/adapterDeactivation/adapterDeactivation.csproj b/cs/test/Ice/adapterDeactivation/adapterDeactivation.csproj
new file mode 100644
index 00000000000..01398aeabe5
--- /dev/null
+++ b/cs/test/Ice/adapterDeactivation/adapterDeactivation.csproj
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{73497706-4139-4821-B8DF-E83654E6EE55}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>adapterDeactivation</RootNamespace>
+ <AssemblyName>adapterDeactivation</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>adapterDeactivation.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>adapterDeactivation.App</SilverlightAppEntry>
+ <TestPageFileName>adapterDeactivation.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/ami/AllTests.cs b/cs/test/Ice/ami/AllTests.cs
index 90c0d474d0b..1612edd5694 100644
--- a/cs/test/Ice/ami/AllTests.cs
+++ b/cs/test/Ice/ami/AllTests.cs
@@ -12,18 +12,22 @@ using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
-using Test;
-
-public class AllTests
+using Test;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
+
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
private class Cookie
{
public Cookie(int i)
@@ -616,7 +620,23 @@ public class AllTests
ThrowType _t;
}
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData id = new Ice.InitializationData();
+ id.properties = Ice.Util.createProperties();
+ id.properties.setProperty("Ice.Warn.AMICallback", "0");
+ id.properties.setProperty("Ice.FactoryAssemblies", "ami,version=1.0.0.0");
+ return id;
+ }
+
+
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static void allTests(Ice.Communicator communicator)
+#endif
{
string sref = "test:default -p 12010";
Ice.ObjectPrx obj = communicator.stringToProxy(sref);
@@ -630,8 +650,8 @@ public class AllTests
Test.TestIntfControllerPrx testController = Test.TestIntfControllerPrxHelper.uncheckedCast(obj);
- Console.Out.Write("testing begin/end invocation... ");
- Console.Out.Flush();
+ Write("testing begin/end invocation... ");
+ Flush();
{
Ice.AsyncResult result;
Dictionary<string, string> ctx = new Dictionary<string, string>();
@@ -685,10 +705,10 @@ public class AllTests
{
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing async callback... ");
- Console.Out.Flush();
+ Write("testing async callback... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
Dictionary<string, string> ctx = new Dictionary<string, string>();
@@ -758,10 +778,10 @@ public class AllTests
p.begin_opWithUE(ctx, cbWC.opWithUE, cookie);
cbWC.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing response callback... ");
- Console.Out.Flush();
+ Write("testing response callback... ");
+ Flush();
{
ResponseCallback cb = new ResponseCallback();
Dictionary<string, string> ctx = new Dictionary<string, string>();
@@ -801,10 +821,10 @@ public class AllTests
p.begin_opWithUE(ctx).whenCompleted(cb.op, cb.opWithUE);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing local exceptions... ");
- Console.Out.Flush();
+ Write("testing local exceptions... ");
+ Flush();
{
Test.TestIntfPrx indirect = Test.TestIntfPrxHelper.uncheckedCast(p.ice_adapterId("dummy"));
Ice.AsyncResult r;
@@ -849,10 +869,10 @@ public class AllTests
// Expected.
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing local exceptions with async callback... ");
- Console.Out.Flush();
+ Write("testing local exceptions with async callback... ");
+ Flush();
{
Test.TestIntfPrx i = Test.TestIntfPrxHelper.uncheckedCast(p.ice_adapterId("dummy"));
AsyncCallback cb = new AsyncCallback();
@@ -884,10 +904,10 @@ public class AllTests
i.begin_op(cbWC.opEx, cookie);
cbWC.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing local exceptions with response callback... ");
- Console.Out.Flush();
+ Write("testing local exceptions with response callback... ");
+ Flush();
{
Test.TestIntfPrx i = Test.TestIntfPrxHelper.uncheckedCast(p.ice_adapterId("dummy"));
ExceptionCallback cb = new ExceptionCallback();
@@ -907,10 +927,10 @@ public class AllTests
i.begin_op().whenCompleted(cb.op, cb.ex);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing exception callback... ");
- Console.Out.Flush();
+ Write("testing exception callback... ");
+ Flush();
{
Test.TestIntfPrx i = Test.TestIntfPrxHelper.uncheckedCast(p.ice_adapterId("dummy"));
ExceptionCallback cb = new ExceptionCallback();
@@ -936,10 +956,10 @@ public class AllTests
p.begin_opWithUE().whenCompleted(cb.opWithUE);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing sent callback... ");
- Console.Out.Flush();
+ Write("testing sent callback... ");
+ Flush();
{
SentCallback cb = new SentCallback();
@@ -988,10 +1008,10 @@ public class AllTests
cb3.check();
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing illegal arguments... ");
- Console.Out.Flush();
+ Write("testing illegal arguments... ");
+ Flush();
{
Ice.AsyncResult result;
@@ -1025,10 +1045,10 @@ public class AllTests
{
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing unexpected exceptions from callback... ");
- Console.Out.Flush();
+ Write("testing unexpected exceptions from callback... ");
+ Flush();
{
Test.TestIntfPrx q = Test.TestIntfPrxHelper.uncheckedCast(p.ice_adapterId("dummy"));
ThrowType[] throwEx = new ThrowType[]{ ThrowType.LocalException, ThrowType.UserException,
@@ -1054,10 +1074,10 @@ public class AllTests
cb.check();
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing batch requests with proxy... ");
- Console.Out.Flush();
+ Write("testing batch requests with proxy... ");
+ Flush();
{
Cookie cookie = new Cookie(5);
@@ -1131,10 +1151,10 @@ public class AllTests
test(p.opBatchCount() == 0);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing batch requests with connection... ");
- Console.Out.Flush();
+ Write("testing batch requests with connection... ");
+ Flush();
{
Cookie cookie = new Cookie(5);
@@ -1208,10 +1228,10 @@ public class AllTests
test(p.opBatchCount() == 0);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing batch requests with communicator... ");
- Console.Out.Flush();
+ Write("testing batch requests with communicator... ");
+ Flush();
{
Cookie cookie = new Cookie(5);
@@ -1422,10 +1442,10 @@ public class AllTests
test(p.opBatchCount() == 0);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing AsyncResult operations... ");
- Console.Out.Flush();
+ Write("testing AsyncResult operations... ");
+ Flush();
{
{
testController.holdAdapter();
@@ -1532,7 +1552,7 @@ public class AllTests
communicator.end_flushBatchRequests(r);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
p.shutdown();
}
diff --git a/cs/test/Ice/ami/App.xaml b/cs/test/Ice/ami/App.xaml
new file mode 100644
index 00000000000..2d0e5903511
--- /dev/null
+++ b/cs/test/Ice/ami/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="ami.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/ami/App.xaml.cs b/cs/test/Ice/ami/App.xaml.cs
new file mode 100644
index 00000000000..1bd477866bc
--- /dev/null
+++ b/cs/test/Ice/ami/App.xaml.cs
@@ -0,0 +1,80 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace ami
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/ami/Makefile b/cs/test/Ice/ami/Makefile
index 8d33a2cb93d..438720aa17b 100644
--- a/cs/test/Ice/ami/Makefile
+++ b/cs/test/Ice/ami/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = Server.cs TestI.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/ami/Makefile.mak b/cs/test/Ice/ami/Makefile.mak
index 8081d312f40..1408373b05b 100644
--- a/cs/test/Ice/ami/Makefile.mak
+++ b/cs/test/Ice/ami/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs TestI.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/ami/Properties/AppManifest.xml b/cs/test/Ice/ami/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/ami/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/ami/Properties/AssemblyInfo.cs b/cs/test/Ice/ami/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..5b9a4c59623
--- /dev/null
+++ b/cs/test/Ice/ami/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("ami")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("ami")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("b9651a78-cce8-4dcf-9d08-45fa7a88d0d6")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/ami/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/ami/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..2e7ddbf04ed
--- /dev/null
+++ b/cs/test/Ice/ami/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="AMI Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>AMI Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="AMI Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/ami/ami.csproj b/cs/test/Ice/ami/ami.csproj
new file mode 100644
index 00000000000..8b9000ca981
--- /dev/null
+++ b/cs/test/Ice/ami/ami.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7A9447E3-31BF-46DF-A3FF-B4DF792DE86F}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>ami</RootNamespace>
+ <AssemblyName>ami</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>ami.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>ami.App</SilverlightAppEntry>
+ <TestPageFileName>amiTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/background/Acceptor.cs b/cs/test/Ice/background/Acceptor.cs
index 714be24ce04..f986a7c9bf1 100644
--- a/cs/test/Ice/background/Acceptor.cs
+++ b/cs/test/Ice/background/Acceptor.cs
@@ -22,7 +22,7 @@ internal class Acceptor : IceInternal.Acceptor
_acceptor.listen();
}
- public bool startAccept(AsyncCallback callback, object state)
+ public bool startAccept(IceInternal.AsyncCallback callback, object state)
{
return _acceptor.startAccept(callback, state);
}
diff --git a/cs/test/Ice/background/Transceiver.cs b/cs/test/Ice/background/Transceiver.cs
index a3a59cc9d07..297dc9dfd90 100644
--- a/cs/test/Ice/background/Transceiver.cs
+++ b/cs/test/Ice/background/Transceiver.cs
@@ -64,7 +64,7 @@ internal class Transceiver : IceInternal.Transceiver
return _transceiver.read(buf);
}
- public bool startRead(IceInternal.Buffer buf, AsyncCallback callback, object state)
+ public bool startRead(IceInternal.Buffer buf, IceInternal.AsyncCallback callback, object state)
{
if(_configuration.readReady())
{
@@ -79,7 +79,7 @@ internal class Transceiver : IceInternal.Transceiver
_transceiver.finishRead(buf);
}
- public bool startWrite(IceInternal.Buffer buf, AsyncCallback callback, object state, out bool completed)
+ public bool startWrite(IceInternal.Buffer buf, IceInternal.AsyncCallback callback, object state, out bool completed)
{
_configuration.checkWriteException();
return _transceiver.startWrite(buf, callback, state, out completed);
diff --git a/cs/test/Ice/binding/AllTests.cs b/cs/test/Ice/binding/AllTests.cs
index 6e1545b825d..753896bcb9b 100644
--- a/cs/test/Ice/binding/AllTests.cs
+++ b/cs/test/Ice/binding/AllTests.cs
@@ -12,18 +12,22 @@ using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
-using Test;
-
-public class AllTests
+using Test;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
+
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
private class GetAdapterNameCB
{
public void response(string name)
@@ -71,66 +75,70 @@ public class AllTests
GetAdapterNameCB cb = new GetAdapterNameCB();
test.begin_getAdapterName().whenCompleted(cb.response, cb.exception);
return cb.getResult();
- }
-
- private static void shuffle(ref ArrayList array)
- {
- for(int i = 0; i < array.Count - 1; ++i)
- {
- int r = rand_.Next(array.Count - i) + i;
- Debug.Assert(r >= i && r < array.Count);
- if(r != i)
- {
- object tmp = array[i];
- array[i] = array[r];
- array[r] = tmp;
- }
- }
- }
-
- private static TestIntfPrx createTestIntfPrx(ArrayList adapters)
- {
- ArrayList endpoints = new ArrayList();
- TestIntfPrx obj = null;
- IEnumerator p = adapters.GetEnumerator();
- while(p.MoveNext())
- {
- obj = ((RemoteObjectAdapterPrx)p.Current).getTestIntf();
- foreach(Ice.Endpoint e in obj.ice_getEndpoints())
- {
- endpoints.Add(e);
- }
- }
- return TestIntfPrxHelper.uncheckedCast(
- obj.ice_endpoints((Ice.Endpoint[])endpoints.ToArray(typeof(Ice.Endpoint))));
- }
-
- private static void deactivate(RemoteCommunicatorPrx communicator, ArrayList adapters)
- {
- IEnumerator p = adapters.GetEnumerator();
- while(p.MoveNext())
- {
- communicator.deactivateObjectAdapter((RemoteObjectAdapterPrx)p.Current);
- }
- }
-
- private class StringComparator : IComparer
- {
- public int Compare(object l, object r)
- {
- return ((string)l).CompareTo((string)r);
- }
- };
-
+ }
+
+ private static void shuffle(ref List<RemoteObjectAdapterPrx> array)
+ {
+ for (int i = 0; i < array.Count - 1; ++i)
+ {
+ int r = rand_.Next(array.Count - i) + i;
+ Debug.Assert(r >= i && r < array.Count);
+ if (r != i)
+ {
+ RemoteObjectAdapterPrx tmp = array[i];
+ array[i] = array[r];
+ array[r] = tmp;
+ }
+ }
+ }
+
+ private static TestIntfPrx createTestIntfPrx(List<RemoteObjectAdapterPrx> adapters)
+ {
+ List<Ice.Endpoint> endpoints = new List<Ice.Endpoint>();
+ TestIntfPrx obj = null;
+ IEnumerator<RemoteObjectAdapterPrx> p = adapters.GetEnumerator();
+ while(p.MoveNext())
+ {
+ obj = p.Current.getTestIntf();
+ foreach(Ice.Endpoint e in obj.ice_getEndpoints())
+ {
+ endpoints.Add(e);
+ }
+ }
+ return TestIntfPrxHelper.uncheckedCast(obj.ice_endpoints(endpoints.ToArray()));
+ }
+
+ private static void deactivate(RemoteCommunicatorPrx communicator, List<RemoteObjectAdapterPrx> adapters)
+ {
+ IEnumerator<RemoteObjectAdapterPrx> p = adapters.GetEnumerator();
+ while (p.MoveNext())
+ {
+ communicator.deactivateObjectAdapter(p.Current);
+ }
+ }
+
+ private class StringComparator : IComparer<String>
+ {
+ public int Compare(String l, String r)
+ {
+ return l.CompareTo(r);
+ }
+ };
+
+#if SILVERLIGHT
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static void allTests(Ice.Communicator communicator)
+#endif
{
string @ref = "communicator:default -p 12010";
RemoteCommunicatorPrx com = RemoteCommunicatorPrxHelper.uncheckedCast(communicator.stringToProxy(@ref));
System.Random rand = new System.Random(unchecked((int)System.DateTime.Now.Ticks));
- Console.Out.Write("testing binding with single endpoint... ");
- Console.Out.Flush();
+ Write("testing binding with single endpoint... ");
+ Flush();
{
RemoteObjectAdapterPrx adapter = com.createObjectAdapter("Adapter", "default");
@@ -156,12 +164,12 @@ public class AllTests
{
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing binding with multiple endpoints... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing binding with multiple endpoints... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("Adapter11", "default"));
adapters.Add(com.createObjectAdapter("Adapter12", "default"));
adapters.Add(com.createObjectAdapter("Adapter13", "default"));
@@ -175,8 +183,8 @@ public class AllTests
names.Add("Adapter12");
names.Add("Adapter13");
while(names.Count > 0)
- {
- ArrayList adpts = new ArrayList(adapters);
+ {
+ List<RemoteObjectAdapterPrx> adpts = new List<RemoteObjectAdapterPrx>(adapters);
TestIntfPrx test1 = createTestIntfPrx(adpts);
shuffle(ref adpts);
@@ -222,8 +230,8 @@ public class AllTests
names.Add("Adapter12");
names.Add("Adapter13");
while(names.Count > 0)
- {
- ArrayList adpts = new ArrayList(adapters);
+ {
+ List<RemoteObjectAdapterPrx> adpts = new List<RemoteObjectAdapterPrx>(adapters);
TestIntfPrx test1 = createTestIntfPrx(adpts);
shuffle(ref adpts);
@@ -248,10 +256,10 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing binding with multiple random endpoints... ");
- Console.Out.Flush();
+ Write("testing binding with multiple random endpoints... ");
+ Flush();
{
RemoteObjectAdapterPrx[] adapters = new RemoteObjectAdapterPrx[5];
adapters[0] = com.createObjectAdapter("AdapterRandom11", "default");
@@ -305,7 +313,7 @@ public class AllTests
{
adpts[j] = adapters[rand.Next(adapters.Length)];
}
- proxies[i] = createTestIntfPrx(new ArrayList(adpts));
+ proxies[i] = createTestIntfPrx(new List<RemoteObjectAdapterPrx>(adpts));
}
for(i = 0; i < proxies.Length; i++)
@@ -321,9 +329,9 @@ public class AllTests
catch(Ice.LocalException)
{
}
- }
-
- ArrayList connections = new ArrayList();
+ }
+
+ List<Ice.Connection> connections = new List<Ice.Connection>();
for(i = 0; i < proxies.Length; i++)
{
if(proxies[i].ice_getCachedConnection() != null)
@@ -349,12 +357,12 @@ public class AllTests
}
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing binding with multiple endpoints and AMI... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing binding with multiple endpoints and AMI... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("AdapterAMI11", "default"));
adapters.Add(com.createObjectAdapter("AdapterAMI12", "default"));
adapters.Add(com.createObjectAdapter("AdapterAMI13", "default"));
@@ -368,8 +376,8 @@ public class AllTests
names.Add("AdapterAMI12");
names.Add("AdapterAMI13");
while(names.Count > 0)
- {
- ArrayList adpts = new ArrayList(adapters);
+ {
+ List<RemoteObjectAdapterPrx> adpts = new List<RemoteObjectAdapterPrx>(adapters);
TestIntfPrx test1 = createTestIntfPrx(adpts);
shuffle(ref adpts);
@@ -415,8 +423,8 @@ public class AllTests
names.Add("AdapterAMI12");
names.Add("AdapterAMI13");
while(names.Count > 0)
- {
- ArrayList adpts = new ArrayList(adapters);
+ {
+ List<RemoteObjectAdapterPrx> adpts = new List<RemoteObjectAdapterPrx>(adapters);
TestIntfPrx test1 = createTestIntfPrx(adpts);
shuffle(ref adpts);
@@ -441,12 +449,12 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing random endpoint selection... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing random endpoint selection... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("Adapter21", "default"));
adapters.Add(com.createObjectAdapter("Adapter22", "default"));
adapters.Add(com.createObjectAdapter("Adapter23", "default"));
@@ -478,12 +486,12 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing ordered endpoint selection... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing ordered endpoint selection... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("Adapter31", "default"));
adapters.Add(com.createObjectAdapter("Adapter32", "default"));
adapters.Add(com.createObjectAdapter("Adapter33", "default"));
@@ -538,10 +546,10 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing per request binding with single endpoint... ");
- Console.Out.Flush();
+ Write("testing per request binding with single endpoint... ");
+ Flush();
{
RemoteObjectAdapterPrx adapter = com.createObjectAdapter("Adapter41", "default");
@@ -565,12 +573,12 @@ public class AllTests
{
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing per request binding with multiple endpoints... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing per request binding with multiple endpoints... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("Adapter51", "default"));
adapters.Add(com.createObjectAdapter("Adapter52", "default"));
adapters.Add(com.createObjectAdapter("Adapter53", "default"));
@@ -603,12 +611,12 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing per request binding with multiple endpoints and AMI... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing per request binding with multiple endpoints and AMI... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("AdapterAMI51", "default"));
adapters.Add(com.createObjectAdapter("AdapterAMI52", "default"));
adapters.Add(com.createObjectAdapter("AdapterAMI53", "default"));
@@ -641,12 +649,12 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing per request binding and ordered endpoint selection... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing per request binding and ordered endpoint selection... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("Adapter61", "default"));
adapters.Add(com.createObjectAdapter("Adapter62", "default"));
adapters.Add(com.createObjectAdapter("Adapter63", "default"));
@@ -701,12 +709,12 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing per request binding and ordered endpoint selection and AMI... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing per request binding and ordered endpoint selection and AMI... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("AdapterAMI61", "default"));
adapters.Add(com.createObjectAdapter("AdapterAMI62", "default"));
adapters.Add(com.createObjectAdapter("AdapterAMI63", "default"));
@@ -761,12 +769,13 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing endpoint mode filtering... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+#if !SILVERLIGHT
+ Write("testing endpoint mode filtering... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("Adapter71", "default"));
adapters.Add(com.createObjectAdapter("Adapter72", "udp"));
@@ -783,14 +792,14 @@ public class AllTests
{
}
}
- Console.Out.WriteLine("ok");
-
+ WriteLine("ok");
+#endif
if(communicator.getProperties().getProperty("Ice.Plugin.IceSSL").Length > 0)
{
- Console.Out.Write("testing unsecure vs. secure endpoints... ");
- Console.Out.Flush();
- {
- ArrayList adapters = new ArrayList();
+ Write("testing unsecure vs. secure endpoints... ");
+ Flush();
+ {
+ List<RemoteObjectAdapterPrx> adapters = new List<RemoteObjectAdapterPrx>();
adapters.Add(com.createObjectAdapter("Adapter81", "ssl"));
adapters.Add(com.createObjectAdapter("Adapter82", "tcp"));
@@ -838,7 +847,7 @@ public class AllTests
deactivate(com, adapters);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
com.shutdown();
diff --git a/cs/test/Ice/binding/App.xaml b/cs/test/Ice/binding/App.xaml
new file mode 100644
index 00000000000..3f4529dd63f
--- /dev/null
+++ b/cs/test/Ice/binding/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="binding.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/binding/App.xaml.cs b/cs/test/Ice/binding/App.xaml.cs
new file mode 100644
index 00000000000..8dd2b28bf41
--- /dev/null
+++ b/cs/test/Ice/binding/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace binding
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch(Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/binding/Client.cs b/cs/test/Ice/binding/Client.cs
index d79b48bcb42..1f682148b50 100644
--- a/cs/test/Ice/binding/Client.cs
+++ b/cs/test/Ice/binding/Client.cs
@@ -41,7 +41,7 @@ public class Client
}
catch(System.Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ System.Console.Error.WriteLine(ex.ToString());
status = 1;
}
diff --git a/cs/test/Ice/binding/Makefile b/cs/test/Ice/binding/Makefile
index fb9321074c5..dfac145618b 100644
--- a/cs/test/Ice/binding/Makefile
+++ b/cs/test/Ice/binding/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = Server.cs TestI.cs RemoteObjectAdapterI.cs RemoteCommunicatorI.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/binding/Makefile.mak b/cs/test/Ice/binding/Makefile.mak
index 26f95ac08f4..0f635a61233 100644
--- a/cs/test/Ice/binding/Makefile.mak
+++ b/cs/test/Ice/binding/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs TestI.cs RemoteObjectAdapterI.cs RemoteCommunicatorI.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/binding/Properties/AppManifest.xml b/cs/test/Ice/binding/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/binding/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/binding/Properties/AssemblyInfo.cs b/cs/test/Ice/binding/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..b6da22dcc94
--- /dev/null
+++ b/cs/test/Ice/binding/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("binding")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("binding")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("6b218ca6-e358-411e-9647-de0f61d5d9bb")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/binding/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/binding/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..9b8aeaca7d0
--- /dev/null
+++ b/cs/test/Ice/binding/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Binding Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Binding Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Binding Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/binding/binding.csproj b/cs/test/Ice/binding/binding.csproj
new file mode 100644
index 00000000000..814d96ccb70
--- /dev/null
+++ b/cs/test/Ice/binding/binding.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{974F0F9B-7EB4-4566-B5C8-1313AE9218A5}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>binding</RootNamespace>
+ <AssemblyName>binding</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>binding.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>binding.App</SilverlightAppEntry>
+ <TestPageFileName>bindingTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/defaultServant/Properties/AppManifest.xml b/cs/test/Ice/defaultServant/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/defaultServant/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/defaultServant/Properties/AssemblyInfo.cs b/cs/test/Ice/defaultServant/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..a4c806a38e4
--- /dev/null
+++ b/cs/test/Ice/defaultServant/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("defaultValue")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("defaultValue")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("d18112f7-647f-489c-9a63-7d56b6ce4e7c")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/defaultServant/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/defaultServant/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..f0ec824ecad
--- /dev/null
+++ b/cs/test/Ice/defaultServant/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Default Value Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Default Value Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Default Value Test" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/defaultValue/AllTests.cs b/cs/test/Ice/defaultValue/AllTests.cs
index 45c12e92666..8272d5240c1 100644
--- a/cs/test/Ice/defaultValue/AllTests.cs
+++ b/cs/test/Ice/defaultValue/AllTests.cs
@@ -7,23 +7,31 @@
//
// **********************************************************************
-using System;
+using System;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
+#if SILVERLIGHT
+ override
+ public void run(Ice.Communicator communicator)
+#else
+ public static void allTests()
+#endif
{
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
- public static void
- allTests()
- {
- Console.Out.Write("testing default values... ");
- Console.Out.Flush();
+ Write("testing default values... ");
+ Flush();
{
Test.Struct1 v = new Test.Struct1();
@@ -279,6 +287,6 @@ public class AllTests
test(v.zeroDotD == 0);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
}
diff --git a/cs/test/Ice/defaultValue/App.xaml b/cs/test/Ice/defaultValue/App.xaml
new file mode 100644
index 00000000000..b2468c1c4f5
--- /dev/null
+++ b/cs/test/Ice/defaultValue/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="defaultValue.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/defaultValue/App.xaml.cs b/cs/test/Ice/defaultValue/App.xaml.cs
new file mode 100644
index 00000000000..e19e09587be
--- /dev/null
+++ b/cs/test/Ice/defaultValue/App.xaml.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace defaultValue
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/defaultValue/Makefile b/cs/test/Ice/defaultValue/Makefile
index 004dc416124..7a28790f8a3 100644
--- a/cs/test/Ice/defaultValue/Makefile
+++ b/cs/test/Ice/defaultValue/Makefile
@@ -12,7 +12,8 @@ top_srcdir = ../../..
TARGETS = client.exe
C_SRCS = Client.cs \
- AllTests.cs
+ AllTests.cs \
+ ../../TestCommon/TestApp.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/defaultValue/Makefile.mak b/cs/test/Ice/defaultValue/Makefile.mak
index bea9e32c4ec..ef8be7cb250 100644
--- a/cs/test/Ice/defaultValue/Makefile.mak
+++ b/cs/test/Ice/defaultValue/Makefile.mak
@@ -12,7 +12,8 @@ top_srcdir = ..\..\..
TARGETS = client.exe
C_SRCS = Client.cs \
- AllTests.cs
+ AllTests.cs \
+ ..\..\TestCommon\TestApp.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/defaultValue/Properties/AppManifest.xml b/cs/test/Ice/defaultValue/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/defaultValue/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/defaultValue/Properties/AssemblyInfo.cs b/cs/test/Ice/defaultValue/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..a4c806a38e4
--- /dev/null
+++ b/cs/test/Ice/defaultValue/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("defaultValue")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("defaultValue")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("d18112f7-647f-489c-9a63-7d56b6ce4e7c")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/defaultValue/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/defaultValue/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..2f3ca9a7a35
--- /dev/null
+++ b/cs/test/Ice/defaultValue/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Default Value Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Default Value Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Default Value Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/defaultValue/defaultValue.csproj b/cs/test/Ice/defaultValue/defaultValue.csproj
new file mode 100644
index 00000000000..1f9c5099034
--- /dev/null
+++ b/cs/test/Ice/defaultValue/defaultValue.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0858ED5B-68D1-444D-912C-6147BC4FC968}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>defaultValue</RootNamespace>
+ <AssemblyName>defaultValue</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>defaultValue.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>defaultValue.App</SilverlightAppEntry>
+ <TestPageFileName>defaultValueTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/dictMapping/AllTests.cs b/cs/test/Ice/dictMapping/AllTests.cs
index 9ceb7b4e10e..38c11e49cad 100644
--- a/cs/test/Ice/dictMapping/AllTests.cs
+++ b/cs/test/Ice/dictMapping/AllTests.cs
@@ -7,35 +7,58 @@
//
// **********************************************************************
-using System;
+using System;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
+#if SILVERLIGHT
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static Test.MyClassPrx allTests(Ice.Communicator communicator, bool collocated)
+#endif
{
- Console.Out.Flush();
+#if SILVERLIGHT
+ bool collocated = false;
+#endif
+ Flush();
string rf = "test:default -p 12010";
Ice.ObjectPrx baseProxy = communicator.stringToProxy(rf);
Test.MyClassPrx cl = Test.MyClassPrxHelper.checkedCast(baseProxy);
- Console.Out.Write("testing twoway operations... ");
- Console.Out.Flush();
+ Write("testing twoway operations... ");
+ Flush();
Twoways.twoways(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
if(!collocated)
{
- Console.Out.Write("testing twoway operations with AMI... ");
- Console.Out.Flush();
+ Write("testing twoway operations with AMI... ");
+ Flush();
TwowaysAMI.twowaysAMI(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing twoway operations with new AMI mapping... ");
- Console.Out.Flush();
+ Write("testing twoway operations with new AMI mapping... ");
+ Flush();
TwowaysNewAMI.twowaysAMI(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
-
+#if SILVERLIGHT
+ cl.shutdown();
+#else
return cl;
+#endif
}
}
diff --git a/cs/test/Ice/dictMapping/App.xaml b/cs/test/Ice/dictMapping/App.xaml
new file mode 100644
index 00000000000..6568b08c934
--- /dev/null
+++ b/cs/test/Ice/dictMapping/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="dictMapping.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/dictMapping/App.xaml.cs b/cs/test/Ice/dictMapping/App.xaml.cs
new file mode 100644
index 00000000000..93aaa28af63
--- /dev/null
+++ b/cs/test/Ice/dictMapping/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace dictMapping
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/dictMapping/Makefile b/cs/test/Ice/dictMapping/Makefile
index 660908e7304..1badd66a8cb 100644
--- a/cs/test/Ice/dictMapping/Makefile
+++ b/cs/test/Ice/dictMapping/Makefile
@@ -11,9 +11,10 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs ../../TestCommon/TestApp.cs
S_SRCS = MyClassI.cs Server.cs
-COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs
+COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs \
+ ../../TestCommon/TestApp.cs
SAMD_SRCS = MyClassAMDI.cs Server.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/dictMapping/Makefile.mak b/cs/test/Ice/dictMapping/Makefile.mak
index 6f77989ad2c..9225248f7b8 100644
--- a/cs/test/Ice/dictMapping/Makefile.mak
+++ b/cs/test/Ice/dictMapping/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs ..\..\TestCommon\TestApp.cs
S_SRCS = MyClassI.cs Server.cs
-COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs
+COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs ..\..\TestCommon\TestApp.cs
SAMD_SRCS = MyClassAMDI.cs Server.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/dictMapping/Properties/AppManifest.xml b/cs/test/Ice/dictMapping/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/dictMapping/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/dictMapping/Properties/AssemblyInfo.cs b/cs/test/Ice/dictMapping/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..5bf9f45d74a
--- /dev/null
+++ b/cs/test/Ice/dictMapping/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("dictMapping")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("dictMapping")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f42f249d-34fb-4181-b59f-3634b60e49fc")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/dictMapping/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/dictMapping/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..f217244251d
--- /dev/null
+++ b/cs/test/Ice/dictMapping/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Dict Mapping Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Dict Mapping Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Dict Mapping Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/dictMapping/dictMapping.csproj b/cs/test/Ice/dictMapping/dictMapping.csproj
new file mode 100644
index 00000000000..d7cc8c2307a
--- /dev/null
+++ b/cs/test/Ice/dictMapping/dictMapping.csproj
@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{4F085C35-BF17-4947-BB56-E5F48C1C30E8}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>dictMapping</RootNamespace>
+ <AssemblyName>dictMapping</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>dictMapping.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>dictMapping.App</SilverlightAppEntry>
+ <TestPageFileName>dictMappingTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ <Compile Include="Twoways.cs" />
+ <Compile Include="TwowaysAMI.cs" />
+ <Compile Include="TwowaysNewAMI.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/dispatcher/AllTests.cs b/cs/test/Ice/dispatcher/AllTests.cs
index 2c507dc7a48..b2122a30ca0 100644
--- a/cs/test/Ice/dispatcher/AllTests.cs
+++ b/cs/test/Ice/dispatcher/AllTests.cs
@@ -12,18 +12,22 @@ using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
-using Test;
-
-public class AllTests
+using Test;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
+
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
private class Callback
{
internal Callback()
@@ -95,7 +99,21 @@ public class AllTests
private readonly IceUtilInternal.Monitor _m = new IceUtilInternal.Monitor();
}
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.Warn.AMICallback", "0");
+ initData.dispatcher = new Dispatcher().dispatch;
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static void allTests(Ice.Communicator communicator)
+#endif
{
string sref = "test:default -p 12010";
Ice.ObjectPrx obj = communicator.stringToProxy(sref);
@@ -109,8 +127,8 @@ public class AllTests
Test.TestIntfControllerPrx testController = Test.TestIntfControllerPrxHelper.uncheckedCast(obj);
- Console.Out.Write("testing dispatcher... ");
- Console.Out.Flush();
+ Write("testing dispatcher... ");
+ Flush();
{
p.op();
@@ -134,7 +152,7 @@ public class AllTests
testController.resumeAdapter();
r.waitForCompleted();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
p.shutdown();
}
diff --git a/cs/test/Ice/dispatcher/App.xaml b/cs/test/Ice/dispatcher/App.xaml
new file mode 100644
index 00000000000..07914fc91cc
--- /dev/null
+++ b/cs/test/Ice/dispatcher/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="dispatcher.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/dispatcher/App.xaml.cs b/cs/test/Ice/dispatcher/App.xaml.cs
new file mode 100644
index 00000000000..f5186e9a17a
--- /dev/null
+++ b/cs/test/Ice/dispatcher/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace dispatcher
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/dispatcher/Makefile b/cs/test/Ice/dispatcher/Makefile
index 7148129d904..b93dbe5ba4a 100644
--- a/cs/test/Ice/dispatcher/Makefile
+++ b/cs/test/Ice/dispatcher/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs Dispatcher.cs
+C_SRCS = AllTests.cs Client.cs Dispatcher.cs ../../TestCommon/TestApp.cs
S_SRCS = Server.cs TestI.cs Dispatcher.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/dispatcher/Makefile.mak b/cs/test/Ice/dispatcher/Makefile.mak
index 97fcb5894a8..d5b9c440c22 100644
--- a/cs/test/Ice/dispatcher/Makefile.mak
+++ b/cs/test/Ice/dispatcher/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs Dispatcher.cs
+C_SRCS = AllTests.cs Client.cs Dispatcher.cs ..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs TestI.cs Dispatcher.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/dispatcher/Properties/AppManifest.xml b/cs/test/Ice/dispatcher/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/dispatcher/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/dispatcher/Properties/AssemblyInfo.cs b/cs/test/Ice/dispatcher/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..d1a5cc7bb8c
--- /dev/null
+++ b/cs/test/Ice/dispatcher/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("dispatcher")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("dispatcher")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("71633122-5b1a-4fc0-b636-f893e7d28d62")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/dispatcher/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/dispatcher/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..4682bc1b9e0
--- /dev/null
+++ b/cs/test/Ice/dispatcher/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Dispatcher Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Dispatcher Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Dispatcher Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/dispatcher/dispatcher.csproj b/cs/test/Ice/dispatcher/dispatcher.csproj
new file mode 100644
index 00000000000..5ad183f44d3
--- /dev/null
+++ b/cs/test/Ice/dispatcher/dispatcher.csproj
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E71BAF76-681E-43F5-930F-8B547F4978C3}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>dispatcher</RootNamespace>
+ <AssemblyName>dispatcher</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>dispatcher.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>dispatcher.App</SilverlightAppEntry>
+ <TestPageFileName>dispatcherTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Dispatcher.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/exceptions/AllTests.cs b/cs/test/Ice/exceptions/AllTests.cs
index c2f03a86794..b9a2cbeaea1 100644
--- a/cs/test/Ice/exceptions/AllTests.cs
+++ b/cs/test/Ice/exceptions/AllTests.cs
@@ -10,18 +10,22 @@
using System;
using System.Diagnostics;
using System.Threading;
-using Test;
-
-public class AllTests
+using Test;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
+
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
private class Callback
{
internal Callback()
@@ -78,7 +82,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -89,11 +93,11 @@ public class AllTests
}
catch(A ex)
{
- AllTests.test(ex.aMem == 1);
+ test(ex.aMem == 1);
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -119,7 +123,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -131,11 +135,11 @@ public class AllTests
catch(Ice.ObjectNotExistException ex)
{
Ice.Identity id = communicator.stringToIdentity("does not exist");
- AllTests.test(ex.id.Equals(id));
+ test(ex.id.Equals(id));
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -153,7 +157,7 @@ public class AllTests
{
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -164,11 +168,11 @@ public class AllTests
}
catch(Ice.FacetNotExistException ex)
{
- AllTests.test(ex.facet.Equals("no such facet"));
+ test(ex.facet.Equals("no such facet"));
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -193,7 +197,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -204,15 +208,15 @@ public class AllTests
}
catch(A ex)
{
- AllTests.test(ex.aMem == 1);
+ test(ex.aMem == 1);
}
catch(D ex)
{
- AllTests.test(ex.dMem == - 1);
+ test(ex.dMem == - 1);
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -237,7 +241,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -248,12 +252,12 @@ public class AllTests
}
catch(B ex)
{
- AllTests.test(ex.aMem == 1);
- AllTests.test(ex.bMem == 2);
+ test(ex.aMem == 1);
+ test(ex.bMem == 2);
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -278,7 +282,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -289,13 +293,13 @@ public class AllTests
}
catch(C ex)
{
- AllTests.test(ex.aMem == 1);
- AllTests.test(ex.bMem == 2);
- AllTests.test(ex.cMem == 3);
+ test(ex.aMem == 1);
+ test(ex.bMem == 2);
+ test(ex.cMem == 3);
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -320,7 +324,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -331,12 +335,12 @@ public class AllTests
}
catch(B ex)
{
- AllTests.test(ex.aMem == 1);
- AllTests.test(ex.bMem == 2);
+ test(ex.aMem == 1);
+ test(ex.bMem == 2);
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -361,7 +365,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -372,13 +376,13 @@ public class AllTests
}
catch(C ex)
{
- AllTests.test(ex.aMem == 1);
- AllTests.test(ex.bMem == 2);
- AllTests.test(ex.cMem == 3);
+ test(ex.aMem == 1);
+ test(ex.bMem == 2);
+ test(ex.cMem == 3);
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -403,7 +407,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -414,13 +418,13 @@ public class AllTests
}
catch(C ex)
{
- AllTests.test(ex.aMem == 1);
- AllTests.test(ex.bMem == 2);
- AllTests.test(ex.cMem == 3);
+ test(ex.aMem == 1);
+ test(ex.bMem == 2);
+ test(ex.cMem == 3);
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -445,7 +449,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -459,7 +463,7 @@ public class AllTests
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -484,7 +488,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -498,7 +502,7 @@ public class AllTests
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -523,7 +527,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -537,7 +541,7 @@ public class AllTests
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -562,7 +566,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -576,7 +580,7 @@ public class AllTests
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -601,7 +605,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -615,7 +619,7 @@ public class AllTests
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -640,7 +644,7 @@ public class AllTests
}
public override void ice_response()
{
- AllTests.test(false);
+ test(false);
}
public override void ice_exception(Ice.Exception exc)
@@ -651,11 +655,11 @@ public class AllTests
}
catch(Ice.OperationNotExistException ex)
{
- AllTests.test(ex.operation.Equals("noSuchOperation"));
+ test(ex.operation.Equals("noSuchOperation"));
}
catch(Exception)
{
- AllTests.test(false);
+ test(false);
}
callback.called();
}
@@ -949,10 +953,30 @@ public class AllTests
private Ice.Communicator _communicator;
}
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ WriteLine("setting Ice.FactoryAssemblies");
+ initData.properties.setProperty("Ice.FactoryAssemblies", "exceptions,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static ThrowerPrx allTests(Ice.Communicator communicator, bool collocated)
+#endif
{
+#if SILVERLIGHT
+ bool collocated = false;
+ WriteLine("Ice.FactoryAssemblies: " + communicator.getProperties().getProperty("Ice.FactoryAssemblies"));
+#endif
+
+#if !SILVERLIGHT
{
- Console.Write("testing object adapter registration exceptions... ");
+ Write("testing object adapter registration exceptions... ");
Ice.ObjectAdapter first;
try
{
@@ -991,11 +1015,11 @@ public class AllTests
// Expected
}
first.deactivate();
- Console.WriteLine("ok");
+ WriteLine("ok");
}
{
- Console.Write("testing servant registration exceptions... ");
+ Write("testing servant registration exceptions... ");
communicator.getProperties().setProperty("TestAdapter1.Endpoints", "default");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter1");
Ice.Object obj = new EmptyI();
@@ -1019,11 +1043,11 @@ public class AllTests
{
}
adapter.deactivate();
- Console.WriteLine("ok");
+ WriteLine("ok");
}
{
- Console.Write("testing servant locator registration exceptions... ");
+ Write("testing servant locator registration exceptions... ");
communicator.getProperties().setProperty("TestAdapter2.Endpoints", "default");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("TestAdapter2");
Ice.ServantLocator loc = new ServantLocatorI();
@@ -1038,11 +1062,11 @@ public class AllTests
}
adapter.deactivate();
- Console.WriteLine("ok");
+ WriteLine("ok");
}
-
+#endif
{
- Console.Write("testing object factory registration exception... ");
+ Write("testing object factory registration exception... ");
Ice.ObjectFactory of = new ObjectFactoryI();
communicator.addObjectFactory(of, "::x");
try
@@ -1053,25 +1077,25 @@ public class AllTests
catch(Ice.AlreadyRegisteredException)
{
}
- Console.WriteLine("ok");
+ WriteLine("ok");
}
- Console.Write("testing stringToProxy... ");
- Console.Out.Flush();
+ Write("testing stringToProxy... ");
+ Flush();
String @ref = "thrower:default -p 12010";
Ice.ObjectPrx @base = communicator.stringToProxy(@ref);
test(@base != null);
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
ThrowerPrx thrower = ThrowerPrxHelper.checkedCast(@base);
test(thrower != null);
test(thrower.Equals(@base));
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching exact types... ");
- Console.Out.Flush();
+ Write("catching exact types... ");
+ Flush();
try
{
@@ -1146,10 +1170,10 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching base types... ");
- Console.Out.Flush();
+ Write("catching base types... ");
+ Flush();
try
{
@@ -1180,10 +1204,10 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching derived types... ");
- Console.Out.Flush();
+ Write("catching derived types... ");
+ Flush();
try
{
@@ -1232,12 +1256,12 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
if(thrower.supportsUndeclaredExceptions())
{
- Console.Write("catching unknown user exception... ");
- Console.Out.Flush();
+ Write("catching unknown user exception... ");
+ Flush();
try
{
@@ -1278,11 +1302,11 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
}
- Console.Write("catching object not exist exception... ");
- Console.Out.Flush();
+ Write("catching object not exist exception... ");
+ Flush();
{
Ice.Identity id = communicator.stringToIdentity("does not exist");
@@ -1302,10 +1326,10 @@ public class AllTests
}
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching facet not exist exception... ");
- Console.Out.Flush();
+ Write("catching facet not exist exception... ");
+ Flush();
try
{
@@ -1325,10 +1349,10 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching operation not exist exception... ");
- Console.Out.Flush();
+ Write("catching operation not exist exception... ");
+ Flush();
try
{
@@ -1345,10 +1369,10 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching unknown local exception... ");
- Console.Out.Flush();
+ Write("catching unknown local exception... ");
+ Flush();
try
{
@@ -1363,10 +1387,10 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching unknown non-Ice exception... ");
- Console.Out.Flush();
+ Write("catching unknown non-Ice exception... ");
+ Flush();
try
{
@@ -1381,10 +1405,10 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("testing asynchronous exceptions... ");
- Console.Out.Flush();
+ Write("testing asynchronous exceptions... ");
+ Flush();
try
{
@@ -1408,12 +1432,12 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
if(!collocated)
{
- Console.Write("catching exact types with AMI... ");
- Console.Out.Flush();
+ Write("catching exact types with AMI... ");
+ Flush();
{
AMI_Thrower_throwAasAI cb = new AMI_Thrower_throwAasAI();
@@ -1445,10 +1469,10 @@ public class AllTests
cb.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching derived types... ");
- Console.Out.Flush();
+ Write("catching derived types... ");
+ Flush();
{
AMI_Thrower_throwBasAI cb = new AMI_Thrower_throwBasAI();
@@ -1468,12 +1492,12 @@ public class AllTests
cb.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
if(thrower.supportsUndeclaredExceptions())
{
- Console.Write("catching unknown user exception with AMI... ");
- Console.Out.Flush();
+ Write("catching unknown user exception with AMI... ");
+ Flush();
{
AMI_Thrower_throwUndeclaredAI cb = new AMI_Thrower_throwUndeclaredAI();
@@ -1493,11 +1517,11 @@ public class AllTests
cb.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
}
- Console.Write("catching object not exist exception with AMI... ");
- Console.Out.Flush();
+ Write("catching object not exist exception with AMI... ");
+ Flush();
{
Ice.Identity id = communicator.stringToIdentity("does not exist");
@@ -1507,10 +1531,10 @@ public class AllTests
cb.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching facet not exist exception with AMI... ");
- Console.Out.Flush();
+ Write("catching facet not exist exception with AMI... ");
+ Flush();
try
{
@@ -1526,10 +1550,10 @@ public class AllTests
test(false);
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching operation not exist exception with AMI... ");
- Console.Out.Flush();
+ Write("catching operation not exist exception with AMI... ");
+ Flush();
{
AMI_WrongOperation_noSuchOperationI cb = new AMI_WrongOperation_noSuchOperationI();
@@ -1538,10 +1562,10 @@ public class AllTests
cb.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching unknown local exception with AMI... ");
- Console.Out.Flush();
+ Write("catching unknown local exception with AMI... ");
+ Flush();
{
AMI_Thrower_throwLocalExceptionI cb = new AMI_Thrower_throwLocalExceptionI();
@@ -1549,19 +1573,19 @@ public class AllTests
cb.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching unknown non-Ice exception with AMI... ");
- Console.Out.Flush();
+ Write("catching unknown non-Ice exception with AMI... ");
+ Flush();
AMI_Thrower_throwNonIceExceptionI cb2 = new AMI_Thrower_throwNonIceExceptionI();
thrower.throwNonIceException_async(cb2);
cb2.check();
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching exact types with new AMI mapping... ");
- Console.Out.Flush();
+ Write("catching exact types with new AMI mapping... ");
+ Flush();
{
AsyncCallback cb3 = new AsyncCallback();
@@ -1593,10 +1617,10 @@ public class AllTests
cb3.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching derived types with new AMI mapping... ");
- Console.Out.Flush();
+ Write("catching derived types with new AMI mapping... ");
+ Flush();
{
AsyncCallback cb3 = new AsyncCallback();
@@ -1616,12 +1640,12 @@ public class AllTests
cb3.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
if(thrower.supportsUndeclaredExceptions())
{
- Console.Write("catching unknown user exception with new AMI mapping... ");
- Console.Out.Flush();
+ Write("catching unknown user exception with new AMI mapping... ");
+ Flush();
{
AsyncCallback cb3 = new AsyncCallback();
@@ -1641,11 +1665,11 @@ public class AllTests
cb3.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
}
- Console.Write("catching object not exist exception with new AMI mapping... ");
- Console.Out.Flush();
+ Write("catching object not exist exception with new AMI mapping... ");
+ Flush();
{
Ice.Identity id = communicator.stringToIdentity("does not exist");
@@ -1655,10 +1679,10 @@ public class AllTests
cb3.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching facet not exist exception with new AMI mapping... ");
- Console.Out.Flush();
+ Write("catching facet not exist exception with new AMI mapping... ");
+ Flush();
{
ThrowerPrx thrower2 = ThrowerPrxHelper.uncheckedCast(thrower, "no such facet");
@@ -1667,10 +1691,10 @@ public class AllTests
cb3.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching operation not exist exception with new AMI mapping... ");
- Console.Out.Flush();
+ Write("catching operation not exist exception with new AMI mapping... ");
+ Flush();
{
AsyncCallback cb3 = new AsyncCallback();
@@ -1679,10 +1703,10 @@ public class AllTests
cb3.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching unknown local exception with new AMI mapping... ");
- Console.Out.Flush();
+ Write("catching unknown local exception with new AMI mapping... ");
+ Flush();
{
AsyncCallback cb3 = new AsyncCallback();
@@ -1690,10 +1714,10 @@ public class AllTests
cb3.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("catching unknown non-Ice exception with new AMI mapping... ");
- Console.Out.Flush();
+ Write("catching unknown non-Ice exception with new AMI mapping... ");
+ Flush();
{
AsyncCallback cb3 = new AsyncCallback();
@@ -1701,9 +1725,12 @@ public class AllTests
cb3.check();
}
- Console.WriteLine("ok");
+ WriteLine("ok");
}
-
+#if SILVERLIGHT
+ thrower.shutdown();
+#else
return thrower;
+#endif
}
}
diff --git a/cs/test/Ice/exceptions/App.xaml b/cs/test/Ice/exceptions/App.xaml
new file mode 100644
index 00000000000..1113ff2030f
--- /dev/null
+++ b/cs/test/Ice/exceptions/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="exceptions.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/exceptions/App.xaml.cs b/cs/test/Ice/exceptions/App.xaml.cs
new file mode 100644
index 00000000000..7f3e5b2b61a
--- /dev/null
+++ b/cs/test/Ice/exceptions/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace exceptions
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/exceptions/Makefile b/cs/test/Ice/exceptions/Makefile
index 81757d8cda5..d765fcb426f 100644
--- a/cs/test/Ice/exceptions/Makefile
+++ b/cs/test/Ice/exceptions/Makefile
@@ -11,9 +11,10 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs
+C_SRCS = AllTests.cs Client.cs EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs ../../TestCommon/TestApp.cs
S_SRCS = EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs Server.cs ThrowerI.cs
-COL_SRCS = AllTests.cs Collocated.cs EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs ThrowerI.cs
+COL_SRCS = AllTests.cs Collocated.cs EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs ThrowerI.cs \
+ ../../TestCommon/TestApp.cs
SAMD_SRCS = EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs Server.cs ThrowerAMDI.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/exceptions/Makefile.mak b/cs/test/Ice/exceptions/Makefile.mak
index 905602a8ad4..f57486cf001 100644
--- a/cs/test/Ice/exceptions/Makefile.mak
+++ b/cs/test/Ice/exceptions/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs
+C_SRCS = AllTests.cs Client.cs EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs ..\..\TestCommon\TestApp.cs
S_SRCS = EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs Server.cs ThrowerI.cs
-COL_SRCS = AllTests.cs Collocated.cs EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs ThrowerI.cs
+COL_SRCS = AllTests.cs Collocated.cs EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs ThrowerI.cs ..\..\TestCommon\TestApp.cs
SAMD_SRCS = EmptyI.cs ObjectFactoryI.cs ServantLocatorI.cs Server.cs ThrowerAMDI.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/exceptions/Properties/AppManifest.xml b/cs/test/Ice/exceptions/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/exceptions/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/exceptions/Properties/AssemblyInfo.cs b/cs/test/Ice/exceptions/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..c40876be853
--- /dev/null
+++ b/cs/test/Ice/exceptions/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("exceptions")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("exceptions")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("fe860a01-5013-4fb3-bed2-236d1d56cdcf")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/exceptions/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/exceptions/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..aebdf0d0bb9
--- /dev/null
+++ b/cs/test/Ice/exceptions/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Exceptions Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Exceptions Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Exceptions Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/exceptions/exceptions.csproj b/cs/test/Ice/exceptions/exceptions.csproj
new file mode 100644
index 00000000000..430bf49d7e7
--- /dev/null
+++ b/cs/test/Ice/exceptions/exceptions.csproj
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{270ADFFA-8123-4C8C-B117-607A3AE4973D}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>exceptions</RootNamespace>
+ <AssemblyName>exceptions</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>exceptions.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>exceptions.App</SilverlightAppEntry>
+ <TestPageFileName>exceptionsTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="ObjectFactoryI.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/facets/AllTests.cs b/cs/test/Ice/facets/AllTests.cs
index db85e050373..b53c4286ab4 100644
--- a/cs/test/Ice/facets/AllTests.cs
+++ b/cs/test/Ice/facets/AllTests.cs
@@ -9,22 +9,31 @@
using System;
using System.Collections.Generic;
-using Test;
+using Test;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
-public class AllTests
-{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
+public class AllTests : TestCommon.TestApp
+{
+#if SILVERLIGHT
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static GPrx allTests(Ice.Communicator communicator)
+#endif
{
- Console.Write("testing Ice.Admin.Facets property... ");
+ Write("testing Ice.Admin.Facets property... ");
test(communicator.getProperties().getPropertyAsList("Ice.Admin.Facets").Length == 0);
communicator.getProperties().setProperty("Ice.Admin.Facets", "foobar");
String[] facetFilter = communicator.getProperties().getPropertyAsList("Ice.Admin.Facets");
@@ -43,9 +52,10 @@ public class AllTests
// facetFilter = communicator.getProperties().getPropertyAsList("Ice.Admin.Facets");
// test(facetFilter.Length == 0);
communicator.getProperties().setProperty("Ice.Admin.Facets", "");
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("testing facet registration exceptions... ");
+#if !SILVERLIGHT
+ Write("testing facet registration exceptions... ");
communicator.getProperties().setProperty("FacetExceptionTestAdapter.Endpoints", "default");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("FacetExceptionTestAdapter");
Ice.Object obj = new EmptyI();
@@ -68,9 +78,9 @@ public class AllTests
catch(Ice.NotRegisteredException)
{
}
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("testing removeAllFacets... ");
+ Write("testing removeAllFacets... ");
Ice.Object obj1 = new EmptyI();
Ice.Object obj2 = new EmptyI();
adapter.addFacet(obj1, communicator.stringToIdentity("id1"), "f1");
@@ -97,19 +107,19 @@ public class AllTests
test(fm["f1"] == obj1);
test(fm["f2"] == obj2);
test(fm[""] == obj3);
- Console.WriteLine("ok");
+ WriteLine("ok");
adapter.deactivate();
-
- Console.Write("testing stringToProxy... ");
- Console.Out.Flush();
+#endif
+ Write("testing stringToProxy... ");
+ Flush();
string @ref = "d:default -p 12010";
Ice.ObjectPrx db = communicator.stringToProxy(@ref);
test(db != null);
- Console.WriteLine("ok");
-
- Console.Write("testing unchecked cast... ");
- Console.Out.Flush();
+ WriteLine("ok");
+
+ Write("testing unchecked cast... ");
+ Flush();
Ice.ObjectPrx prx = Ice.ObjectPrxHelper.uncheckedCast(db);
test(prx.ice_getFacet().Length == 0);
prx = Ice.ObjectPrxHelper.uncheckedCast(db, "facetABCD");
@@ -126,10 +136,10 @@ public class AllTests
test(df2.ice_getFacet() == "facetABCD");
DPrx df3 = Test.DPrxHelper.uncheckedCast(df, "");
test(df3.ice_getFacet().Length == 0);
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
prx = Ice.ObjectPrxHelper.checkedCast(db);
test(prx.ice_getFacet().Length == 0);
prx = Ice.ObjectPrxHelper.checkedCast(db, "facetABCD");
@@ -146,10 +156,10 @@ public class AllTests
test(df2.ice_getFacet() == "facetABCD");
df3 = Test.DPrxHelper.checkedCast(df, "");
test(df3.ice_getFacet().Length == 0);
- Console.WriteLine("ok");
-
- Console.Write("testing non-facets A, B, C, and D... ");
- Console.Out.Flush();
+ WriteLine("ok");
+
+ Write("testing non-facets A, B, C, and D... ");
+ Flush();
d = DPrxHelper.checkedCast(db);
test(d != null);
test(d.Equals(db));
@@ -157,41 +167,45 @@ public class AllTests
test(d.callB().Equals("B"));
test(d.callC().Equals("C"));
test(d.callD().Equals("D"));
- Console.WriteLine("ok");
-
- Console.Write("testing facets A, B, C, and D... ");
- Console.Out.Flush();
+ WriteLine("ok");
+
+ Write("testing facets A, B, C, and D... ");
+ Flush();
df = DPrxHelper.checkedCast(d, "facetABCD");
test(df != null);
test(df.callA().Equals("A"));
test(df.callB().Equals("B"));
test(df.callC().Equals("C"));
test(df.callD().Equals("D"));
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("testing facets E and F... ");
- Console.Out.Flush();
+ Write("testing facets E and F... ");
+ Flush();
FPrx ff = FPrxHelper.checkedCast(d, "facetEF");
test(ff != null);
test(ff.callE().Equals("E"));
test(ff.callF().Equals("F"));
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("testing facet G... ");
- Console.Out.Flush();
+ Write("testing facet G... ");
+ Flush();
GPrx gf = GPrxHelper.checkedCast(ff, "facetGH");
test(gf != null);
test(gf.callG().Equals("G"));
- Console.WriteLine("ok");
+ WriteLine("ok");
- Console.Write("testing whether casting preserves the facet... ");
- Console.Out.Flush();
+ Write("testing whether casting preserves the facet... ");
+ Flush();
HPrx hf = HPrxHelper.checkedCast(gf);
test(hf != null);
test(hf.callG().Equals("G"));
test(hf.callH().Equals("H"));
- Console.WriteLine("ok");
+ WriteLine("ok");
+#if SILVERLIGHT
+ gf.shutdown();
+#else
return gf;
+#endif
}
}
diff --git a/cs/test/Ice/facets/App.xaml b/cs/test/Ice/facets/App.xaml
new file mode 100644
index 00000000000..3073fc18839
--- /dev/null
+++ b/cs/test/Ice/facets/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="facets.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/facets/App.xaml.cs b/cs/test/Ice/facets/App.xaml.cs
new file mode 100644
index 00000000000..391e31dac1c
--- /dev/null
+++ b/cs/test/Ice/facets/App.xaml.cs
@@ -0,0 +1,82 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace facets
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/facets/Makefile b/cs/test/Ice/facets/Makefile
index 4ae199e529b..51c5940da2e 100644
--- a/cs/test/Ice/facets/Makefile
+++ b/cs/test/Ice/facets/Makefile
@@ -11,9 +11,10 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe
-C_SRCS = AllTests.cs Client.cs EmptyI.cs
+C_SRCS = AllTests.cs Client.cs EmptyI.cs ../../TestCommon/TestApp.cs
S_SRCS = AI.cs BI.cs CI.cs DI.cs EI.cs EmptyI.cs FI.cs GI.cs HI.cs Server.cs
-COL_SRCS = AI.cs AllTests.cs BI.cs CI.cs Collocated.cs DI.cs EI.cs EmptyI.cs FI.cs GI.cs HI.cs
+COL_SRCS = AI.cs AllTests.cs BI.cs CI.cs Collocated.cs DI.cs EI.cs EmptyI.cs FI.cs GI.cs HI.cs \
+ ../../TestCommon/TestApp.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/facets/Makefile.mak b/cs/test/Ice/facets/Makefile.mak
index d3bc57aaf78..e624d299657 100644
--- a/cs/test/Ice/facets/Makefile.mak
+++ b/cs/test/Ice/facets/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe
-C_SRCS = AllTests.cs Client.cs EmptyI.cs
+C_SRCS = AllTests.cs Client.cs EmptyI.cs ..\..\TestCommon\TestApp.cs
S_SRCS = AI.cs BI.cs CI.cs DI.cs EI.cs EmptyI.cs FI.cs GI.cs HI.cs Server.cs
-COL_SRCS = AI.cs AllTests.cs BI.cs CI.cs Collocated.cs DI.cs EI.cs EmptyI.cs FI.cs GI.cs HI.cs
+COL_SRCS = AI.cs AllTests.cs BI.cs CI.cs Collocated.cs DI.cs EI.cs EmptyI.cs FI.cs GI.cs HI.cs ..\..\TestCommon\TestApp.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/facets/Properties/AppManifest.xml b/cs/test/Ice/facets/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/facets/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/facets/Properties/AssemblyInfo.cs b/cs/test/Ice/facets/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..f2921b04410
--- /dev/null
+++ b/cs/test/Ice/facets/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("facets")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("facets")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("aaa04446-c929-499a-b9b5-667df952d40c")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/facets/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/facets/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..b55246511ed
--- /dev/null
+++ b/cs/test/Ice/facets/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Facets Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Facets Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Facets Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/facets/facets.csproj b/cs/test/Ice/facets/facets.csproj
new file mode 100644
index 00000000000..50f84e70016
--- /dev/null
+++ b/cs/test/Ice/facets/facets.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{ACEFEC42-29BF-48E8-BF14-EB554CD06EEF}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>facets</RootNamespace>
+ <AssemblyName>facets</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>facets.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>facets.App</SilverlightAppEntry>
+ <TestPageFileName>facetsTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/faultTolerance/AllTests.cs b/cs/test/Ice/faultTolerance/AllTests.cs
index 8ef59c958ea..f1263e5d0ec 100644
--- a/cs/test/Ice/faultTolerance/AllTests.cs
+++ b/cs/test/Ice/faultTolerance/AllTests.cs
@@ -9,19 +9,24 @@
using System;
using System.Diagnostics;
-using System.Threading;
-using Test;
+using System.Threading;
+using System.Collections.Generic;
+using Test;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
private class CallbackBase
{
public CallbackBase()
@@ -126,10 +131,32 @@ public class AllTests
private CallbackBase callback = new CallbackBase();
}
- public static void allTests(Ice.Communicator communicator, System.Collections.ArrayList ports)
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.Warn.Connections", "0");
+ return initData;
+ }
+ override
+ public void run(Ice.Communicator communicator)
+#else
+ public static void allTests(Ice.Communicator communicator, List<int> ports)
+#endif
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+#if SILVERLIGHT
+ List<int> ports = new List<int>();
+ {
+ int basePort = 12340;
+ for (int i = 0; i < 12; i++)
+ {
+ ports.Add(basePort + i);
+ }
+ }
+#endif
+ Write("testing stringToProxy... ");
+ Flush();
string refString = "test";
for(int i = 0; i < ports.Count; i++)
{
@@ -137,22 +164,22 @@ public class AllTests
}
Ice.ObjectPrx basePrx = communicator.stringToProxy(refString);
test(basePrx != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
TestIntfPrx obj = TestIntfPrxHelper.checkedCast(basePrx);
test(obj != null);
test(obj.Equals(basePrx));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
if(IceInternal.AssemblyUtil.runtime_ == IceInternal.AssemblyUtil.Runtime.Mono)
{
- Console.Out.WriteLine();
- Console.Out.WriteLine("This test aborts a number of server processes.");
- Console.Out.WriteLine("Test output may be interspersed with \"killed\" message from the shell.");
- Console.Out.WriteLine("These messages are expected and do NOT indicate a test failure.");
- Console.Out.WriteLine();
+ WriteLine("");
+ WriteLine("This test aborts a number of server processes.");
+ WriteLine("Test output may be interspersed with \"killed\" message from the shell.");
+ WriteLine("These messages are expected and do NOT indicate a test failure.");
+ WriteLine("");
}
int oldPid = 0;
@@ -167,23 +194,23 @@ public class AllTests
if(!ami)
{
- Console.Out.Write("testing server #" + i + "... ");
- Console.Out.Flush();
+ Write("testing server #" + i + "... ");
+ Flush();
int pid = obj.pid();
test(pid != oldPid);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
oldPid = pid;
}
else
{
- Console.Out.Write("testing server #" + i + " with AMI... ");
- Console.Out.Flush();
+ Write("testing server #" + i + " with AMI... ");
+ Flush();
Callback cb = new Callback();
obj.begin_pid().whenCompleted(cb.opPidI, cb.exception);
cb.check();
int pid = cb.pid();
test(pid != oldPid);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
oldPid = pid;
}
@@ -191,26 +218,26 @@ public class AllTests
{
if(!ami)
{
- Console.Out.Write("shutting down server #" + i + "... ");
- Console.Out.Flush();
+ Write("shutting down server #" + i + "... ");
+ Flush();
obj.shutdown();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
else
{
- Console.Out.Write("shutting down server #" + i + " with AMI... ");
+ Write("shutting down server #" + i + " with AMI... ");
Callback cb = new Callback();
obj.begin_shutdown().whenCompleted(cb.opShutdownI, cb.exception);
cb.check();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
}
else if(j == 1 || i + 1 > ports.Count)
{
if(!ami)
{
- Console.Out.Write("aborting server #" + i + "... ");
- Console.Out.Flush();
+ Write("aborting server #" + i + "... ");
+ Flush();
try
{
obj.abort();
@@ -218,33 +245,33 @@ public class AllTests
}
catch(Ice.ConnectionLostException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
catch(Ice.ConnectFailedException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
catch(Ice.SocketException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
}
else
{
- Console.Out.Write("aborting server #" + i + " with AMI... ");
- Console.Out.Flush();
+ Write("aborting server #" + i + " with AMI... ");
+ Flush();
Callback cb = new Callback();
obj.begin_abort().whenCompleted(cb.response, cb.exceptAbortI);
cb.check();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
}
else if(j == 2 || j == 3)
{
if(!ami)
{
- Console.Out.Write("aborting server #" + i + " and #" + (i + 1) + " with idempotent call... ");
- Console.Out.Flush();
+ Write("aborting server #" + i + " and #" + (i + 1) + " with idempotent call... ");
+ Flush();
try
{
obj.idempotentAbort();
@@ -252,25 +279,25 @@ public class AllTests
}
catch(Ice.ConnectionLostException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
catch(Ice.ConnectFailedException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
catch(Ice.SocketException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
}
else
{
- Console.Out.Write("aborting server #" + i + " and #" + (i + 1) + " with idempotent AMI call... ");
- Console.Out.Flush();
+ Write("aborting server #" + i + " and #" + (i + 1) + " with idempotent AMI call... ");
+ Flush();
Callback cb = new Callback();
obj.begin_idempotentAbort().whenCompleted(cb.response, cb.exceptAbortI);
cb.check();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
++i;
}
@@ -280,8 +307,8 @@ public class AllTests
}
}
- Console.Out.Write("testing whether all servers are gone... ");
- Console.Out.Flush();
+ Write("testing whether all servers are gone... ");
+ Flush();
try
{
obj.ice_ping();
@@ -289,7 +316,7 @@ public class AllTests
}
catch(Ice.LocalException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
}
}
diff --git a/cs/test/Ice/faultTolerance/App.xaml b/cs/test/Ice/faultTolerance/App.xaml
new file mode 100644
index 00000000000..8474f36f616
--- /dev/null
+++ b/cs/test/Ice/faultTolerance/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="faultTolerance.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/faultTolerance/App.xaml.cs b/cs/test/Ice/faultTolerance/App.xaml.cs
new file mode 100644
index 00000000000..2efa83b88b0
--- /dev/null
+++ b/cs/test/Ice/faultTolerance/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace faultTolerance
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/faultTolerance/Client.cs b/cs/test/Ice/faultTolerance/Client.cs
index a4fbec6a973..430c3046072 100644
--- a/cs/test/Ice/faultTolerance/Client.cs
+++ b/cs/test/Ice/faultTolerance/Client.cs
@@ -26,7 +26,7 @@ public class Client
private static int run(string[] args, Ice.Communicator communicator)
{
- System.Collections.ArrayList ports = new System.Collections.ArrayList(args.Length);
+ System.Collections.Generic.List<int> ports = new System.Collections.Generic.List<int>();
for(int i = 0; i < args.Length; i++)
{
int port = 0;
diff --git a/cs/test/Ice/faultTolerance/Makefile b/cs/test/Ice/faultTolerance/Makefile
index 381c84b7fa1..8477c1224fc 100644
--- a/cs/test/Ice/faultTolerance/Makefile
+++ b/cs/test/Ice/faultTolerance/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = Server.cs TestI.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/faultTolerance/Makefile.mak b/cs/test/Ice/faultTolerance/Makefile.mak
index 45f1df85236..c3311b8332d 100644
--- a/cs/test/Ice/faultTolerance/Makefile.mak
+++ b/cs/test/Ice/faultTolerance/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs TestI.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/faultTolerance/Properties/AppManifest.xml b/cs/test/Ice/faultTolerance/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/faultTolerance/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/faultTolerance/Properties/AssemblyInfo.cs b/cs/test/Ice/faultTolerance/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..cf8be0346cc
--- /dev/null
+++ b/cs/test/Ice/faultTolerance/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("faultTolerance")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("faultTolerance")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("73af01ab-3917-46fd-b75c-59ac2e5673bf")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/faultTolerance/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/faultTolerance/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..007eb13cd96
--- /dev/null
+++ b/cs/test/Ice/faultTolerance/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Fault Tolerance Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Fault Tolerance Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Fault Tolerance Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/faultTolerance/faultTolerance.csproj b/cs/test/Ice/faultTolerance/faultTolerance.csproj
new file mode 100644
index 00000000000..bafa806c158
--- /dev/null
+++ b/cs/test/Ice/faultTolerance/faultTolerance.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{61AD7756-4BB3-4772-AB43-A42F5C3CBB34}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>faultTolerance</RootNamespace>
+ <AssemblyName>faultTolerance</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>faultTolerance.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>faultTolerance.App</SilverlightAppEntry>
+ <TestPageFileName>faultToleranceTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/hold/AllTests.cs b/cs/test/Ice/hold/AllTests.cs
index 12568cc83bb..66e50543d26 100644
--- a/cs/test/Ice/hold/AllTests.cs
+++ b/cs/test/Ice/hold/AllTests.cs
@@ -8,18 +8,22 @@
// **********************************************************************
using System;
-using Test;
+using Test;
+
+#if SILVERLIGHT
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new Exception();
- }
- }
-
private class Condition
{
public Condition(bool value)
@@ -109,20 +113,25 @@ public class AllTests
private readonly IceUtilInternal.Monitor _m = new IceUtilInternal.Monitor();
}
+#if SILVERLIGHT
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static void allTests(Ice.Communicator communicator)
+#endif
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+ Write("testing stringToProxy... ");
+ Flush();
String @ref = "hold:default -p 12010";
Ice.ObjectPrx @base = communicator.stringToProxy(@ref);
test(@base != null);
String refSerialized = "hold:default -p 12011";
Ice.ObjectPrx baseSerialized = communicator.stringToProxy(refSerialized);
test(baseSerialized != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
HoldPrx hold = HoldPrxHelper.checkedCast(@base);
HoldPrx holdOneway = HoldPrxHelper.uncheckedCast(@base.ice_oneway());
test(hold != null);
@@ -131,10 +140,10 @@ public class AllTests
HoldPrx holdSerializedOneway = HoldPrxHelper.uncheckedCast(baseSerialized.ice_oneway());
test(holdSerialized != null);
test(holdSerialized.Equals(baseSerialized));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("changing state between active and hold rapidly... ");
- Console.Out.Flush();
+ Write("changing state between active and hold rapidly... ");
+ Flush();
for(int i = 0; i < 100; ++i)
{
hold.putOnHold(0);
@@ -151,10 +160,10 @@ public class AllTests
{
holdSerializedOneway.putOnHold(0);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing without serialize mode... ");
- Console.Out.Flush();
+ Write("testing without serialize mode... ");
+ Flush();
System.Random rand = new System.Random();
{
Condition cond = new Condition(true);
@@ -185,10 +194,10 @@ public class AllTests
cb = null;
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing with serialize mode... ");
- Console.Out.Flush();
+ Write("testing with serialize mode... ");
+ Flush();
{
Condition cond = new Condition(true);
int value = 0;
@@ -221,10 +230,10 @@ public class AllTests
}
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing waitForHold... ");
- Console.Out.Flush();
+ Write("testing waitForHold... ");
+ Flush();
{
hold.waitForHold();
hold.waitForHold();
@@ -241,12 +250,12 @@ public class AllTests
hold.putOnHold(-1);
hold.ice_ping();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("changing state to hold and shutting down server... ");
- Console.Out.Flush();
+ Write("changing state to hold and shutting down server... ");
+ Flush();
hold.shutdown();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
}
diff --git a/cs/test/Ice/hold/App.xaml b/cs/test/Ice/hold/App.xaml
new file mode 100644
index 00000000000..1f9d506a6fa
--- /dev/null
+++ b/cs/test/Ice/hold/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="hold.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/hold/App.xaml.cs b/cs/test/Ice/hold/App.xaml.cs
new file mode 100644
index 00000000000..9dd556a7635
--- /dev/null
+++ b/cs/test/Ice/hold/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace hold
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/hold/Makefile b/cs/test/Ice/hold/Makefile
index 243df134d21..3b382e7ffff 100644
--- a/cs/test/Ice/hold/Makefile
+++ b/cs/test/Ice/hold/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = HoldI.cs Server.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/hold/Makefile.mak b/cs/test/Ice/hold/Makefile.mak
index f2d69ef4009..1b38a0d9f16 100644
--- a/cs/test/Ice/hold/Makefile.mak
+++ b/cs/test/Ice/hold/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = HoldI.cs Server.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/hold/Properties/AppManifest.xml b/cs/test/Ice/hold/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/hold/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/hold/Properties/AssemblyInfo.cs b/cs/test/Ice/hold/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..8c9362c5f8f
--- /dev/null
+++ b/cs/test/Ice/hold/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("hold")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("hold")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("53067721-a3df-445f-b346-81fba8cb747c")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/hold/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/hold/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..e28d2244092
--- /dev/null
+++ b/cs/test/Ice/hold/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Hold Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Hold Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Hold Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/hold/hold.csproj b/cs/test/Ice/hold/hold.csproj
new file mode 100644
index 00000000000..6849283bf62
--- /dev/null
+++ b/cs/test/Ice/hold/hold.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{44EFC26A-42E7-46A8-B371-96969E8128ED}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>hold</RootNamespace>
+ <AssemblyName>hold</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>hold.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>hold.App</SilverlightAppEntry>
+ <TestPageFileName>holdTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/info/AllTests.cs b/cs/test/Ice/info/AllTests.cs
index ac0ad323f6e..435d7efb504 100644
--- a/cs/test/Ice/info/AllTests.cs
+++ b/cs/test/Ice/info/AllTests.cs
@@ -11,23 +11,31 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
-using Test;
+using Test;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
-
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.Default.Host", "127.0.0.1");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static void allTests(Ice.Communicator communicator)
+#endif
{
- Console.Out.Write("testing proxy endpoint information... ");
- Console.Out.Flush();
+ Write("testing proxy endpoint information... ");
+ Flush();
{
Ice.ObjectPrx p1 = communicator.stringToProxy("test -t:default -h tcphost -p 10000 -t 1200 -z:" +
"udp -h udphost -p 10001 --interface eth0 --ttl 5:" +
@@ -43,7 +51,7 @@ public class AllTests
test(ipEndpoint.compress);
test(!ipEndpoint.datagram());
-#if __MonoCS__ || COMPACT
+#if __MonoCS__ || COMPACT || SILVERLIGHT
test(ipEndpoint.type() == Ice.TCPEndpointType.value && !ipEndpoint.secure());
test(ipEndpoint.type() == Ice.TCPEndpointType.value && ipEndpoint is Ice.TCPEndpointInfo);
#else
@@ -67,13 +75,13 @@ public class AllTests
Ice.OpaqueEndpointInfo opaqueEndpoint = (Ice.OpaqueEndpointInfo)endps[2].getInfo();
test(opaqueEndpoint.rawBytes.Length > 0);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- string defaultHost = communicator.getProperties().getProperty("Ice.Default.Host");
+ string defaultHost = communicator.getProperties().getProperty("Ice.Default.Host");
+#if !SILVERLIGHT
Ice.ObjectAdapter adapter;
-
- Console.Out.Write("test object adapter endpoint information... ");
- Console.Out.Flush();
+ Write("test object adapter endpoint information... ");
+ Flush();
{
communicator.getProperties().setProperty("TestAdapter.Endpoints", "default -t 15000:udp");
adapter = communicator.createObjectAdapter("TestAdapter");
@@ -84,11 +92,11 @@ public class AllTests
test(IceUtilInternal.Arrays.Equals(endpoints, publishedEndpoints));
Ice.IPEndpointInfo ipEndpoint = (Ice.IPEndpointInfo)endpoints[0].getInfo();
-#if __MonoCS__ || COMPACT
+# if __MonoCS__ || COMPACT
test(ipEndpoint.type() == Ice.TCPEndpointType.value);
-#else
+# else
test(ipEndpoint.type() == Ice.TCPEndpointType.value || ipEndpoint.type() == IceSSL.EndpointType.value);
-#endif
+# endif
test(ipEndpoint.host.Equals(defaultHost));
test(ipEndpoint.port > 0);
test(ipEndpoint.timeout == 15000);
@@ -121,13 +129,14 @@ public class AllTests
adapter.destroy();
}
- Console.Out.WriteLine("ok");
-
+ WriteLine("ok");
+#endif
+
Ice.ObjectPrx @base = communicator.stringToProxy("test:default -p 12010:udp -p 12010");
TestIntfPrx testIntf = TestIntfPrxHelper.checkedCast(@base);
- Console.Out.Write("test connection endpoint information... ");
- Console.Out.Flush();
+ Write("test connection endpoint information... ");
+ Flush();
{
Ice.EndpointInfo info = @base.ice_getConnection().getEndpoint().getInfo();
Ice.IPEndpointInfo ipinfo = (Ice.IPEndpointInfo)info;
@@ -141,27 +150,32 @@ public class AllTests
int port = System.Int32.Parse(ctx["port"]);
test(port > 0);
+#if !SILVERLIGHT
info = @base.ice_datagram().ice_getConnection().getEndpoint().getInfo();
Ice.UDPEndpointInfo udp = (Ice.UDPEndpointInfo)info;
test(udp.port == 12010);
test(udp.host.Equals(defaultHost));
+#endif
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing connection information... ");
- Console.Out.Flush();
+ Write("testing connection information... ");
+ Flush();
{
Ice.IPConnectionInfo info = (Ice.IPConnectionInfo)@base.ice_getConnection().getInfo();
test(!info.incoming);
test(info.adapterName.Length == 0);
+#if !SILVERLIGHT
test(info.localPort > 0);
+ test(info.localAddress.Equals(defaultHost));
+#endif
test(info.remotePort == 12010);
test(info.remoteAddress.Equals(defaultHost));
- test(info.localAddress.Equals(defaultHost));
Dictionary<string, string> ctx = testIntf.getConnectionInfoAsContext();
test(ctx["incoming"].Equals("true"));
test(ctx["adapterName"].Equals("TestAdapter"));
+#if !SILVERLIGHT
test(ctx["remoteAddress"].Equals(info.localAddress));
test(ctx["localAddress"].Equals(info.remoteAddress));
test(ctx["remotePort"].Equals(info.localPort.ToString()));
@@ -171,11 +185,14 @@ public class AllTests
test(!info.incoming);
test(info.adapterName.Length == 0);
test(info.localPort > 0);
+#endif
test(info.remotePort == 12010);
test(info.remoteAddress.Equals(defaultHost));
+#if !SILVERLIGHT
test(info.localAddress.Equals(defaultHost));
+#endif
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
testIntf.shutdown();
diff --git a/cs/test/Ice/info/App.xaml b/cs/test/Ice/info/App.xaml
new file mode 100644
index 00000000000..a502596011f
--- /dev/null
+++ b/cs/test/Ice/info/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="info.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/info/App.xaml.cs b/cs/test/Ice/info/App.xaml.cs
new file mode 100644
index 00000000000..a2440c44c23
--- /dev/null
+++ b/cs/test/Ice/info/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace info
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/info/Makefile b/cs/test/Ice/info/Makefile
index de53d6ca9e2..cada0b5e22d 100644
--- a/cs/test/Ice/info/Makefile
+++ b/cs/test/Ice/info/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs TestI.cs
+C_SRCS = AllTests.cs Client.cs TestI.cs ../../TestCommon/TestApp.cs
S_SRCS = TestI.cs Server.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/info/Makefile.mak b/cs/test/Ice/info/Makefile.mak
index eec3a20c42d..8320e92a9ff 100644
--- a/cs/test/Ice/info/Makefile.mak
+++ b/cs/test/Ice/info/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs TestI.cs
+C_SRCS = AllTests.cs Client.cs TestI.cs ..\..\TestCommon\TestApp.cs
S_SRCS = TestI.cs Server.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/info/Properties/AppManifest.xml b/cs/test/Ice/info/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/info/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/info/Properties/AssemblyInfo.cs b/cs/test/Ice/info/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..61cc9b7bcaf
--- /dev/null
+++ b/cs/test/Ice/info/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("info")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("info")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e73785c9-f924-423c-ac91-fcc7b8884e0c")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/info/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/info/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..65472e771d1
--- /dev/null
+++ b/cs/test/Ice/info/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Info Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Info Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Info Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/info/info.csproj b/cs/test/Ice/info/info.csproj
new file mode 100644
index 00000000000..b6780729067
--- /dev/null
+++ b/cs/test/Ice/info/info.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{11F271A3-319C-4C8F-B1C6-508416D8EB6A}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>info</RootNamespace>
+ <AssemblyName>info</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>info.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>info.App</SilverlightAppEntry>
+ <TestPageFileName>infoTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/inheritance/AllTests.cs b/cs/test/Ice/inheritance/AllTests.cs
index 831b0b463d4..af3a7cc7d0b 100644
--- a/cs/test/Ice/inheritance/AllTests.cs
+++ b/cs/test/Ice/inheritance/AllTests.cs
@@ -8,36 +8,46 @@
// **********************************************************************
using System;
-using Test;
+using Test;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
-{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new Exception();
- }
- }
-
+public class AllTests : TestCommon.TestApp
+{
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.FactoryAssemblies", "inheritance,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static InitialPrx allTests(Ice.Communicator communicator)
+#endif
+
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+ Write("testing stringToProxy... ");
+ Flush();
string ref_Renamed = "initial:default -p 12010";
Ice.ObjectPrx @base = communicator.stringToProxy(ref_Renamed);
test(@base != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
InitialPrx initial = InitialPrxHelper.checkedCast(@base);
test(initial != null);
test(initial.Equals(@base));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("getting proxies for class hierarchy... ");
- Console.Out.Flush();
+ Write("getting proxies for class hierarchy... ");
+ Flush();
Test.MA.CAPrx ca = initial.caop();
Test.MB.CBPrx cb = initial.cbop();
Test.MA.CCPrx cc = initial.ccop();
@@ -48,10 +58,10 @@ public class AllTests
test(cb != cc);
test(cb != cd);
test(cc != cd);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("getting proxies for interface hierarchy... ");
- Console.Out.Flush();
+ Write("getting proxies for interface hierarchy... ");
+ Flush();
Test.MA.IAPrx ia = initial.iaop();
Test.MB.IB1Prx ib1 = initial.ib1op();
Test.MB.IB2Prx ib2 = initial.ib2op();
@@ -61,10 +71,10 @@ public class AllTests
test(ia != ic);
test(ib1 != ic);
test(ib2 != ic);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("invoking proxy operations on class hierarchy... ");
- Console.Out.Flush();
+ Write("invoking proxy operations on class hierarchy... ");
+ Flush();
Test.MA.CAPrx cao;
Test.MB.CBPrx cbo;
Test.MA.CCPrx cco;
@@ -111,10 +121,10 @@ public class AllTests
test(cbo.Equals(cc));
cco = cc.ccop(cc);
test(cco.Equals(cc));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("ditto, but for interface hierarchy... ");
- Console.Out.Flush();
+ Write("ditto, but for interface hierarchy... ");
+ Flush();
Test.MA.IAPrx iao;
Test.MB.IB1Prx ib1o;
Test.MB.IB2Prx ib2o;
@@ -195,10 +205,10 @@ public class AllTests
test(ib2o.Equals(ic));
ico = ic.icop(ic);
test(ico.Equals(ic));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("ditto, but for class implementing interfaces... ");
- Console.Out.Flush();
+ Write("ditto, but for class implementing interfaces... ");
+ Flush();
cao = cd.caop(cd);
test(cao.Equals(cd));
@@ -227,8 +237,12 @@ public class AllTests
test(ib1o.Equals(cd));
ib2o = cd.cdop(cd);
test(ib2o.Equals(cd));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
+#if SILVERLIGHT
+ initial.shutdown();
+#else
return initial;
+#endif
}
}
diff --git a/cs/test/Ice/inheritance/App.xaml b/cs/test/Ice/inheritance/App.xaml
new file mode 100644
index 00000000000..0e28137edac
--- /dev/null
+++ b/cs/test/Ice/inheritance/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="inheritance.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/inheritance/App.xaml.cs b/cs/test/Ice/inheritance/App.xaml.cs
new file mode 100644
index 00000000000..c006ba5d125
--- /dev/null
+++ b/cs/test/Ice/inheritance/App.xaml.cs
@@ -0,0 +1,82 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace inheritance
+{
+ public partial class App : Application
+ {
+
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/inheritance/Makefile b/cs/test/Ice/inheritance/Makefile
index da0649427f5..5a64bc80cd8 100644
--- a/cs/test/Ice/inheritance/Makefile
+++ b/cs/test/Ice/inheritance/Makefile
@@ -11,9 +11,10 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = CAI.cs CBI.cs CCI.cs CDI.cs IAI.cs IB1I.cs IB2I.cs ICI.cs InitialI.cs Server.cs
-COL_SRCS = AllTests.cs CAI.cs CBI.cs CCI.cs CDI.cs Collocated.cs IAI.cs IB1I.cs IB2I.cs ICI.cs InitialI.cs
+COL_SRCS = AllTests.cs CAI.cs CBI.cs CCI.cs CDI.cs Collocated.cs IAI.cs IB1I.cs IB2I.cs ICI.cs InitialI.cs \
+ ../../TestCommon/TestApp.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/inheritance/Makefile.mak b/cs/test/Ice/inheritance/Makefile.mak
index 3fc7c40823e..3a040fddc7e 100644
--- a/cs/test/Ice/inheritance/Makefile.mak
+++ b/cs/test/Ice/inheritance/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = CAI.cs CBI.cs CCI.cs CDI.cs IAI.cs IB1I.cs IB2I.cs ICI.cs InitialI.cs Server.cs
-COL_SRCS = AllTests.cs CAI.cs CBI.cs CCI.cs CDI.cs Collocated.cs IAI.cs IB1I.cs IB2I.cs ICI.cs InitialI.cs
+COL_SRCS = AllTests.cs CAI.cs CBI.cs CCI.cs CDI.cs Collocated.cs IAI.cs IB1I.cs IB2I.cs ICI.cs InitialI.cs ..\..\TestCommon\TestApp.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/inheritance/Properties/AppManifest.xml b/cs/test/Ice/inheritance/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/inheritance/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/inheritance/Properties/AssemblyInfo.cs b/cs/test/Ice/inheritance/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..a5b01514570
--- /dev/null
+++ b/cs/test/Ice/inheritance/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("inheritance")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("inheritance")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("5264c7d8-3353-469e-828a-b42f454b8d1b")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/inheritance/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/inheritance/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..6125307fba6
--- /dev/null
+++ b/cs/test/Ice/inheritance/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Inheritance Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Inheritance Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Inheritance Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/inheritance/inheritance.csproj b/cs/test/Ice/inheritance/inheritance.csproj
new file mode 100644
index 00000000000..3b5ad16607b
--- /dev/null
+++ b/cs/test/Ice/inheritance/inheritance.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0C325152-DF80-4BFF-A412-EAC75504B393}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>inheritance</RootNamespace>
+ <AssemblyName>inheritance</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>inheritance.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>inheritance.App</SilverlightAppEntry>
+ <TestPageFileName>inheritanceTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/invoke/AllTests.cs b/cs/test/Ice/invoke/AllTests.cs
index f692237fec1..8f97c8dd9ee 100644
--- a/cs/test/Ice/invoke/AllTests.cs
+++ b/cs/test/Ice/invoke/AllTests.cs
@@ -9,9 +9,13 @@
using System;
using System.Diagnostics;
-using System.Threading;
+using System.Threading;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
private static string testString = "This is a test string";
@@ -23,14 +27,6 @@ public class AllTests
}
}
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
private class CallbackBase
{
internal CallbackBase()
@@ -190,15 +186,27 @@ public class AllTests
private CallbackBase callback = new CallbackBase();
}
-
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.FactoryAssemblies", "invoke,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static Test.MyClassPrx allTests(Ice.Communicator communicator)
+#endif
{
Ice.ObjectPrx baseProxy = communicator.stringToProxy("test:default -p 12010");
Test.MyClassPrx cl = Test.MyClassPrxHelper.checkedCast(baseProxy);
Test.MyClassPrx oneway = Test.MyClassPrxHelper.uncheckedCast(cl.ice_oneway());
- Console.Out.Write("testing ice_invoke... ");
- Console.Out.Flush();
+ Write("testing ice_invoke... ");
+ Flush();
{
byte[] inParams, outParams;
@@ -248,10 +256,10 @@ public class AllTests
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing asynchronous ice_invoke... ");
- Console.Out.Flush();
+ Write("testing asynchronous ice_invoke... ");
+ Flush();
{
byte[] inParams, outParams;
@@ -336,8 +344,12 @@ public class AllTests
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
+#if SILVERLIGHT
+ cl.shutdown();
+#else
return cl;
+#endif
}
}
diff --git a/cs/test/Ice/invoke/App.xaml b/cs/test/Ice/invoke/App.xaml
new file mode 100644
index 00000000000..d5e159f3e47
--- /dev/null
+++ b/cs/test/Ice/invoke/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="invoke.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/invoke/App.xaml.cs b/cs/test/Ice/invoke/App.xaml.cs
new file mode 100644
index 00000000000..80f70d452fa
--- /dev/null
+++ b/cs/test/Ice/invoke/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace invoke
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/invoke/Makefile b/cs/test/Ice/invoke/Makefile
index f26a4ec69f9..3eeb1191b80 100644
--- a/cs/test/Ice/invoke/Makefile
+++ b/cs/test/Ice/invoke/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = BlobjectI.cs Server.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/invoke/Makefile.mak b/cs/test/Ice/invoke/Makefile.mak
index 0527602fc87..fe0459112f9 100644
--- a/cs/test/Ice/invoke/Makefile.mak
+++ b/cs/test/Ice/invoke/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs BlobjectI.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/invoke/Properties/AppManifest.xml b/cs/test/Ice/invoke/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/invoke/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/invoke/Properties/AssemblyInfo.cs b/cs/test/Ice/invoke/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..2f03e2c1123
--- /dev/null
+++ b/cs/test/Ice/invoke/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("invoke")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("invoke")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ed22e757-0252-4801-be0f-a9977d49fe8a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/invoke/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/invoke/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..5f8332e8c36
--- /dev/null
+++ b/cs/test/Ice/invoke/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Invoke Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Invoke Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Invoke Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/invoke/invoke.csproj b/cs/test/Ice/invoke/invoke.csproj
new file mode 100644
index 00000000000..5e730a2bb45
--- /dev/null
+++ b/cs/test/Ice/invoke/invoke.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95E9131E-6630-4658-B48F-405DDBE0C1C9}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>invoke</RootNamespace>
+ <AssemblyName>invoke</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>invoke.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>invoke.App</SilverlightAppEntry>
+ <TestPageFileName>invokeTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/location/AllTests.cs b/cs/test/Ice/location/AllTests.cs
index f54fd85289d..c463444de8b 100644
--- a/cs/test/Ice/location/AllTests.cs
+++ b/cs/test/Ice/location/AllTests.cs
@@ -9,19 +9,27 @@
using System;
using Test;
-using System.Collections.Generic;
+using System.Collections.Generic;
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
-{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new Exception();
- }
- }
-
+public class AllTests : TestCommon.TestApp
+{
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.Default.Locator", "locator:default -p 12010");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static void allTests(Ice.Communicator communicator)
+#endif
{
ServerManagerPrx manager = ServerManagerPrxHelper.checkedCast(
communicator.stringToProxy("ServerManager :default -p 12010"));
@@ -31,17 +39,17 @@ public class AllTests
TestLocatorRegistryPrx registry = TestLocatorRegistryPrxHelper.checkedCast(locator.getRegistry());
test(registry != null);
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+ Write("testing stringToProxy... ");
+ Flush();
Ice.ObjectPrx @base = communicator.stringToProxy("test @ TestAdapter");
Ice.ObjectPrx base2 = communicator.stringToProxy("test @ TestAdapter");
Ice.ObjectPrx base3 = communicator.stringToProxy("test");
Ice.ObjectPrx base4 = communicator.stringToProxy("ServerManager");
Ice.ObjectPrx base5 = communicator.stringToProxy("test2");
Ice.ObjectPrx base6 = communicator.stringToProxy("test @ ReplicatedAdapter");
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing ice_locator and ice_getLocator... ");
+ Write("testing ice_locator and ice_getLocator... ");
test(Ice.Util.proxyIdentityCompare(@base.ice_getLocator(), communicator.getDefaultLocator()) == 0);
Ice.LocatorPrx anotherLocator =
Ice.LocatorPrxHelper.uncheckedCast(communicator.stringToProxy("anotherLocator"));
@@ -71,15 +79,15 @@ public class AllTests
communicator.setDefaultRouter(null);
@base = communicator.stringToProxy("test @ TestAdapter");
test(@base.ice_getRouter() == null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("starting server... ");
- Console.Out.Flush();
+ Write("starting server... ");
+ Flush();
manager.startServer();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
TestIntfPrx obj = TestIntfPrxHelper.checkedCast(@base);
test(obj != null);
TestIntfPrx obj2 = TestIntfPrxHelper.checkedCast(base2);
@@ -92,10 +100,10 @@ public class AllTests
test(obj5 != null);
TestIntfPrx obj6 = TestIntfPrxHelper.checkedCast(base6);
test(obj6 != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing id@AdapterId indirect proxy... ");
- Console.Out.Flush();
+ Write("testing id@AdapterId indirect proxy... ");
+ Flush();
obj.shutdown();
manager.startServer();
try
@@ -106,10 +114,10 @@ public class AllTests
{
test(false);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing id@ReplicaGroupId indirect proxy... ");
- Console.Out.Flush();
+ Write("testing id@ReplicaGroupId indirect proxy... ");
+ Flush();
obj.shutdown();
manager.startServer();
try
@@ -120,10 +128,10 @@ public class AllTests
{
test(false);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing identity indirect proxy... ");
- Console.Out.Flush();
+ Write("testing identity indirect proxy... ");
+ Flush();
obj.shutdown();
manager.startServer();
try
@@ -191,10 +199,10 @@ public class AllTests
{
test(false);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing proxy with unknown identity... ");
- Console.Out.Flush();
+ Write("testing proxy with unknown identity... ");
+ Flush();
try
{
@base = communicator.stringToProxy("unknown/unknown");
@@ -206,10 +214,10 @@ public class AllTests
test(ex.kindOfObject.Equals("object"));
test(ex.id.Equals("unknown/unknown"));
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing proxy with unknown adapter... ");
- Console.Out.Flush();
+ Write("testing proxy with unknown adapter... ");
+ Flush();
try
{
@base = communicator.stringToProxy("test @ TestAdapterUnknown");
@@ -221,10 +229,10 @@ public class AllTests
test(ex.kindOfObject.Equals("object adapter"));
test(ex.id.Equals("TestAdapterUnknown"));
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing locator cache timeout... ");
- Console.Out.Flush();
+ Write("testing locator cache timeout... ");
+ Flush();
int count = locator.getRequestCount();
communicator.stringToProxy("test@TestAdapter").ice_locatorCacheTimeout(0).ice_ping(); // No locator cache.
@@ -258,10 +266,10 @@ public class AllTests
test(communicator.stringToProxy("test").ice_locatorCacheTimeout(99).ice_getLocatorCacheTimeout() == 99);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing proxy from server... ");
- Console.Out.Flush();
+ Write("testing proxy from server... ");
+ Flush();
obj = TestIntfPrxHelper.checkedCast(communicator.stringToProxy("test@TestAdapter"));
HelloPrx hello = obj.getHello();
test(hello.ice_getAdapterId().Equals("TestAdapter"));
@@ -269,10 +277,10 @@ public class AllTests
hello = obj.getReplicatedHello();
test(hello.ice_getAdapterId().Equals("ReplicatedAdapter"));
hello.sayHello();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing locator request queuing... ");
- Console.Out.Flush();
+ Write("testing locator request queuing... ");
+ Flush();
hello = (HelloPrx)obj.getReplicatedHello().ice_locatorCacheTimeout(0).ice_connectionCached(false);
count = locator.getRequestCount();
hello.ice_ping();
@@ -299,7 +307,7 @@ public class AllTests
test(locator.getRequestCount() > count && locator.getRequestCount() < count + 999);
if(locator.getRequestCount() > count + 800)
{
- Console.Out.Write("queuing = " + (locator.getRequestCount() - count));
+ Write("queuing = " + (locator.getRequestCount() - count));
}
count = locator.getRequestCount();
hello = (HelloPrx)hello.ice_adapterId("unknown");
@@ -326,12 +334,12 @@ public class AllTests
test(locator.getRequestCount() > count && locator.getRequestCount() < count + 1999);
if(locator.getRequestCount() > count + 800)
{
- Console.Out.Write("queuing = " + (locator.getRequestCount() - count));
+ Write("queuing = " + (locator.getRequestCount() - count));
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing adapter locator cache... ");
- Console.Out.Flush();
+ Write("testing adapter locator cache... ");
+ Flush();
try
{
communicator.stringToProxy("test@TestAdapter3").ice_ping();
@@ -379,10 +387,10 @@ public class AllTests
{
test(false);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing well-known object locator cache... ");
- Console.Out.Flush();
+ Write("testing well-known object locator cache... ");
+ Flush();
registry.addObject(communicator.stringToProxy("test3@TestUnknown"));
try
{
@@ -467,10 +475,10 @@ public class AllTests
catch(Ice.NoEndpointException)
{
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing locator cache background updates... ");
- Console.Out.Flush();
+ Write("testing locator cache background updates... ");
+ Flush();
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = communicator.getProperties().ice_clone_();
@@ -524,18 +532,18 @@ public class AllTests
}
ic.destroy();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing proxy from server after shutdown... ");
- Console.Out.Flush();
+ Write("testing proxy from server after shutdown... ");
+ Flush();
hello = obj.getReplicatedHello();
obj.shutdown();
manager.startServer();
hello.sayHello();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing object migration... ");
- Console.Out.Flush();
+ Write("testing object migration... ");
+ Flush();
hello = HelloPrxHelper.checkedCast(communicator.stringToProxy("hello"));
obj.migrateHello();
hello.sayHello();
@@ -543,15 +551,15 @@ public class AllTests
hello.sayHello();
obj.migrateHello();
hello.sayHello();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("shutdown server... ");
- Console.Out.Flush();
+ Write("shutdown server... ");
+ Flush();
obj.shutdown();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing whether server is gone... ");
- Console.Out.Flush();
+ Write("testing whether server is gone... ");
+ Flush();
try
{
obj2.ice_ping();
@@ -576,10 +584,11 @@ public class AllTests
catch(Ice.LocalException)
{
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing indirect proxies to collocated objects... ");
- Console.Out.Flush();
+#if !SILVERLIGHT
+ Write("testing indirect proxies to collocated objects... ");
+ Flush();
//
// Set up test for calling a collocated object through an
@@ -606,11 +615,14 @@ public class AllTests
{
}
adapter.deactivate();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("shutdown server manager... ");
- Console.Out.Flush();
+ Write("shutdown server manager... ");
+ Flush();
+ manager.shutdown();
+ WriteLine("ok");
+#else
manager.shutdown();
- Console.Out.WriteLine("ok");
+#endif
}
}
diff --git a/cs/test/Ice/location/App.xaml b/cs/test/Ice/location/App.xaml
new file mode 100644
index 00000000000..e24aaa3d564
--- /dev/null
+++ b/cs/test/Ice/location/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="location.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/location/App.xaml.cs b/cs/test/Ice/location/App.xaml.cs
new file mode 100644
index 00000000000..70fa3410ce7
--- /dev/null
+++ b/cs/test/Ice/location/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace location
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/location/Makefile b/cs/test/Ice/location/Makefile
index e1b0a16881f..cea8719a616 100644
--- a/cs/test/Ice/location/Makefile
+++ b/cs/test/Ice/location/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs HelloI.cs
+C_SRCS = AllTests.cs Client.cs HelloI.cs ../../TestCommon/TestApp.cs
S_SRCS = HelloI.cs Server.cs ServerLocator.cs ServerLocatorRegistry.cs ServerManagerI.cs TestI.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/location/Makefile.mak b/cs/test/Ice/location/Makefile.mak
index e17d2fbafb5..5cab0dcf7b4 100644
--- a/cs/test/Ice/location/Makefile.mak
+++ b/cs/test/Ice/location/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs HelloI.cs
+C_SRCS = AllTests.cs Client.cs HelloI.cs ..\..\TestCommon\TestApp.cs
S_SRCS = HelloI.cs Server.cs ServerLocator.cs ServerLocatorRegistry.cs ServerManagerI.cs TestI.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/location/Properties/AppManifest.xml b/cs/test/Ice/location/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/location/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/location/Properties/AssemblyInfo.cs b/cs/test/Ice/location/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..b0ad1a86c20
--- /dev/null
+++ b/cs/test/Ice/location/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("location")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("location")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("05699060-e3cb-4aa0-98f3-193dcad053e1")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/location/Properties/InBrowserSettings.xml b/cs/test/Ice/location/Properties/InBrowserSettings.xml
new file mode 100644
index 00000000000..3b6382d71c5
--- /dev/null
+++ b/cs/test/Ice/location/Properties/InBrowserSettings.xml
@@ -0,0 +1,5 @@
+<InBrowserSettings>
+ <InBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="NotRequired" />
+ </InBrowserSettings.SecuritySettings>
+</InBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/location/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/location/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..f9bab939f8b
--- /dev/null
+++ b/cs/test/Ice/location/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Location Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Location Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Location Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/location/location.csproj b/cs/test/Ice/location/location.csproj
new file mode 100644
index 00000000000..4385032946c
--- /dev/null
+++ b/cs/test/Ice/location/location.csproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{1170795D-9EE2-472A-AC4F-18F77255292C}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>location</RootNamespace>
+ <AssemblyName>location</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>location.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>location.App</SilverlightAppEntry>
+ <TestPageFileName>locationTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ <InBrowserSettingsFile>Properties\InBrowserSettings.xml</InBrowserSettingsFile>
+ <RequireInBrowserElevation>false</RequireInBrowserElevation>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\InBrowserSettings.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/objects/AllTests.cs b/cs/test/Ice/objects/AllTests.cs
index 735babc2917..b8f554bf172 100644
--- a/cs/test/Ice/objects/AllTests.cs
+++ b/cs/test/Ice/objects/AllTests.cs
@@ -7,61 +7,130 @@
//
// **********************************************************************
-using System;
+using System;
+using System.Diagnostics;
using Test;
-public class AllTests
-{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new Exception();
- }
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
+
+public class AllTests : TestCommon.TestApp
+{
+ private class MyObjectFactory : Ice.ObjectFactory
+ {
+ public Ice.Object create(string type)
+ {
+ if (type.Equals("::Test::B"))
+ {
+ return new BI();
+ }
+ else if (type.Equals("::Test::C"))
+ {
+ return new CI();
+ }
+ else if (type.Equals("::Test::D"))
+ {
+ return new DI();
+ }
+ else if (type.Equals("::Test::E"))
+ {
+ return new EI();
+ }
+ else if (type.Equals("::Test::F"))
+ {
+ return new FI();
+ }
+ else if (type.Equals("::Test::I"))
+ {
+ return new II();
+ }
+ else if (type.Equals("::Test::J"))
+ {
+ return new JI();
+ }
+ else if (type.Equals("::Test::H"))
+ {
+ return new HI();
+ }
+ Debug.Assert(false); // Should never be reached
+ return null;
+ }
+
+ public void
+ destroy()
+ {
+ // Nothing to do
+ }
}
-
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.FactoryAssemblies", "objects,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static InitialPrx allTests(Ice.Communicator communicator, bool collocated)
+#endif
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+#if SILVERLIGHT
+ bool collocated = false;
+#endif
+ Ice.ObjectFactory factory = new MyObjectFactory();
+ communicator.addObjectFactory(factory, "::Test::B");
+ communicator.addObjectFactory(factory, "::Test::C");
+ communicator.addObjectFactory(factory, "::Test::D");
+ communicator.addObjectFactory(factory, "::Test::E");
+ communicator.addObjectFactory(factory, "::Test::F");
+ communicator.addObjectFactory(factory, "::Test::I");
+ communicator.addObjectFactory(factory, "::Test::J");
+ communicator.addObjectFactory(factory, "::Test::H");
+
+ Write("testing stringToProxy... ");
+ Flush();
String @ref = "initial:default -p 12010";
Ice.ObjectPrx @base = communicator.stringToProxy(@ref);
test(@base != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
InitialPrx initial = InitialPrxHelper.checkedCast(@base);
test(initial != null);
test(initial.Equals(@base));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("getting B1... ");
- Console.Out.Flush();
+ Write("getting B1... ");
+ Flush();
B b1 = initial.getB1();
test(b1 != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("getting B2... ");
- Console.Out.Flush();
+ Write("getting B2... ");
+ Flush();
B b2 = initial.getB2();
test(b2 != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("getting C... ");
- Console.Out.Flush();
+ Write("getting C... ");
+ Flush();
C c = initial.getC();
test(c != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("getting D... ");
- Console.Out.Flush();
+ Write("getting D... ");
+ Flush();
D d = initial.getD();
test(d != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("checking consistency... ");
- Console.Out.Flush();
+ Write("checking consistency... ");
+ Flush();
test(b1 != b2);
//test(b1 != c);
//test(b1 != d);
@@ -88,10 +157,10 @@ public class AllTests
// sufficient.
test(b2.theA == b2);
test(d.theC == null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("getting B1, B2, C, and D all at once... ");
- Console.Out.Flush();
+ Write("getting B1, B2, C, and D all at once... ");
+ Flush();
B b1out;
B b2out;
C cout;
@@ -101,10 +170,10 @@ public class AllTests
test(b2out != null);
test(cout != null);
test(dout != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("checking consistency... ");
- Console.Out.Flush();
+ Write("checking consistency... ");
+ Flush();
test(b1out != b2out);
test(b1out.theA == b2out);
test(b1out.theB == b1out);
@@ -127,10 +196,10 @@ public class AllTests
test(dout.theB.theC.preMarshalInvoked);
test(dout.theB.theC.postUnmarshalInvoked());
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing protected members... ");
- Console.Out.Flush();
+ Write("testing protected members... ");
+ Flush();
E e = initial.getE();
test(e.checkValues());
System.Reflection.BindingFlags flags = System.Reflection.BindingFlags.NonPublic |
@@ -143,29 +212,29 @@ public class AllTests
test(f.e2.checkValues());
test(!typeof(F).GetField("e1", flags).IsPublic && !typeof(F).GetField("e1", flags).IsPrivate);
test(typeof(F).GetField("e2", flags).IsPublic && !typeof(F).GetField("e2", flags).IsPrivate);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("getting I, J and H... ");
- Console.Out.Flush();
+ Write("getting I, J and H... ");
+ Flush();
I i = initial.getI();
test(i != null);
I j = initial.getJ();
test(j != null && ((J)j) != null);
I h = initial.getH();
test(h != null && ((H)h) != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("setting I... ");
- Console.Out.Flush();
+ Write("setting I... ");
+ Flush();
initial.setI(i);
initial.setI(j);
initial.setI(h);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
if(!collocated)
{
- Console.Out.Write("testing UnexpectedObjectException...");
- Console.Out.Flush();
+ Write("testing UnexpectedObjectException...");
+ Flush();
@ref = "uoet:default -p 12010";
@base = communicator.stringToProxy(@ref);
test(@base != null);
@@ -183,12 +252,15 @@ public class AllTests
}
catch(System.Exception ex)
{
- Console.Out.WriteLine(ex);
+ WriteLine(ex.ToString());
test(false);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
-
+#if SILVERLIGHT
+ initial.shutdown();
+#else
return initial;
+#endif
}
}
diff --git a/cs/test/Ice/objects/App.xaml b/cs/test/Ice/objects/App.xaml
new file mode 100644
index 00000000000..f66e01941e2
--- /dev/null
+++ b/cs/test/Ice/objects/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="objects.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/objects/App.xaml.cs b/cs/test/Ice/objects/App.xaml.cs
new file mode 100644
index 00000000000..c3b0fcb83ba
--- /dev/null
+++ b/cs/test/Ice/objects/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace objects
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch(Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/objects/Client.cs b/cs/test/Ice/objects/Client.cs
index 10e3bbb996d..c001184a2d1 100644
--- a/cs/test/Ice/objects/Client.cs
+++ b/cs/test/Ice/objects/Client.cs
@@ -20,65 +20,8 @@ using System.Reflection;
public class Client
{
- private class MyObjectFactory : Ice.ObjectFactory
- {
- public Ice.Object create(string type)
- {
- if(type.Equals("::Test::B"))
- {
- return new BI();
- }
- else if(type.Equals("::Test::C"))
- {
- return new CI();
- }
- else if(type.Equals("::Test::D"))
- {
- return new DI();
- }
- else if(type.Equals("::Test::E"))
- {
- return new EI();
- }
- else if(type.Equals("::Test::F"))
- {
- return new FI();
- }
- else if(type.Equals("::Test::I"))
- {
- return new II();
- }
- else if(type.Equals("::Test::J"))
- {
- return new JI();
- }
- else if(type.Equals("::Test::H"))
- {
- return new HI();
- }
- Debug.Assert(false); // Should never be reached
- return null;
- }
-
- public void
- destroy()
- {
- // Nothing to do
- }
- }
-
private static int run(string[] args, Ice.Communicator communicator)
{
- Ice.ObjectFactory factory = new MyObjectFactory();
- communicator.addObjectFactory(factory, "::Test::B");
- communicator.addObjectFactory(factory, "::Test::C");
- communicator.addObjectFactory(factory, "::Test::D");
- communicator.addObjectFactory(factory, "::Test::E");
- communicator.addObjectFactory(factory, "::Test::F");
- communicator.addObjectFactory(factory, "::Test::I");
- communicator.addObjectFactory(factory, "::Test::J");
- communicator.addObjectFactory(factory, "::Test::H");
-
InitialPrx initial = AllTests.allTests(communicator, false);
initial.shutdown();
return 0;
diff --git a/cs/test/Ice/objects/Makefile b/cs/test/Ice/objects/Makefile
index de85931fd2a..2452355c717 100644
--- a/cs/test/Ice/objects/Makefile
+++ b/cs/test/Ice/objects/Makefile
@@ -11,11 +11,11 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe
-C_SRCS = AllTests.cs BI.cs CI.cs DI.cs EI.cs FI.cs II.cs JI.cs HI.cs Client.cs
+C_SRCS = AllTests.cs BI.cs CI.cs DI.cs EI.cs FI.cs II.cs JI.cs HI.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = InitialI.cs BI.cs CI.cs DI.cs EI.cs FI.cs II.cs JI.cs HI.cs Server.cs \
UnexpectedObjectExceptionTestI.cs
COL_SRCS = AllTests.cs BI.cs CI.cs DI.cs EI.cs FI.cs II.cs JI.cs HI.cs Collocated.cs InitialI.cs \
- UnexpectedObjectExceptionTestI.cs
+ UnexpectedObjectExceptionTestI.cs ../../TestCommon/TestApp.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/objects/Makefile.mak b/cs/test/Ice/objects/Makefile.mak
index b4a4d49bd07..24031e22a8a 100644
--- a/cs/test/Ice/objects/Makefile.mak
+++ b/cs/test/Ice/objects/Makefile.mak
@@ -11,11 +11,11 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe
-C_SRCS = AllTests.cs BI.cs CI.cs DI.cs EI.cs FI.cs II.cs JI.cs HI.cs Client.cs
+C_SRCS = AllTests.cs BI.cs CI.cs DI.cs EI.cs FI.cs II.cs JI.cs HI.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = InitialI.cs BI.cs CI.cs DI.cs EI.cs FI.cs II.cs JI.cs HI.cs Server.cs \
UnexpectedObjectExceptionTestI.cs
COL_SRCS = AllTests.cs BI.cs CI.cs DI.cs EI.cs FI.cs II.cs JI.cs HI.cs Collocated.cs InitialI.cs \
- UnexpectedObjectExceptionTestI.cs
+ UnexpectedObjectExceptionTestI.cs ..\..\TestCommon\TestApp.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/objects/Properties/AppManifest.xml b/cs/test/Ice/objects/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/objects/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/objects/Properties/AssemblyInfo.cs b/cs/test/Ice/objects/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..24c6835e918
--- /dev/null
+++ b/cs/test/Ice/objects/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("objects")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("objects")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("ea52e19b-9e94-442f-9cf3-0c49e4a37bda")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/objects/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/objects/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..2d8b4348747
--- /dev/null
+++ b/cs/test/Ice/objects/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Objects Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Objects Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Objects Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/objects/objects.csproj b/cs/test/Ice/objects/objects.csproj
new file mode 100644
index 00000000000..f2bc3fe729f
--- /dev/null
+++ b/cs/test/Ice/objects/objects.csproj
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B4C71555-2292-44E2-B5C6-9EB3C92FF308}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>objects</RootNamespace>
+ <AssemblyName>objects</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>objects.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>objects.App</SilverlightAppEntry>
+ <TestPageFileName>objectsTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="BI.cs" />
+ <Compile Include="CI.cs" />
+ <Compile Include="DI.cs" />
+ <Compile Include="EI.cs" />
+ <Compile Include="FI.cs" />
+ <Compile Include="HI.cs" />
+ <Compile Include="II.cs" />
+ <Compile Include="JI.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/operations/AllTests.cs b/cs/test/Ice/operations/AllTests.cs
index 666103aee55..ece2e4490f1 100644
--- a/cs/test/Ice/operations/AllTests.cs
+++ b/cs/test/Ice/operations/AllTests.cs
@@ -7,61 +7,96 @@
//
// **********************************************************************
-using System;
+using System;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ //
+ // In this test, we need at least two threads in the
+ // client side thread pool for nested AMI.
+ //
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.ThreadPool.Client.Size", "2");
+ initData.properties.setProperty("Ice.ThreadPool.Client.SizeWarn", "0");
+
+ //
+ // We must set MessageSizeMax to an explicit values,
+ // because we run tests to check whether
+ // Ice.MemoryLimitException is raised as expected.
+ //
+ initData.properties.setProperty("Ice.MessageSizeMax", "100");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static Test.MyClassPrx allTests(Ice.Communicator communicator, bool collocated)
+#endif
{
- Console.Out.Flush();
+#if SILVERLIGHT
+ bool collocated = false;
+#endif
+ Flush();
string rf = "test:default -p 12010";
Ice.ObjectPrx baseProxy = communicator.stringToProxy(rf);
Test.MyClassPrx cl = Test.MyClassPrxHelper.checkedCast(baseProxy);
Test.MyDerivedClassPrx derivedProxy = Test.MyDerivedClassPrxHelper.checkedCast(cl);
- Console.Out.Write("testing twoway operations... ");
- Console.Out.Flush();
+ Write("testing twoway operations... ");
+ Flush();
Twoways.twoways(communicator, cl);
Twoways.twoways(communicator, derivedProxy);
derivedProxy.opDerived();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing oneway operations... ");
- Console.Out.Flush();
+ Write("testing oneway operations... ");
+ Flush();
Oneways.oneways(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
if(!collocated)
{
- Console.Out.Write("testing twoway operations with AMI... ");
- Console.Out.Flush();
+ Write("testing twoway operations with AMI... ");
+ Flush();
TwowaysAMI.twowaysAMI(communicator, cl);
TwowaysAMI.twowaysAMI(communicator, derivedProxy);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing twoway operations with new AMI mapping... ");
- Console.Out.Flush();
+ Write("testing twoway operations with new AMI mapping... ");
+ Flush();
TwowaysNewAMI.twowaysNewAMI(communicator, cl);
TwowaysNewAMI.twowaysNewAMI(communicator, derivedProxy);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing oneway operations with AMI... ");
- Console.Out.Flush();
+ Write("testing oneway operations with AMI... ");
+ Flush();
OnewaysAMI.onewaysAMI(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing oneway operations with new AMI mapping... ");
- Console.Out.Flush();
+ Write("testing oneway operations with new AMI mapping... ");
+ Flush();
OnewaysNewAMI.onewaysNewAMI(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing batch oneway operations... ");
- Console.Out.Flush();
+ Write("testing batch oneway operations... ");
+ Flush();
BatchOneways.batchOneways(cl);
BatchOneways.batchOneways(derivedProxy);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
-
+#if SILVERLIGHT
+ cl.shutdown();
+#else
return cl;
+#endif
}
}
diff --git a/cs/test/Ice/operations/App.xaml b/cs/test/Ice/operations/App.xaml
new file mode 100644
index 00000000000..e1fc027a78a
--- /dev/null
+++ b/cs/test/Ice/operations/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="operations.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/operations/App.xaml.cs b/cs/test/Ice/operations/App.xaml.cs
new file mode 100644
index 00000000000..d328417721d
--- /dev/null
+++ b/cs/test/Ice/operations/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace operations
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/operations/Makefile b/cs/test/Ice/operations/Makefile
index 4fbbf7a5f4f..8a7aed1dad4 100644
--- a/cs/test/Ice/operations/Makefile
+++ b/cs/test/Ice/operations/Makefile
@@ -12,9 +12,11 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe serveramd.exe servertie.exe serveramdtie.exe
C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs BatchOneways.cs \
+ ../../TestCommon/TestApp.cs \
Oneways.cs OnewaysAMI.cs OnewaysNewAMI.cs
S_SRCS = MyDerivedClassI.cs Server.cs
COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs \
+ ../../TestCommon/TestApp.cs \
BatchOneways.cs Oneways.cs \
OnewaysAMI.cs OnewaysNewAMI.cs
SAMD_SRCS = MyDerivedClassAMDI.cs Server.cs
diff --git a/cs/test/Ice/operations/Makefile.mak b/cs/test/Ice/operations/Makefile.mak
index a5db9cc1e10..d928f9cdd38 100644
--- a/cs/test/Ice/operations/Makefile.mak
+++ b/cs/test/Ice/operations/Makefile.mak
@@ -12,10 +12,10 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe serveramd.exe servertie.exe serveramdtie.exe
C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs BatchOneways.cs Oneways.cs \
- OnewaysAMI.cs OnewaysNewAMI.cs
+ OnewaysAMI.cs OnewaysNewAMI.cs ..\..\TestCommon\TestApp.cs
S_SRCS = MyDerivedClassI.cs Server.cs
COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs \
- BatchOneways.cs Oneways.cs OnewaysAMI.cs OnewaysNewAMI.cs
+ BatchOneways.cs Oneways.cs OnewaysAMI.cs OnewaysNewAMI.cs ..\..\TestCommon\TestApp.cs
SAMD_SRCS = MyDerivedClassAMDI.cs Server.cs
STIE_SRCS = MyDerivedClassTieI.cs Server.cs
SAMD_TIE_SRCS = MyDerivedClassAMDTieI.cs Server.cs
diff --git a/cs/test/Ice/operations/Properties/AppManifest.xml b/cs/test/Ice/operations/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/operations/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/operations/Properties/AssemblyInfo.cs b/cs/test/Ice/operations/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..bc440189708
--- /dev/null
+++ b/cs/test/Ice/operations/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("operations")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("operations")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("bda4efb4-5cf6-4ecb-98b1-985ae4e97632")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/operations/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/operations/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..416e8d6fe4b
--- /dev/null
+++ b/cs/test/Ice/operations/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Operations Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Operations Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Operations Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/operations/operations.csproj b/cs/test/Ice/operations/operations.csproj
new file mode 100644
index 00000000000..01a08cb0870
--- /dev/null
+++ b/cs/test/Ice/operations/operations.csproj
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{EEF0327D-EAA7-49B4-80B9-7CC265A7AD96}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>operations</RootNamespace>
+ <AssemblyName>operations</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>operations.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>operations.App</SilverlightAppEntry>
+ <TestPageFileName>operationsTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="BatchOneways.cs" />
+ <Compile Include="Oneways.cs" />
+ <Compile Include="OnewaysAMI.cs" />
+ <Compile Include="OnewaysNewAMI.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ <Compile Include="Twoways.cs" />
+ <Compile Include="TwowaysAMI.cs" />
+ <Compile Include="TwowaysNewAMI.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/proxy/AllTests.cs b/cs/test/Ice/proxy/AllTests.cs
index a96e0a0a2d6..2ac79859a9c 100644
--- a/cs/test/Ice/proxy/AllTests.cs
+++ b/cs/test/Ice/proxy/AllTests.cs
@@ -9,22 +9,23 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
+using System.Diagnostics;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if (!b)
- {
- throw new Exception();
- }
- }
-
+#if SILVERLIGHT
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static Test.MyClassPrx allTests(Ice.Communicator communicator)
+#endif
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+ Write("testing stringToProxy... ");
+ Flush();
string rf = "test:default -p 12010";
Ice.ObjectPrx baseProxy = communicator.stringToProxy(rf);
test(baseProxy != null);
@@ -244,10 +245,10 @@ public class AllTests
catch(Ice.EndpointParseException)
{
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing propertyToProxy... ");
- Console.Out.Flush();
+ Write("testing propertyToProxy... ");
+ Flush();
Ice.Properties prop = communicator.getProperties();
String propertyPrefix = "Foo.Proxy";
prop.setProperty(propertyPrefix, "test:default -p 12010");
@@ -262,8 +263,14 @@ public class AllTests
prop.setProperty(property, "locator:default -p 10000");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getLocator() != null && b1.ice_getLocator().ice_getIdentity().name.Equals("locator"));
- prop.setProperty(property, "");
-
+ try
+ {
+ prop.setProperty(property, "");
+ }
+ catch(Exception ex)
+ {
+ System.Console.WriteLine(ex.ToString());
+ }
property = propertyPrefix + ".LocatorCacheTimeout";
test(b1.ice_getLocatorCacheTimeout() == -1);
prop.setProperty(property, "1");
@@ -336,10 +343,10 @@ public class AllTests
prop.setProperty(property, "");
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing proxyToProperty... ");
- Console.Out.Flush();
+ Write("testing proxyToProperty... ");
+ Flush();
b1 = communicator.stringToProxy("test");
b1 = b1.ice_collocationOptimized(true);
@@ -389,14 +396,14 @@ public class AllTests
test(proxyProps["Test.Locator.Router.EndpointSelection"].Equals("Random"));
test(proxyProps["Test.Locator.Router.LocatorCacheTimeout"].Equals("200"));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing ice_getCommunicator... ");
- Console.Out.Flush();
+ Write("testing ice_getCommunicator... ");
+ Flush();
test(baseProxy.ice_getCommunicator() == communicator);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing proxy methods... ");
+ Write("testing proxy methods... ");
test(communicator.identityToString(
baseProxy.ice_identity(communicator.stringToIdentity("other")).ice_getIdentity()).Equals("other"));
test(baseProxy.ice_facet("facet").ice_getFacet().Equals("facet"));
@@ -412,10 +419,10 @@ public class AllTests
test(!baseProxy.ice_collocationOptimized(false).ice_isCollocationOptimized());
test(baseProxy.ice_preferSecure(true).ice_isPreferSecure());
test(!baseProxy.ice_preferSecure(false).ice_isPreferSecure());
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing proxy comparison... ");
- Console.Out.Flush();
+ Write("testing proxy comparison... ");
+ Flush();
test(communicator.stringToProxy("foo").Equals(communicator.stringToProxy("foo")));
test(!communicator.stringToProxy("foo").Equals(communicator.stringToProxy("foo2")));
@@ -505,10 +512,10 @@ public class AllTests
//
// TODO: Ideally we should also test comparison of fixed proxies.
//
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
Test.MyClassPrx cl = Test.MyClassPrxHelper.checkedCast(baseProxy);
test(cl != null);
Test.MyDerivedClassPrx derived = Test.MyDerivedClassPrxHelper.checkedCast(cl);
@@ -516,10 +523,10 @@ public class AllTests
test(cl.Equals(baseProxy));
test(derived.Equals(baseProxy));
test(cl.Equals(derived));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast with context... ");
- Console.Out.Flush();
+ Write("testing checked cast with context... ");
+ Flush();
Dictionary<string, string> c = cl.getContext();
test(c == null || c.Count == 0);
@@ -530,10 +537,10 @@ public class AllTests
cl = Test.MyClassPrxHelper.checkedCast(baseProxy, c);
Dictionary<string, string> c2 = cl.getContext();
test(Ice.CollectionComparer.Equals(c, c2));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing opaque endpoints... ");
- Console.Out.Flush();
+ Write("testing opaque endpoints... ");
+ Flush();
try
{
@@ -709,8 +716,11 @@ public class AllTests
}
}
- Console.Out.WriteLine("ok");
-
+ WriteLine("ok");
+#if SILVERLIGHT
+ cl.shutdown();
+#else
return cl;
+#endif
}
}
diff --git a/cs/test/Ice/proxy/App.xaml b/cs/test/Ice/proxy/App.xaml
new file mode 100644
index 00000000000..391fa54d9b8
--- /dev/null
+++ b/cs/test/Ice/proxy/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="proxy.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/proxy/App.xaml.cs b/cs/test/Ice/proxy/App.xaml.cs
new file mode 100644
index 00000000000..8ad879db76e
--- /dev/null
+++ b/cs/test/Ice/proxy/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace proxy
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/proxy/Makefile b/cs/test/Ice/proxy/Makefile
index de0fb97ed79..d3f9919ee30 100644
--- a/cs/test/Ice/proxy/Makefile
+++ b/cs/test/Ice/proxy/Makefile
@@ -11,9 +11,9 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = MyDerivedClassI.cs Server.cs
-COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs
+COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs ../../TestCommon/TestApp.cs
SAMD_SRCS = MyDerivedClassAMDI.cs Server.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/proxy/Makefile.mak b/cs/test/Ice/proxy/Makefile.mak
index d6286d8f75c..1a01b9be17e 100644
--- a/cs/test/Ice/proxy/Makefile.mak
+++ b/cs/test/Ice/proxy/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = MyDerivedClassI.cs Server.cs
-COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs
+COL_SRCS = AllTests.cs Collocated.cs MyDerivedClassI.cs ..\..\TestCommon\TestApp.cs
SAMD_SRCS = MyDerivedClassAMDI.cs Server.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/proxy/Properties/AppManifest.xml b/cs/test/Ice/proxy/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/proxy/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/proxy/Properties/AssemblyInfo.cs b/cs/test/Ice/proxy/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..60624fd2999
--- /dev/null
+++ b/cs/test/Ice/proxy/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("proxy")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("proxy")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("967de86e-70d2-4b7e-98cb-191318e47157")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/proxy/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/proxy/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..31903b75392
--- /dev/null
+++ b/cs/test/Ice/proxy/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Proxy Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Proxy Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Proxy Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/proxy/proxy.csproj b/cs/test/Ice/proxy/proxy.csproj
new file mode 100644
index 00000000000..d10b79758a5
--- /dev/null
+++ b/cs/test/Ice/proxy/proxy.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{B558C1F5-CC5A-4D64-848F-BD196AFB1FC7}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>proxy</RootNamespace>
+ <AssemblyName>proxy</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>proxy.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>proxy.App</SilverlightAppEntry>
+ <TestPageFileName>proxyTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/retry/AllTests.cs b/cs/test/Ice/retry/AllTests.cs
index 8f6a50d527e..5ec5c3b0a7b 100644
--- a/cs/test/Ice/retry/AllTests.cs
+++ b/cs/test/Ice/retry/AllTests.cs
@@ -9,18 +9,14 @@
using System;
using System.Diagnostics;
-using System.Threading;
+using System.Threading;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new Exception();
- }
- }
-
private class Callback
{
internal Callback()
@@ -106,34 +102,39 @@ public class AllTests
private Callback callback = new Callback();
}
+#if SILVERLIGHT
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static Test.RetryPrx allTests(Ice.Communicator communicator)
+#endif
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+ Write("testing stringToProxy... ");
+ Flush();
string rf = "retry:default -p 12010";
Ice.ObjectPrx base1 = communicator.stringToProxy(rf);
test(base1 != null);
Ice.ObjectPrx base2 = communicator.stringToProxy(rf);
test(base2 != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
Test.RetryPrx retry1 = Test.RetryPrxHelper.checkedCast(base1);
test(retry1 != null);
test(retry1.Equals(base1));
Test.RetryPrx retry2 = Test.RetryPrxHelper.checkedCast(base2);
test(retry2 != null);
test(retry2.Equals(base2));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("calling regular operation with first proxy... ");
- Console.Out.Flush();
+ Write("calling regular operation with first proxy... ");
+ Flush();
retry1.op(false);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("calling operation to kill connection with second proxy... ");
- Console.Out.Flush();
+ Write("calling operation to kill connection with second proxy... ");
+ Flush();
try
{
retry2.op(true);
@@ -141,32 +142,35 @@ public class AllTests
}
catch(Ice.ConnectionLostException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
- Console.Out.Write("calling regular operation with first proxy again... ");
- Console.Out.Flush();
+ Write("calling regular operation with first proxy again... ");
+ Flush();
retry1.op(false);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
AMIRegular cb1 = new AMIRegular();
AMIException cb2 = new AMIException();
- Console.Out.Write("calling regular AMI operation with first proxy... ");
+ Write("calling regular AMI operation with first proxy... ");
retry1.begin_op(false).whenCompleted(cb1.response, cb1.exception);
cb1.check();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("calling AMI operation to kill connection with second proxy... ");
+ Write("calling AMI operation to kill connection with second proxy... ");
retry2.begin_op(true).whenCompleted(cb2.response, cb2.exception);
cb2.check();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("calling regular AMI operation with first proxy again... ");
+ Write("calling regular AMI operation with first proxy again... ");
retry1.begin_op(false).whenCompleted(cb1.response, cb1.exception);
cb1.check();
- Console.Out.WriteLine("ok");
-
+ WriteLine("ok");
+#if SILVERLIGHT
+ retry1.shutdown();
+#else
return retry1;
+#endif
}
}
diff --git a/cs/test/Ice/retry/App.xaml b/cs/test/Ice/retry/App.xaml
new file mode 100644
index 00000000000..fb234f48f43
--- /dev/null
+++ b/cs/test/Ice/retry/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="retry.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/retry/App.xaml.cs b/cs/test/Ice/retry/App.xaml.cs
new file mode 100644
index 00000000000..1190c9cc11b
--- /dev/null
+++ b/cs/test/Ice/retry/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace retry
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/retry/Makefile b/cs/test/Ice/retry/Makefile
index 3f2faef10fa..651dcda5566 100644
--- a/cs/test/Ice/retry/Makefile
+++ b/cs/test/Ice/retry/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = RetryI.cs Server.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/retry/Makefile.mak b/cs/test/Ice/retry/Makefile.mak
index e64d1b62256..9d7f1a2990a 100644
--- a/cs/test/Ice/retry/Makefile.mak
+++ b/cs/test/Ice/retry/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = RetryI.cs Server.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/retry/Properties/AppManifest.xml b/cs/test/Ice/retry/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/retry/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/retry/Properties/AssemblyInfo.cs b/cs/test/Ice/retry/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..5226a6758f6
--- /dev/null
+++ b/cs/test/Ice/retry/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("retry")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("retry")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("efbdcebb-806c-49d4-94e8-a966e6c5d441")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/retry/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/retry/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..839e7476e00
--- /dev/null
+++ b/cs/test/Ice/retry/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Retry Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Retry Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Retry Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/retry/retry.csproj b/cs/test/Ice/retry/retry.csproj
new file mode 100644
index 00000000000..e8009cbdc48
--- /dev/null
+++ b/cs/test/Ice/retry/retry.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{59049797-A1DC-4D8E-BCC2-B2A86C8DFA99}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>retry</RootNamespace>
+ <AssemblyName>retry</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>retry.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>retry.App</SilverlightAppEntry>
+ <TestPageFileName>retryTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/seqMapping/AllTests.cs b/cs/test/Ice/seqMapping/AllTests.cs
index 9ceb7b4e10e..7dc1671ec8b 100644
--- a/cs/test/Ice/seqMapping/AllTests.cs
+++ b/cs/test/Ice/seqMapping/AllTests.cs
@@ -7,35 +7,58 @@
//
// **********************************************************************
-using System;
+using System;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.FactoryAssemblies", "seqMapping,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static Test.MyClassPrx allTests(Ice.Communicator communicator, bool collocated)
+#endif
{
- Console.Out.Flush();
+#if SILVERLIGHT
+ bool collocated = false;
+#endif
+ Flush();
string rf = "test:default -p 12010";
Ice.ObjectPrx baseProxy = communicator.stringToProxy(rf);
Test.MyClassPrx cl = Test.MyClassPrxHelper.checkedCast(baseProxy);
- Console.Out.Write("testing twoway operations... ");
- Console.Out.Flush();
+ Write("testing twoway operations... ");
+ Flush();
Twoways.twoways(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
if(!collocated)
{
- Console.Out.Write("testing twoway operations with AMI... ");
- Console.Out.Flush();
+ Write("testing twoway operations with AMI... ");
+ Flush();
TwowaysAMI.twowaysAMI(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing twoway operations with new AMI mapping... ");
- Console.Out.Flush();
+ Write("testing twoway operations with new AMI mapping... ");
+ Flush();
TwowaysNewAMI.twowaysAMI(communicator, cl);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
-
+#if SILVERLIGHT
+ cl.shutdown();
+#else
return cl;
+#endif
}
}
diff --git a/cs/test/Ice/seqMapping/App.xaml b/cs/test/Ice/seqMapping/App.xaml
new file mode 100644
index 00000000000..4043dbfbaa3
--- /dev/null
+++ b/cs/test/Ice/seqMapping/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="seqMapping.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/seqMapping/App.xaml.cs b/cs/test/Ice/seqMapping/App.xaml.cs
new file mode 100644
index 00000000000..c8742779077
--- /dev/null
+++ b/cs/test/Ice/seqMapping/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace seqMapping
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch(Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/seqMapping/Makefile b/cs/test/Ice/seqMapping/Makefile
index cd344a8f081..0651d35e703 100644
--- a/cs/test/Ice/seqMapping/Makefile
+++ b/cs/test/Ice/seqMapping/Makefile
@@ -11,9 +11,10 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe collocated.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs ../../TestCommon/TestApp.cs
S_SRCS = MyClassI.cs Server.cs Custom.cs
-COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs
+COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs \
+ ../../TestCommon/TestApp.cs
SAMD_SRCS = MyClassAMDI.cs ServerAMD.cs Custom.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/seqMapping/Makefile.mak b/cs/test/Ice/seqMapping/Makefile.mak
index 3584cbb0eb3..773238e38eb 100644
--- a/cs/test/Ice/seqMapping/Makefile.mak
+++ b/cs/test/Ice/seqMapping/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe collocated.exe serveramd.exe Serializable.dll
-C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs
+C_SRCS = AllTests.cs Client.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs ..\..\TestCommon\TestApp.cs
S_SRCS = MyClassI.cs Server.cs Custom.cs
-COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs
+COL_SRCS = AllTests.cs Collocated.cs MyClassI.cs Twoways.cs TwowaysAMI.cs TwowaysNewAMI.cs Custom.cs ..\..\TestCommon\TestApp.cs
SAMD_SRCS = MyClassAMDI.cs ServerAMD.cs Custom.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/seqMapping/Properties/AppManifest.xml b/cs/test/Ice/seqMapping/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/seqMapping/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/seqMapping/Properties/AssemblyInfo.cs b/cs/test/Ice/seqMapping/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..0e618f1d96a
--- /dev/null
+++ b/cs/test/Ice/seqMapping/Properties/AssemblyInfo.cs
@@ -0,0 +1,35 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("seqMapping")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("seqMapping")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1f04ea13-1598-4c53-be67-f352328c6bb7")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/seqMapping/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/seqMapping/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..7ea34658961
--- /dev/null
+++ b/cs/test/Ice/seqMapping/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Sequence Mapping Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Sequence Mapping Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Sequence Mapping Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/seqMapping/Serializable.cs b/cs/test/Ice/seqMapping/Serializable.cs
index 9840b486473..5e91ea112c3 100644
--- a/cs/test/Ice/seqMapping/Serializable.cs
+++ b/cs/test/Ice/seqMapping/Serializable.cs
@@ -6,7 +6,7 @@
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
-
+#if !SILVERLIGHT
using System;
[assembly: CLSCompliant(true)]
@@ -45,3 +45,4 @@ public class Struct // Used to test that null members marshal correctly.
}
}
+#endif
diff --git a/cs/test/Ice/seqMapping/Test.ice b/cs/test/Ice/seqMapping/Test.ice
index 2f0f29f8b07..96da90ad816 100644
--- a/cs/test/Ice/seqMapping/Test.ice
+++ b/cs/test/Ice/seqMapping/Test.ice
@@ -131,9 +131,11 @@ sequence<En> AEnS;
["clr:generic:Custom"] sequence<CustomIntS> CustomIntSS;
["clr:generic:Custom"] sequence<CustomCVS> CustomCVSS;
+#ifndef SILVERLIGHT
["clr:serializable:Serialize.Small"] sequence<byte> SerialSmall;
["clr:serializable:Serialize.Large"] sequence<byte> SerialLarge;
["clr:serializable:Serialize.Struct"] sequence<byte> SerialStruct;
+#endif
["ami"] class MyClass
{
@@ -240,15 +242,17 @@ sequence<En> AEnS;
CustomIntSS opCustomIntSS(CustomIntSS i, out CustomIntSS o);
CustomCVSS opCustomCVSS(CustomCVSS i, out CustomCVSS o);
-
+#ifndef SILVERLIGHT
SerialSmall opSerialSmallCSharp(SerialSmall i, out SerialSmall o);
SerialLarge opSerialLargeCSharp(SerialLarge i, out SerialLarge o);
SerialStruct opSerialStructCSharp(SerialStruct i, out SerialStruct o);
+#endif
};
// Remaining type definitions are there to verify that the generated
// code compiles correctly.
+#ifndef SILVERLIGHT
sequence<SerialLarge> SLS;
sequence<SLS> SLSS;
dictionary<int, SerialLarge> SLD;
@@ -270,5 +274,5 @@ class Baz
SerialLarge SLmem;
SLS SLSmem;
};
-
+#endif
};
diff --git a/cs/test/Ice/seqMapping/Twoways.cs b/cs/test/Ice/seqMapping/Twoways.cs
index 07ff5d69bca..4cab74bc00e 100644
--- a/cs/test/Ice/seqMapping/Twoways.cs
+++ b/cs/test/Ice/seqMapping/Twoways.cs
@@ -1410,10 +1410,10 @@ class Twoways
test(obj.i == ir.Current.i);
}
}
- }
- }
-
-#if !COMPACT
+ }
+ }
+
+#if !COMPACT && !SILVERLIGHT
{
Serialize.Small i = null;
Serialize.Small o;
@@ -1521,6 +1521,6 @@ class Twoways
// OK, talking to non-C# server.
}
}
-#endif
+#endif
}
}
diff --git a/cs/test/Ice/seqMapping/TwowaysAMI.cs b/cs/test/Ice/seqMapping/TwowaysAMI.cs
index ff6eb216c3b..80ca2335bba 100644
--- a/cs/test/Ice/seqMapping/TwowaysAMI.cs
+++ b/cs/test/Ice/seqMapping/TwowaysAMI.cs
@@ -2547,7 +2547,7 @@ public class TwowaysAMI
private Callback callback = new Callback();
}
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
private class AMI_MyClass_opSerialSmallCSharpNull : Test.AMI_MyClass_opSerialSmallCSharp
{
public AMI_MyClass_opSerialSmallCSharpNull()
@@ -3712,10 +3712,10 @@ public class TwowaysAMI
AMI_MyClass_opCustomCVSSI cb = new AMI_MyClass_opCustomCVSSI(i);
p.opCustomCVSS_async(cb, i);
- cb.check();
- }
-
-#if !COMPACT
+ cb.check();
+ }
+
+#if !COMPACT && !SILVERLIGHT
{
Serialize.Small i = null;
@@ -3762,6 +3762,6 @@ public class TwowaysAMI
p.opSerialStructCSharp_async(cb, i);
cb.check();
}
-#endif
+#endif
}
}
diff --git a/cs/test/Ice/seqMapping/TwowaysNewAMI.cs b/cs/test/Ice/seqMapping/TwowaysNewAMI.cs
index 20b61b1e326..0d964c475f5 100644
--- a/cs/test/Ice/seqMapping/TwowaysNewAMI.cs
+++ b/cs/test/Ice/seqMapping/TwowaysNewAMI.cs
@@ -1021,7 +1021,7 @@ public class TwowaysNewAMI
callback.called();
}
-#if !COMPACT
+#if !COMPACT && !SILVERLIGHT
public void opSerialSmallCSharpNullI(Ice.AsyncResult result)
{
try
@@ -2159,10 +2159,10 @@ public class TwowaysNewAMI
Callback cb = new Callback();
p.begin_opCustomCVSS(i, null, cb.opCustomCVSSI, i);
- cb.check();
- }
-
-#if !COMPACT
+ cb.check();
+ }
+
+#if !COMPACT && !SILVERLIGHT
{
Serialize.Small i = null;
@@ -2209,6 +2209,6 @@ public class TwowaysNewAMI
p.begin_opSerialStructCSharp(i, null, cb.opSerialStructCSharpI, i);
cb.check();
}
-#endif
+#endif
}
}
diff --git a/cs/test/Ice/seqMapping/seqMapping.csproj b/cs/test/Ice/seqMapping/seqMapping.csproj
new file mode 100644
index 00000000000..ce7696ec614
--- /dev/null
+++ b/cs/test/Ice/seqMapping/seqMapping.csproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{3B586590-63D2-48FD-9973-6CB6BA107C27}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>seqMapping</RootNamespace>
+ <AssemblyName>seqMapping</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>seqMapping.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>seqMapping.App</SilverlightAppEntry>
+ <TestPageFileName>seqMappingTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Custom.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Serializable.cs" />
+ <Compile Include="Test.cs" />
+ <Compile Include="Twoways.cs" />
+ <Compile Include="TwowaysAMI.cs" />
+ <Compile Include="TwowaysNewAMI.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_ExtraOptions="-DSILVERLIGHT" ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/servantLocator/AllTests.cs b/cs/test/Ice/servantLocator/AllTests.cs
index 825633ed9e2..04c3f7053c2 100644
--- a/cs/test/Ice/servantLocator/AllTests.cs
+++ b/cs/test/Ice/servantLocator/AllTests.cs
@@ -9,18 +9,14 @@
using System;
using Test;
-using Ice;
+using Ice;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
public static void testExceptions(TestIntfPrx obj, bool collocated)
{
try
@@ -185,24 +181,40 @@ public class AllTests
}
}
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.FactoryAssemblies", "servantLocator,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static TestIntfPrx allTests(Ice.Communicator communicator, bool collocated)
+#endif
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+#if SILVERLIGHT
+ bool collocated = false;
+#endif
+ Write("testing stringToProxy... ");
+ Flush();
string @ref = "asm:default -p 12010";
Ice.ObjectPrx @base = communicator.stringToProxy(@ref);
test(@base != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
TestIntfPrx obj = TestIntfPrxHelper.checkedCast(@base);
test(obj != null);
test(obj.Equals(@base));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing ice_ids... ");
- Console.Out.Flush();
+ Write("testing ice_ids... ");
+ Flush();
try
{
Ice.ObjectPrx o = communicator.stringToProxy("category/locate:default -p 12010");
@@ -232,10 +244,10 @@ public class AllTests
{
test(false);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing servant locator...");
- Console.Out.Flush();
+ Write("testing servant locator...");
+ Flush();
@base = communicator.stringToProxy("category/locate:default -p 12010");
obj = TestIntfPrxHelper.checkedCast(@base);
try
@@ -245,10 +257,10 @@ public class AllTests
catch(ObjectNotExistException)
{
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing default servant locator...");
- Console.Out.Flush();
+ Write("testing default servant locator...");
+ Flush();
@base = communicator.stringToProxy("anothercat/locate:default -p 12010");
obj = TestIntfPrxHelper.checkedCast(@base);
@base = communicator.stringToProxy("locate:default -p 12010");
@@ -267,17 +279,17 @@ public class AllTests
catch(ObjectNotExistException)
{
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing locate exceptions... ");
- Console.Out.Flush();
+ Write("testing locate exceptions... ");
+ Flush();
@base = communicator.stringToProxy("category/locate:default -p 12010");
obj = TestIntfPrxHelper.checkedCast(@base);
testExceptions(obj, collocated);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing finished exceptions... ");
- Console.Out.Flush();
+ Write("testing finished exceptions... ");
+ Flush();
@base = communicator.stringToProxy("category/finished:default -p 12010");
obj = TestIntfPrxHelper.checkedCast(@base);
testExceptions(obj, collocated);
@@ -318,10 +330,10 @@ public class AllTests
//
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing servant locator removal... ");
- Console.Out.Flush();
+ Write("testing servant locator removal... ");
+ Flush();
@base = communicator.stringToProxy("test/activation:default -p 12010");
TestActivationPrx activation = TestActivationPrxHelper.checkedCast(@base);
activation.activateServantLocator(false);
@@ -332,21 +344,24 @@ public class AllTests
}
catch(ObjectNotExistException)
{
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
- Console.Out.Write("testing servant locator addition... ");
- Console.Out.Flush();
+ Write("testing servant locator addition... ");
+ Flush();
activation.activateServantLocator(true);
try
{
obj.ice_ping();
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
}
catch(System.Exception)
{
test(false);
}
-
+#if SILVERLIGHT
+ obj.shutdown();
+#else
return obj;
+#endif
}
}
diff --git a/cs/test/Ice/servantLocator/App.xaml b/cs/test/Ice/servantLocator/App.xaml
new file mode 100644
index 00000000000..6f55ec8d570
--- /dev/null
+++ b/cs/test/Ice/servantLocator/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="servantLocator.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/servantLocator/App.xaml.cs b/cs/test/Ice/servantLocator/App.xaml.cs
new file mode 100644
index 00000000000..857c669be48
--- /dev/null
+++ b/cs/test/Ice/servantLocator/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace servantLocator
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch(Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/servantLocator/Makefile b/cs/test/Ice/servantLocator/Makefile
index 18e3d347ba0..34ee9a8fe4a 100644
--- a/cs/test/Ice/servantLocator/Makefile
+++ b/cs/test/Ice/servantLocator/Makefile
@@ -11,9 +11,10 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe serveramd.exe collocated.exe
-C_SRCS = Client.cs AllTests.cs
+C_SRCS = Client.cs AllTests.cs ../../TestCommon/TestApp.cs
S_SRCS = Server.cs CookieI.cs ServantLocatorI.cs TestI.cs TestActivationI.cs
-COL_SRCS = Collocated.cs AllTests.cs CookieI.cs ServantLocatorI.cs TestI.cs TestActivationI.cs
+COL_SRCS = Collocated.cs AllTests.cs CookieI.cs ServantLocatorI.cs TestI.cs TestActivationI.cs \
+ ../../TestCommon/TestApp.cs
SAMD_SRCS = Server.cs CookieI.cs ServantLocatorI.cs TestAMDI.cs TestActivationI.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/servantLocator/Makefile.mak b/cs/test/Ice/servantLocator/Makefile.mak
index 29c1d876545..3fb74c6a19f 100644
--- a/cs/test/Ice/servantLocator/Makefile.mak
+++ b/cs/test/Ice/servantLocator/Makefile.mak
@@ -11,9 +11,9 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe serveramd.exe collocated.exe
-C_SRCS = Client.cs AllTests.cs
+C_SRCS = Client.cs AllTests.cs ..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs CookieI.cs ServantLocatorI.cs TestI.cs TestActivationI.cs
-COL_SRCS = Collocated.cs AllTests.cs CookieI.cs ServantLocatorI.cs TestI.cs TestActivationI.cs
+COL_SRCS = Collocated.cs AllTests.cs CookieI.cs ServantLocatorI.cs TestI.cs TestActivationI.cs ..\..\TestCommon\TestApp.cs
SAMD_SRCS = Server.cs CookieI.cs ServantLocatorI.cs TestAMDI.cs TestActivationI.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/servantLocator/Properties/AppManifest.xml b/cs/test/Ice/servantLocator/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/servantLocator/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/servantLocator/Properties/AssemblyInfo.cs b/cs/test/Ice/servantLocator/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..f7c362e38ab
--- /dev/null
+++ b/cs/test/Ice/servantLocator/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("servantLocator")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("servantLocator")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("79b1229a-4d32-47d0-b513-b8c99b869470")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/servantLocator/Properties/InBrowserSettings.xml b/cs/test/Ice/servantLocator/Properties/InBrowserSettings.xml
new file mode 100644
index 00000000000..75bbd385a4f
--- /dev/null
+++ b/cs/test/Ice/servantLocator/Properties/InBrowserSettings.xml
@@ -0,0 +1,5 @@
+<InBrowserSettings>
+ <InBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </InBrowserSettings.SecuritySettings>
+</InBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/servantLocator/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/servantLocator/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..ff978db5e02
--- /dev/null
+++ b/cs/test/Ice/servantLocator/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Servant Locator Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Servant Locator Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Servant Locator Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/servantLocator/servantLocator.csproj b/cs/test/Ice/servantLocator/servantLocator.csproj
new file mode 100644
index 00000000000..b20c90378fa
--- /dev/null
+++ b/cs/test/Ice/servantLocator/servantLocator.csproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{E2F1D989-CA09-4A83-9511-7C03FD13E5D1}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>servantLocator</RootNamespace>
+ <AssemblyName>servantLocator</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>servantLocator.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>servantLocator.App</SilverlightAppEntry>
+ <TestPageFileName>servantLocatorTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ <InBrowserSettingsFile>Properties\InBrowserSettings.xml</InBrowserSettingsFile>
+ <RequireInBrowserElevation>true</RequireInBrowserElevation>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\InBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/slicing/exceptions/AllTests.cs b/cs/test/Ice/slicing/exceptions/AllTests.cs
index a3408375818..ecb49286d00 100644
--- a/cs/test/Ice/slicing/exceptions/AllTests.cs
+++ b/cs/test/Ice/slicing/exceptions/AllTests.cs
@@ -10,18 +10,14 @@
using System;
using System.Diagnostics;
using System.Threading;
-using Test;
+using Test;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
private class Callback
{
internal Callback()
@@ -327,24 +323,37 @@ public class AllTests
private Callback callback = new Callback();
}
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.FactoryAssemblies", "exceptions,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static TestIntfPrx allTests(Ice.Communicator communicator, bool collocated)
+#endif
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+ Write("testing stringToProxy... ");
+ Flush();
String @ref = "Test:default -p 12010 -t 2000";
Ice.ObjectPrx @base = communicator.stringToProxy(@ref);
test(@base != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
TestIntfPrx testPrx = TestIntfPrxHelper.checkedCast(@base);
test(testPrx != null);
test(testPrx.Equals(@base));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base... ");
- Console.Out.Flush();
+ Write("base... ");
+ Flush();
{
try
{
@@ -361,19 +370,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base (AMI)... ");
- Console.Out.Flush();
+ Write("base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_baseAsBase().whenCompleted(cb.response, cb.exception_baseAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown derived... ");
- Console.Out.Flush();
+ Write("slicing of unknown derived... ");
+ Flush();
{
try
{
@@ -390,19 +399,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown derived (AMI)... ");
- Console.Out.Flush();
+ Write("slicing of unknown derived (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_unknownDerivedAsBase().whenCompleted(cb.response, cb.exception_unknownDerivedAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known derived as base... ");
- Console.Out.Flush();
+ Write("non-slicing of known derived as base... ");
+ Flush();
{
try
{
@@ -420,19 +429,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known derived as base (AMI)... ");
- Console.Out.Flush();
+ Write("non-slicing of known derived as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_knownDerivedAsBase().whenCompleted(cb.response, cb.exception_knownDerivedAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known derived as derived... ");
- Console.Out.Flush();
+ Write("non-slicing of known derived as derived... ");
+ Flush();
{
try
{
@@ -450,20 +459,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known derived as derived (AMI)... ");
- Console.Out.Flush();
+ Write("non-slicing of known derived as derived (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_knownDerivedAsKnownDerived().whenCompleted(
cb.response, cb.exception_knownDerivedAsKnownDerived);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown intermediate as base... ");
- Console.Out.Flush();
+ Write("slicing of unknown intermediate as base... ");
+ Flush();
{
try
{
@@ -480,20 +489,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown intermediate as base (AMI)... ");
- Console.Out.Flush();
+ Write("slicing of unknown intermediate as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_unknownIntermediateAsBase().whenCompleted(
cb.response, cb.exception_unknownIntermediateAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of known intermediate as base... ");
- Console.Out.Flush();
+ Write("slicing of known intermediate as base... ");
+ Flush();
{
try
{
@@ -511,20 +520,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of known intermediate as base (AMI)... ");
- Console.Out.Flush();
+ Write("slicing of known intermediate as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_knownIntermediateAsBase().whenCompleted(
cb.response, cb.exception_knownIntermediateAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of known most derived as base... ");
- Console.Out.Flush();
+ Write("slicing of known most derived as base... ");
+ Flush();
{
try
{
@@ -543,20 +552,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of known most derived as base (AMI)... ");
- Console.Out.Flush();
+ Write("slicing of known most derived as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_knownMostDerivedAsBase().whenCompleted(
cb.response, cb.exception_knownMostDerivedAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known intermediate as intermediate... ");
- Console.Out.Flush();
+ Write("non-slicing of known intermediate as intermediate... ");
+ Flush();
{
try
{
@@ -574,20 +583,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known intermediate as intermediate (AMI)... ");
- Console.Out.Flush();
+ Write("non-slicing of known intermediate as intermediate (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_knownIntermediateAsKnownIntermediate().whenCompleted(
cb.response, cb.exception_knownIntermediateAsKnownIntermediate);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known most derived as intermediate... ");
- Console.Out.Flush();
+ Write("non-slicing of known most derived as intermediate... ");
+ Flush();
{
try
{
@@ -606,20 +615,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known most derived as intermediate (AMI)... ");
- Console.Out.Flush();
+ Write("non-slicing of known most derived as intermediate (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_knownMostDerivedAsKnownIntermediate().whenCompleted(
cb.response, cb.exception_knownMostDerivedAsKnownIntermediate);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known most derived as most derived... ");
- Console.Out.Flush();
+ Write("non-slicing of known most derived as most derived... ");
+ Flush();
{
try
{
@@ -638,20 +647,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("non-slicing of known most derived as most derived (AMI)... ");
- Console.Out.Flush();
+ Write("non-slicing of known most derived as most derived (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_knownMostDerivedAsKnownMostDerived().whenCompleted(
cb.response, cb.exception_knownMostDerivedAsKnownMostDerived);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown most derived, known intermediate as base... ");
- Console.Out.Flush();
+ Write("slicing of unknown most derived, known intermediate as base... ");
+ Flush();
{
try
{
@@ -669,20 +678,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown most derived, known intermediate as base (AMI)... ");
- Console.Out.Flush();
+ Write("slicing of unknown most derived, known intermediate as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_unknownMostDerived1AsBase().whenCompleted(
cb.response, cb.exception_unknownMostDerived1AsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown most derived, known intermediate as intermediate... ");
- Console.Out.Flush();
+ Write("slicing of unknown most derived, known intermediate as intermediate... ");
+ Flush();
{
try
{
@@ -700,20 +709,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown most derived, known intermediate as intermediate (AMI)... ");
- Console.Out.Flush();
+ Write("slicing of unknown most derived, known intermediate as intermediate (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_unknownMostDerived1AsKnownIntermediate().whenCompleted(
cb.response, cb.exception_unknownMostDerived1AsKnownIntermediate);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown most derived, unknown intermediate thrown as base... ");
- Console.Out.Flush();
+ Write("slicing of unknown most derived, unknown intermediate thrown as base... ");
+ Flush();
{
try
{
@@ -730,18 +739,21 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("slicing of unknown most derived, unknown intermediate thrown as base (AMI)... ");
- Console.Out.Flush();
+ Write("slicing of unknown most derived, unknown intermediate thrown as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_unknownMostDerived2AsBase().whenCompleted(
cb.response, cb.exception_unknownMostDerived2AsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
-
+ WriteLine("ok");
+#if SILVERLIGHT
+ testPrx.shutdown();
+#else
return testPrx;
+#endif
}
}
diff --git a/cs/test/Ice/slicing/exceptions/App.xaml b/cs/test/Ice/slicing/exceptions/App.xaml
new file mode 100644
index 00000000000..0222c57044d
--- /dev/null
+++ b/cs/test/Ice/slicing/exceptions/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="slicingExceptions.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/slicing/exceptions/App.xaml.cs b/cs/test/Ice/slicing/exceptions/App.xaml.cs
new file mode 100644
index 00000000000..209a52aaa2a
--- /dev/null
+++ b/cs/test/Ice/slicing/exceptions/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace slicingExceptions
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/slicing/exceptions/Makefile b/cs/test/Ice/slicing/exceptions/Makefile
index fa979e581d4..37fa5b0fa6b 100644
--- a/cs/test/Ice/slicing/exceptions/Makefile
+++ b/cs/test/Ice/slicing/exceptions/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../../..
TARGETS = client.exe server.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../../TestCommon/TestApp.cs
S_SRCS = Server.cs TestI.cs
SAMD_SRCS = Server.cs TestAMDI.cs
diff --git a/cs/test/Ice/slicing/exceptions/Makefile.mak b/cs/test/Ice/slicing/exceptions/Makefile.mak
index 1cc4f24b3c2..a9d3b999ebb 100644
--- a/cs/test/Ice/slicing/exceptions/Makefile.mak
+++ b/cs/test/Ice/slicing/exceptions/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..\..
TARGETS = client.exe server.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs TestI.cs
SAMD_SRCS = Server.cs TestAMDI.cs
diff --git a/cs/test/Ice/slicing/exceptions/Properties/AppManifest.xml b/cs/test/Ice/slicing/exceptions/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/slicing/exceptions/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/slicing/exceptions/Properties/AssemblyInfo.cs b/cs/test/Ice/slicing/exceptions/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..c3a200065e3
--- /dev/null
+++ b/cs/test/Ice/slicing/exceptions/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("exceptions")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("exceptions")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a7af9caf-0691-42f1-be3c-e0701303e006")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/slicing/exceptions/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/slicing/exceptions/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..abfc76dd52f
--- /dev/null
+++ b/cs/test/Ice/slicing/exceptions/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Slicing Exceptions Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Slicing Exceptions Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Slicing Exceptions Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/slicing/exceptions/exceptions.csproj b/cs/test/Ice/slicing/exceptions/exceptions.csproj
new file mode 100644
index 00000000000..f78122897b7
--- /dev/null
+++ b/cs/test/Ice/slicing/exceptions/exceptions.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{DD327892-C079-4209-863D-855E32A4C379}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>exceptions</RootNamespace>
+ <AssemblyName>exceptions</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>exceptions.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>slicingExceptions.App</SilverlightAppEntry>
+ <TestPageFileName>slicingExceptionsTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/slicing/objects/AllTests.cs b/cs/test/Ice/slicing/objects/AllTests.cs
index 6b38a610efc..4e7b1162dc6 100644
--- a/cs/test/Ice/slicing/objects/AllTests.cs
+++ b/cs/test/Ice/slicing/objects/AllTests.cs
@@ -11,18 +11,14 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
-using Test;
+using Test;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new System.Exception();
- }
- }
-
private class Callback
{
internal Callback()
@@ -407,24 +403,37 @@ public class AllTests
private Callback callback = new Callback();
}
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.FactoryAssemblies", "objects,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static TestIntfPrx allTests(Ice.Communicator communicator, bool collocated)
+#endif
{
- Console.Out.Write("testing stringToProxy... ");
- Console.Out.Flush();
+ Write("testing stringToProxy... ");
+ Flush();
string r = "Test:default -p 12010 -t 2000";
Ice.ObjectPrx basePrx = communicator.stringToProxy(r);
test(basePrx != null);
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing checked cast... ");
- Console.Out.Flush();
+ Write("testing checked cast... ");
+ Flush();
TestIntfPrx testPrx = TestIntfPrxHelper.checkedCast(basePrx);
test(testPrx != null);
test(testPrx.Equals(basePrx));
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base as Object... ");
- Console.Out.Flush();
+ Write("base as Object... ");
+ Flush();
{
Ice.Object o;
SBase sb = null;
@@ -442,19 +451,19 @@ public class AllTests
test(sb != null);
test(sb.sb.Equals("SBase.sb"));
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base as Object (AMI)... ");
- Console.Out.Flush();
+ Write("base as Object (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_SBaseAsObject().whenCompleted(cb.response_SBaseAsObject, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base as base... ");
- Console.Out.Flush();
+ Write("base as base... ");
+ Flush();
{
SBase sb;
try
@@ -467,19 +476,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base as base (AMI)... ");
- Console.Out.Flush();
+ Write("base as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_SBaseAsSBase().whenCompleted(cb.response_SBaseAsSBase, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base with known derived as base... ");
- Console.Out.Flush();
+ Write("base with known derived as base... ");
+ Flush();
{
SBase sb;
SBSKnownDerived sbskd = null;
@@ -496,19 +505,19 @@ public class AllTests
test(sbskd != null);
test(sbskd.sbskd.Equals("SBSKnownDerived.sbskd"));
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base with known derived as base (AMI)... ");
- Console.Out.Flush();
+ Write("base with known derived as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_SBSKnownDerivedAsSBase().whenCompleted(cb.response_SBSKnownDerivedAsSBase, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base with known derived as known derived... ");
- Console.Out.Flush();
+ Write("base with known derived as known derived... ");
+ Flush();
{
SBSKnownDerived sbskd;
try
@@ -521,20 +530,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base with known derived as known derived (AMI)... ");
- Console.Out.Flush();
+ Write("base with known derived as known derived (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_SBSKnownDerivedAsSBSKnownDerived().whenCompleted(
cb.response_SBSKnownDerivedAsSBSKnownDerived, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base with unknown derived as base... ");
- Console.Out.Flush();
+ Write("base with unknown derived as base... ");
+ Flush();
{
SBase sb;
try
@@ -547,20 +556,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base with unknown derived as base (AMI)... ");
- Console.Out.Flush();
+ Write("base with unknown derived as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_SBSUnknownDerivedAsSBase().whenCompleted(
cb.response_SBSUnknownDerivedAsSBase, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("unknown with Object as Object... ");
- Console.Out.Flush();
+ Write("unknown with Object as Object... ");
+ Flush();
{
try
{
@@ -575,10 +584,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("unknown with Object as Object (AMI)... ");
- Console.Out.Flush();
+ Write("unknown with Object as Object (AMI)... ");
+ Flush();
{
try
{
@@ -592,10 +601,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("one-element cycle... ");
- Console.Out.Flush();
+ Write("one-element cycle... ");
+ Flush();
{
try
{
@@ -610,20 +619,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("one-element cycle (AMI)... ");
- Console.Out.Flush();
+ Write("one-element cycle (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_oneElementCycle().whenCompleted(
cb.response_oneElementCycle, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("two-element cycle... ");
- Console.Out.Flush();
+ Write("two-element cycle... ");
+ Flush();
{
try
{
@@ -643,20 +652,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("two-element cycle (AMI)... ");
- Console.Out.Flush();
+ Write("two-element cycle (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_twoElementCycle().whenCompleted(
cb.response_twoElementCycle, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("known derived pointer slicing as base... ");
- Console.Out.Flush();
+ Write("known derived pointer slicing as base... ");
+ Flush();
{
try
{
@@ -685,19 +694,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("known derived pointer slicing as base (AMI)... ");
- Console.Out.Flush();
+ Write("known derived pointer slicing as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_D1AsB().whenCompleted(cb.response_D1AsB, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("known derived pointer slicing as derived... ");
- Console.Out.Flush();
+ Write("known derived pointer slicing as derived... ");
+ Flush();
{
try
{
@@ -720,19 +729,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("known derived pointer slicing as derived (AMI)... ");
- Console.Out.Flush();
+ Write("known derived pointer slicing as derived (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_D1AsD1().whenCompleted(cb.response_D1AsD1, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("unknown derived pointer slicing as base... ");
- Console.Out.Flush();
+ Write("unknown derived pointer slicing as base... ");
+ Flush();
{
try
{
@@ -759,19 +768,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("unknown derived pointer slicing as base (AMI)... ");
- Console.Out.Flush();
+ Write("unknown derived pointer slicing as base (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_D2AsB().whenCompleted(cb.response_D2AsB, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("param ptr slicing with known first... ");
- Console.Out.Flush();
+ Write("param ptr slicing with known first... ");
+ Flush();
{
try
{
@@ -798,19 +807,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("param ptr slicing with known first (AMI)... ");
- Console.Out.Flush();
+ Write("param ptr slicing with known first (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_paramTest1().whenCompleted(cb.response_paramTest1, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("param ptr slicing with unknown first... ");
- Console.Out.Flush();
+ Write("param ptr slicing with unknown first... ");
+ Flush();
{
try
{
@@ -837,19 +846,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("param ptr slicing with unknown first (AMI)... ");
- Console.Out.Flush();
+ Write("param ptr slicing with unknown first (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_paramTest2().whenCompleted(cb.response_paramTest2, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("return value identity with known first... ");
- Console.Out.Flush();
+ Write("return value identity with known first... ");
+ Flush();
{
try
{
@@ -863,19 +872,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("return value identity with known first (AMI)... ");
- Console.Out.Flush();
+ Write("return value identity with known first (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_returnTest1().whenCompleted(cb.response_returnTest1, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("return value identity with unknown first... ");
- Console.Out.Flush();
+ Write("return value identity with unknown first... ");
+ Flush();
{
try
{
@@ -889,19 +898,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("return value identity with unknown first (AMI)... ");
- Console.Out.Flush();
+ Write("return value identity with unknown first (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_returnTest2().whenCompleted(cb.response_returnTest2, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("return value identity for input params known first... ");
- Console.Out.Flush();
+ Write("return value identity for input params known first... ");
+ Flush();
{
try
{
@@ -951,10 +960,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("return value identity for input params known first (AMI)... ");
- Console.Out.Flush();
+ Write("return value identity for input params known first (AMI)... ");
+ Flush();
{
D1 d1 = new D1();
d1.sb = "D1.sb";
@@ -1000,10 +1009,10 @@ public class AllTests
test(b2 != d1);
test(b2 != d3);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("return value identity for input params unknown first... ");
- Console.Out.Flush();
+ Write("return value identity for input params unknown first... ");
+ Flush();
{
try
{
@@ -1054,10 +1063,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("return value identity for input params unknown first (AMI)... ");
- Console.Out.Flush();
+ Write("return value identity for input params unknown first (AMI)... ");
+ Flush();
{
D1 d1 = new D1();
d1.sb = "D1.sb";
@@ -1104,10 +1113,10 @@ public class AllTests
test(b2 != d1);
test(b2 != d3);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("remainder unmarshaling (3 instances)... ");
- Console.Out.Flush();
+ Write("remainder unmarshaling (3 instances)... ");
+ Flush();
{
try
{
@@ -1135,19 +1144,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("remainder unmarshaling (3 instances) (AMI)... ");
- Console.Out.Flush();
+ Write("remainder unmarshaling (3 instances) (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_paramTest3().whenCompleted(cb.response_paramTest3, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("remainder unmarshaling (4 instances)... ");
- Console.Out.Flush();
+ Write("remainder unmarshaling (4 instances)... ");
+ Flush();
{
try
{
@@ -1169,19 +1178,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("remainder unmarshaling (4 instances) (AMI)... ");
- Console.Out.Flush();
+ Write("remainder unmarshaling (4 instances) (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_paramTest4().whenCompleted(cb.response_paramTest4, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("param ptr slicing, instance marshaled in unknown derived as base... ");
- Console.Out.Flush();
+ Write("param ptr slicing, instance marshaled in unknown derived as base... ");
+ Flush();
{
try
{
@@ -1211,10 +1220,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("param ptr slicing, instance marshaled in unknown derived as base (AMI)... ");
- Console.Out.Flush();
+ Write("param ptr slicing, instance marshaled in unknown derived as base (AMI)... ");
+ Flush();
{
B b1 = new B();
b1.sb = "B.sb(1)";
@@ -1240,10 +1249,10 @@ public class AllTests
test(rv.sb.Equals("D3.sb"));
test(rv.pb == rv);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("param ptr slicing, instance marshaled in unknown derived as derived... ");
- Console.Out.Flush();
+ Write("param ptr slicing, instance marshaled in unknown derived as derived... ");
+ Flush();
{
try
{
@@ -1275,10 +1284,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("param ptr slicing, instance marshaled in unknown derived as derived (AMI)... ");
- Console.Out.Flush();
+ Write("param ptr slicing, instance marshaled in unknown derived as derived (AMI)... ");
+ Flush();
{
D1 d11 = new D1();
d11.sb = "D1.sb(1)";
@@ -1307,10 +1316,10 @@ public class AllTests
test(rv.sb.Equals("D3.sb"));
test(rv.pb == rv);
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("sequence slicing... ");
- Console.Out.Flush();
+ Write("sequence slicing... ");
+ Flush();
{
try
{
@@ -1397,10 +1406,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("sequence slicing (AMI)... ");
- Console.Out.Flush();
+ Write("sequence slicing (AMI)... ");
+ Flush();
{
SS ss;
{
@@ -1482,10 +1491,10 @@ public class AllTests
test(ss2d5.ice_id().Equals("::Test::D1"));
test(ss2d6.ice_id().Equals("::Test::B"));
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("dictionary slicing... ");
- Console.Out.Flush();
+ Write("dictionary slicing... ");
+ Flush();
{
try
{
@@ -1537,10 +1546,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("dictionary slicing (AMI)... ");
- Console.Out.Flush();
+ Write("dictionary slicing (AMI)... ");
+ Flush();
{
Dictionary<int, B> bin = new Dictionary<int, B>();
Dictionary<int, B> bout;
@@ -1589,10 +1598,10 @@ public class AllTests
test(d1.pd1 == d1);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base exception thrown as base exception... ");
- Console.Out.Flush();
+ Write("base exception thrown as base exception... ");
+ Flush();
{
try
{
@@ -1612,19 +1621,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("base exception thrown as base exception (AMI)... ");
- Console.Out.Flush();
+ Write("base exception thrown as base exception (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_throwBaseAsBase().whenCompleted(cb.response, cb.exception_throwBaseAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("derived exception thrown as base exception... ");
- Console.Out.Flush();
+ Write("derived exception thrown as base exception... ");
+ Flush();
{
try
{
@@ -1650,19 +1659,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("derived exception thrown as base exception (AMI)... ");
- Console.Out.Flush();
+ Write("derived exception thrown as base exception (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_throwDerivedAsBase().whenCompleted(cb.response, cb.exception_throwDerivedAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("derived exception thrown as derived exception... ");
- Console.Out.Flush();
+ Write("derived exception thrown as derived exception... ");
+ Flush();
{
try
{
@@ -1688,19 +1697,19 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("derived exception thrown as derived exception (AMI)... ");
- Console.Out.Flush();
+ Write("derived exception thrown as derived exception (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_throwDerivedAsDerived().whenCompleted(cb.response, cb.exception_throwDerivedAsDerived);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("unknown derived exception thrown as base exception... ");
- Console.Out.Flush();
+ Write("unknown derived exception thrown as base exception... ");
+ Flush();
{
try
{
@@ -1720,20 +1729,20 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("unknown derived exception thrown as base exception (AMI)... ");
- Console.Out.Flush();
+ Write("unknown derived exception thrown as base exception (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_throwUnknownDerivedAsBase().whenCompleted(
cb.response, cb.exception_throwUnknownDerivedAsBase);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("forward-declared class... ");
- Console.Out.Flush();
+ Write("forward-declared class... ");
+ Flush();
{
try
{
@@ -1746,17 +1755,21 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("forward-declared class (AMI)... ");
- Console.Out.Flush();
+ Write("forward-declared class (AMI)... ");
+ Flush();
{
AsyncCallback cb = new AsyncCallback();
testPrx.begin_useForward().whenCompleted(cb.response_useForward, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
+#if SILVERLIGHT
+ testPrx.shutdown();
+#else
return testPrx;
+#endif
}
}
diff --git a/cs/test/Ice/slicing/objects/App.xaml b/cs/test/Ice/slicing/objects/App.xaml
new file mode 100644
index 00000000000..3a7d02c08aa
--- /dev/null
+++ b/cs/test/Ice/slicing/objects/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="slicingObjects.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/slicing/objects/App.xaml.cs b/cs/test/Ice/slicing/objects/App.xaml.cs
new file mode 100644
index 00000000000..5d71da8e79b
--- /dev/null
+++ b/cs/test/Ice/slicing/objects/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace slicingObjects
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch(Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/slicing/objects/Makefile b/cs/test/Ice/slicing/objects/Makefile
index 2c66b824820..b8c0b797a76 100644
--- a/cs/test/Ice/slicing/objects/Makefile
+++ b/cs/test/Ice/slicing/objects/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../../..
TARGETS = client.exe server.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../../TestCommon/TestApp.cs
S_SRCS = Server.cs TestI.cs
SAMD_SRCS = ServerAMD.cs TestAMDI.cs
diff --git a/cs/test/Ice/slicing/objects/Makefile.mak b/cs/test/Ice/slicing/objects/Makefile.mak
index e10ce75feba..f3aa8e7c243 100644
--- a/cs/test/Ice/slicing/objects/Makefile.mak
+++ b/cs/test/Ice/slicing/objects/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..\..
TARGETS = client.exe server.exe serveramd.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\..\TestCommon\TestApp.cs
S_SRCS = Server.cs TestI.cs
SAMD_SRCS = ServerAMD.cs TestAMDI.cs
diff --git a/cs/test/Ice/slicing/objects/Properties/AppManifest.xml b/cs/test/Ice/slicing/objects/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/slicing/objects/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/slicing/objects/Properties/AssemblyInfo.cs b/cs/test/Ice/slicing/objects/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..8cbef4d0efc
--- /dev/null
+++ b/cs/test/Ice/slicing/objects/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("objects")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("objects")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("a8682ac6-10f9-4999-9381-5f70def73c7a")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/slicing/objects/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/slicing/objects/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..093fd89df77
--- /dev/null
+++ b/cs/test/Ice/slicing/objects/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Slicing Objects Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Slicing Objects Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Slicing Objects Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/slicing/objects/objects.csproj b/cs/test/Ice/slicing/objects/objects.csproj
new file mode 100644
index 00000000000..fde8f26b4fc
--- /dev/null
+++ b/cs/test/Ice/slicing/objects/objects.csproj
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0FB1D189-5BA6-4EE0-BAAF-E9EE0AFE6D3D}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>objects</RootNamespace>
+ <AssemblyName>objects</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>objects.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>slicingObjects.App</SilverlightAppEntry>
+ <TestPageFileName>slicingObjectsTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="ClientPrivate.cs" />
+ <Compile Include="Forward.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="ClientPrivate.ice" />
+ <None Include="Forward.ice" />
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_IncludePath="." ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/stream/AllTests.cs b/cs/test/Ice/stream/AllTests.cs
new file mode 100644
index 00000000000..4ef1aa7af85
--- /dev/null
+++ b/cs/test/Ice/stream/AllTests.cs
@@ -0,0 +1,1433 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using Test;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
+
+public class AllTests : TestCommon.TestApp
+{
+ //
+ // There does not appear to be any way to compare collections
+ // in either C# or with the .NET framework. Something like
+ // C++ STL EqualRange would be nice...
+ //
+ private static bool Compare(ICollection c1, ICollection c2)
+ {
+ if (c1 == null)
+ {
+ return c2 == null;
+ }
+ if (c2 == null)
+ {
+ return false;
+ }
+ if (!c1.GetType().Equals(c2.GetType()))
+ {
+ return false;
+ }
+
+ if (c1.Count != c2.Count)
+ {
+ return false;
+ }
+
+ IEnumerator i1 = c1.GetEnumerator();
+ IEnumerator i2 = c2.GetEnumerator();
+ while (i1.MoveNext())
+ {
+ i2.MoveNext();
+ if (i1.Current is ICollection)
+ {
+ Debug.Assert(i2.Current is ICollection);
+ if (!Compare((ICollection)i1.Current, (ICollection)i2.Current))
+ {
+ return false;
+ }
+ }
+ else if (!i1.Current.Equals(i2.Current))
+ {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ private class TestObjectWriter : Ice.ObjectWriter
+ {
+ public TestObjectWriter(Test.MyClass obj)
+ {
+ this.obj = obj;
+ }
+
+ public override void write(Ice.OutputStream @out)
+ {
+ obj.write__(@out);
+ called = true;
+ }
+
+ internal Test.MyClass obj;
+ internal bool called = false;
+ }
+
+ private class TestObjectReader : Ice.ObjectReader
+ {
+ public override void read(Ice.InputStream @in, bool rid)
+ {
+ obj = new Test.MyClass();
+ obj.read__(@in, rid);
+ called = true;
+ }
+
+ internal Test.MyClass obj;
+ internal bool called = false;
+ }
+
+ private class MyInterfaceI : Test.MyInterfaceDisp_
+ {
+ }
+
+ private class MyInterfaceFactory : Ice.ObjectFactory
+ {
+ public Ice.Object create(string type)
+ {
+ Debug.Assert(type.Equals(Test.MyInterfaceDisp_.ice_staticId()));
+ return new MyInterfaceI();
+ }
+
+ public void destroy()
+ {
+ }
+ }
+
+ private class TestObjectFactory : Ice.ObjectFactory
+ {
+ public Ice.Object create(string type)
+ {
+ Debug.Assert(type.Equals(Test.MyClass.ice_staticId()));
+ return new TestObjectReader();
+ }
+
+ public void destroy()
+ {
+ }
+ }
+
+ private class TestReadObjectCallback : Ice.ReadObjectCallback
+ {
+ public void invoke(Ice.Object obj)
+ {
+ this.obj = obj;
+ }
+
+ internal Ice.Object obj;
+ }
+
+ public class MyClassFactoryWrapper : Ice.ObjectFactory
+ {
+ public MyClassFactoryWrapper()
+ {
+ _factory = null;
+ }
+
+ public Ice.Object create(string type)
+ {
+ if (_factory != null)
+ {
+ return _factory.create(type);
+ }
+ return new Test.MyClass();
+ }
+
+ public void destroy()
+ {
+ }
+
+ public void setFactory(Ice.ObjectFactory factory)
+ {
+ _factory = factory;
+ }
+
+ private Ice.ObjectFactory _factory;
+ }
+
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ initData.properties.setProperty("Ice.FactoryAssemblies", "stream,version=1.0.0.0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
+ static public int run(Ice.Communicator communicator)
+#endif
+ {
+ MyClassFactoryWrapper factoryWrapper = new MyClassFactoryWrapper();
+ communicator.addObjectFactory(factoryWrapper, Test.MyClass.ice_staticId());
+ communicator.addObjectFactory(new MyInterfaceFactory(), Test.MyInterfaceDisp_.ice_staticId());
+
+ Ice.InputStream @in;
+ Ice.OutputStream @out;
+
+ Write("testing primitive types... ");
+ Flush();
+
+ {
+ byte[] data = new byte[0];
+ @in = Ice.Util.createInputStream(communicator, data);
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.startEncapsulation();
+ @out.writeBool(true);
+ @out.endEncapsulation();
+ byte[] data = @out.finished();
+ @out.destroy();
+
+ @in = Ice.Util.createInputStream(communicator, data);
+ @in.startEncapsulation();
+ test(@in.readBool());
+ @in.endEncapsulation();
+ @in.destroy();
+ }
+
+ {
+ byte[] data = new byte[0];
+ @in = Ice.Util.createInputStream(communicator, data);
+ try
+ {
+ @in.readBool();
+ test(false);
+ }
+ catch (Ice.UnmarshalOutOfBoundsException)
+ {
+ }
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeBool(true);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(@in.readBool());
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeByte((byte)1);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(@in.readByte() == (byte)1);
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeShort((short)2);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(@in.readShort() == (short)2);
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeInt(3);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(@in.readInt() == 3);
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeLong(4);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(@in.readLong() == 4);
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeFloat((float)5.0);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(@in.readFloat() == (float)5.0);
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeDouble(6.0);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(@in.readDouble() == 6.0);
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeString("hello world");
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(@in.readString().Equals("hello world"));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ WriteLine("ok");
+
+ Write("testing constructed types... ");
+ Flush();
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyEnumHelper.write(@out, Test.MyEnum.enum3);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ test(Test.MyEnumHelper.read(@in) == Test.MyEnum.enum3);
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.SmallStruct s = new Test.SmallStruct();
+ s.bo = true;
+ s.by = (byte)1;
+ s.sh = (short)2;
+ s.i = 3;
+ s.l = 4;
+ s.f = (float)5.0;
+ s.d = 6.0;
+ s.str = "7";
+ s.e = Test.MyEnum.enum2;
+ s.p = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("test:default"));
+ s.ice_write(@out);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.SmallStruct s2 = new Test.SmallStruct();
+ s2.ice_read(@in);
+ test(s2.Equals(s));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ bool[] arr =
+ {
+ true,
+ false,
+ true,
+ false
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Ice.BoolSeqHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ bool[] arr2 = Ice.BoolSeqHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ bool[][] arrS =
+ {
+ arr,
+ new bool[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.BoolSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ bool[][] arr2S = Test.BoolSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ byte[] arr =
+ {
+ (byte)0x01,
+ (byte)0x11,
+ (byte)0x12,
+ (byte)0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Ice.ByteSeqHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ byte[] arr2 = Ice.ByteSeqHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ byte[][] arrS =
+ {
+ arr,
+ new byte[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.ByteSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ byte[][] arr2S = Test.ByteSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+#if !COMPACT && !SILVERLIGHT
+ {
+ Serialize.Small small = new Serialize.Small();
+ small.i = 99;
+ @out = Ice.Util.createOutputStream(communicator);
+ @out.writeSerializable(small);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Serialize.Small small2 = (Serialize.Small)@in.readSerializable();
+ test(small2.i == 99);
+ @out.destroy();
+ @in.destroy();
+ }
+#endif
+
+ {
+ short[] arr =
+ {
+ (short)0x01,
+ (short)0x11,
+ (short)0x12,
+ (short)0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Ice.ShortSeqHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ short[] arr2 = Ice.ShortSeqHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ short[][] arrS =
+ {
+ arr,
+ new short[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.ShortSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ short[][] arr2S = Test.ShortSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ int[] arr =
+ {
+ 0x01,
+ 0x11,
+ 0x12,
+ 0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Ice.IntSeqHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ int[] arr2 = Ice.IntSeqHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ int[][] arrS =
+ {
+ arr,
+ new int[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.IntSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ int[][] arr2S = Test.IntSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ long[] arr =
+ {
+ 0x01,
+ 0x11,
+ 0x12,
+ 0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Ice.LongSeqHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ long[] arr2 = Ice.LongSeqHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ long[][] arrS =
+ {
+ arr,
+ new long[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.LongSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ long[][] arr2S = Test.LongSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ float[] arr =
+ {
+ (float)1,
+ (float)2,
+ (float)3,
+ (float)4
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Ice.FloatSeqHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ float[] arr2 = Ice.FloatSeqHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ float[][] arrS =
+ {
+ arr,
+ new float[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.FloatSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ float[][] arr2S = Test.FloatSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ double[] arr =
+ {
+ (double)1,
+ (double)2,
+ (double)3,
+ (double)4
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Ice.DoubleSeqHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ double[] arr2 = Ice.DoubleSeqHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ double[][] arrS =
+ {
+ arr,
+ new double[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.DoubleSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ double[][] arr2S = Test.DoubleSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ string[] arr =
+ {
+ "string1",
+ "string2",
+ "string3",
+ "string4"
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Ice.StringSeqHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ string[] arr2 = Ice.StringSeqHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ string[][] arrS =
+ {
+ arr,
+ new string[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.StringSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ string[][] arr2S = Test.StringSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ Test.MyEnum[] arr =
+ {
+ Test.MyEnum.enum3,
+ Test.MyEnum.enum2,
+ Test.MyEnum.enum1,
+ Test.MyEnum.enum2
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyEnumSHelper.write(@out, arr);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.MyEnum[] arr2 = Test.MyEnumSHelper.read(@in);
+ test(Compare(arr2, arr));
+ @out.destroy();
+ @in.destroy();
+
+ Test.MyEnum[][] arrS =
+ {
+ arr,
+ new Test.MyEnum[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyEnumSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.MyEnum[][] arr2S = Test.MyEnumSSHelper.read(@in);
+ test(Compare(arr2S, arrS));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ Test.SmallStruct[] smallStructArray = new Test.SmallStruct[3];
+ for (int i = 0; i < smallStructArray.Length; ++i)
+ {
+ smallStructArray[i] = new Test.SmallStruct();
+ smallStructArray[i].bo = true;
+ smallStructArray[i].by = (byte)1;
+ smallStructArray[i].sh = (short)2;
+ smallStructArray[i].i = 3;
+ smallStructArray[i].l = 4;
+ smallStructArray[i].f = (float)5.0;
+ smallStructArray[i].d = 6.0;
+ smallStructArray[i].str = "7";
+ smallStructArray[i].e = Test.MyEnum.enum2;
+ smallStructArray[i].p = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("test:default"));
+ }
+
+ Test.MyClass[] myClassArray = new Test.MyClass[4];
+ for (int i = 0; i < myClassArray.Length; ++i)
+ {
+ myClassArray[i] = new Test.MyClass();
+ myClassArray[i].c = myClassArray[i];
+ myClassArray[i].o = myClassArray[i];
+ myClassArray[i].s = new Test.SmallStruct();
+ myClassArray[i].s.e = Test.MyEnum.enum2;
+ myClassArray[i].seq1 = new bool[] { true, false, true, false };
+ myClassArray[i].seq2 = new byte[] { (byte)1, (byte)2, (byte)3, (byte)4 };
+ myClassArray[i].seq3 = new short[] { (short)1, (short)2, (short)3, (short)4 };
+ myClassArray[i].seq4 = new int[] { 1, 2, 3, 4 };
+ myClassArray[i].seq5 = new long[] { 1, 2, 3, 4 };
+ myClassArray[i].seq6 = new float[] { (float)1, (float)2, (float)3, (float)4 };
+ myClassArray[i].seq7 = new double[] { (double)1, (double)2, (double)3, (double)4 };
+ myClassArray[i].seq8 = new string[] { "string1", "string2", "string3", "string4" };
+ myClassArray[i].seq9 = new Test.MyEnum[] { Test.MyEnum.enum3, Test.MyEnum.enum2, Test.MyEnum.enum1 };
+ myClassArray[i].seq10 = new Test.MyClass[4]; // null elements.
+ myClassArray[i].d = new System.Collections.Generic.Dictionary<string, Test.MyClass>();
+ myClassArray[i].d["hi"] = myClassArray[i];
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyClassSHelper.write(@out, myClassArray);
+ @out.writePendingObjects();
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.MyClass[] arr2 = Test.MyClassSHelper.read(@in);
+ @in.readPendingObjects();
+ test(arr2.Length == myClassArray.Length);
+ for (int i = 0; i < arr2.Length; ++i)
+ {
+ test(arr2[i] != null);
+ test(arr2[i].c == arr2[i]);
+ test(arr2[i].o == arr2[i]);
+ test(arr2[i].s.e == Test.MyEnum.enum2);
+ test(Compare(arr2[i].seq1, myClassArray[i].seq1));
+ test(Compare(arr2[i].seq2, myClassArray[i].seq2));
+ test(Compare(arr2[i].seq3, myClassArray[i].seq3));
+ test(Compare(arr2[i].seq4, myClassArray[i].seq4));
+ test(Compare(arr2[i].seq5, myClassArray[i].seq5));
+ test(Compare(arr2[i].seq6, myClassArray[i].seq6));
+ test(Compare(arr2[i].seq7, myClassArray[i].seq7));
+ test(Compare(arr2[i].seq8, myClassArray[i].seq8));
+ test(Compare(arr2[i].seq9, myClassArray[i].seq9));
+ test(arr2[i].d["hi"].Equals(arr2[i]));
+ }
+ @out.destroy();
+ @in.destroy();
+
+ Test.MyClass[][] arrS =
+ {
+ myClassArray,
+ new Test.MyClass[0],
+ myClassArray
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyClassSSHelper.write(@out, arrS);
+ data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.MyClass[][] arr2S = Test.MyClassSSHelper.read(@in);
+ test(arr2S.Length == arrS.Length);
+ test(arr2S[0].Length == arrS[0].Length);
+ test(arr2S[1].Length == arrS[1].Length);
+ test(arr2S[2].Length == arrS[2].Length);
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ Test.MyInterface i = new MyInterfaceI();
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyInterfaceHelper.write(@out, i);
+ @out.writePendingObjects();
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.MyInterfaceHelper helper = new Test.MyInterfaceHelper(@in);
+ helper.read();
+ @in.readPendingObjects();
+ test(helper.value != null);
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyClass obj = new Test.MyClass();
+ obj.s = new Test.SmallStruct();
+ obj.s.e = Test.MyEnum.enum2;
+ TestObjectWriter writer = new TestObjectWriter(obj);
+ @out.writeObject(writer);
+ @out.writePendingObjects();
+ byte[] data = @out.finished();
+ test(writer.called);
+ factoryWrapper.setFactory(new TestObjectFactory());
+ @in = Ice.Util.createInputStream(communicator, data);
+ TestReadObjectCallback cb = new TestReadObjectCallback();
+ @in.readObject(cb);
+ @in.readPendingObjects();
+ test(cb.obj != null);
+ test(cb.obj is TestObjectReader);
+ TestObjectReader reader = (TestObjectReader)cb.obj;
+ test(reader.called);
+ test(reader.obj != null);
+ test(reader.obj.s.e == Test.MyEnum.enum2);
+ @out.destroy();
+ @in.destroy();
+ factoryWrapper.setFactory(null);
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyException ex = new Test.MyException();
+
+ Test.MyClass c = new Test.MyClass();
+ c.c = c;
+ c.o = c;
+ c.s = new Test.SmallStruct();
+ c.s.e = Test.MyEnum.enum2;
+ c.seq1 = new bool[] { true, false, true, false };
+ c.seq2 = new byte[] { (byte)1, (byte)2, (byte)3, (byte)4 };
+ c.seq3 = new short[] { (short)1, (short)2, (short)3, (short)4 };
+ c.seq4 = new int[] { 1, 2, 3, 4 };
+ c.seq5 = new long[] { 1, 2, 3, 4 };
+ c.seq6 = new float[] { (float)1, (float)2, (float)3, (float)4 };
+ c.seq7 = new double[] { (double)1, (double)2, (double)3, (double)4 };
+ c.seq8 = new string[] { "string1", "string2", "string3", "string4" };
+ c.seq9 = new Test.MyEnum[] { Test.MyEnum.enum3, Test.MyEnum.enum2, Test.MyEnum.enum1 };
+ c.seq10 = new Test.MyClass[4]; // null elements.
+ c.d = new Dictionary<string, Test.MyClass>();
+ c.d.Add("hi", c);
+
+ ex.c = c;
+
+ @out.writeException(ex);
+ byte[] data = @out.finished();
+
+ @in = Ice.Util.createInputStream(communicator, data);
+ try
+ {
+ @in.throwException();
+ test(false);
+ }
+ catch (Test.MyException ex1)
+ {
+ test(ex1.c.s.e == c.s.e);
+ test(Compare(ex1.c.seq1, c.seq1));
+ test(Compare(ex1.c.seq2, c.seq2));
+ test(Compare(ex1.c.seq3, c.seq3));
+ test(Compare(ex1.c.seq4, c.seq4));
+ test(Compare(ex1.c.seq5, c.seq5));
+ test(Compare(ex1.c.seq6, c.seq6));
+ test(Compare(ex1.c.seq7, c.seq7));
+ test(Compare(ex1.c.seq8, c.seq8));
+ test(Compare(ex1.c.seq9, c.seq9));
+ }
+ catch (Ice.UserException)
+ {
+ test(false);
+ }
+ }
+
+ {
+ Dictionary<byte, bool> dict = new Dictionary<byte, bool>();
+ dict.Add((byte)4, true);
+ dict.Add((byte)1, false);
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.ByteBoolDHelper.write(@out, dict);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Dictionary<byte, bool> dict2 = Test.ByteBoolDHelper.read(@in);
+ test(Ice.CollectionComparer.Equals(dict2, dict));
+ }
+
+ {
+ Dictionary<short, int> dict = new Dictionary<short, int>();
+ dict.Add((short)1, 9);
+ dict.Add((short)4, 8);
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.ShortIntDHelper.write(@out, dict);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Dictionary<short, int> dict2 = Test.ShortIntDHelper.read(@in);
+ test(Ice.CollectionComparer.Equals(dict2, dict));
+ }
+
+ {
+ Dictionary<long, float> dict = new Dictionary<long, float>();
+ dict.Add((long)123809828, (float)0.51f);
+ dict.Add((long)123809829, (float)0.56f);
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.LongFloatDHelper.write(@out, dict);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Dictionary<long, float> dict2 = Test.LongFloatDHelper.read(@in);
+ test(Ice.CollectionComparer.Equals(dict2, dict));
+ }
+
+ {
+ Dictionary<string, string> dict = new Dictionary<string, string>();
+ dict.Add("key1", "value1");
+ dict.Add("key2", "value2");
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.StringStringDHelper.write(@out, dict);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Dictionary<string, string> dict2 = Test.StringStringDHelper.read(@in);
+ test(Ice.CollectionComparer.Equals(dict2, dict));
+ }
+
+ {
+ Dictionary<string, Test.MyClass> dict = new Dictionary<string, Test.MyClass>();
+ Test.MyClass c;
+ c = new Test.MyClass();
+ c.s = new Test.SmallStruct();
+ c.s.e = Test.MyEnum.enum2;
+ dict.Add("key1", c);
+ c = new Test.MyClass();
+ c.s = new Test.SmallStruct();
+ c.s.e = Test.MyEnum.enum3;
+ dict.Add("key2", c);
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.StringMyClassDHelper.write(@out, dict);
+ @out.writePendingObjects();
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Dictionary<string, Test.MyClass> dict2 = Test.StringMyClassDHelper.read(@in);
+ @in.readPendingObjects();
+ test(dict2.Count == dict.Count);
+ test(dict2["key1"].s.e == Test.MyEnum.enum2);
+ test(dict2["key2"].s.e == Test.MyEnum.enum3);
+ }
+
+ {
+ bool[] arr =
+ {
+ true,
+ false,
+ true,
+ false
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ List<bool> l = new List<bool>(arr);
+ Test.BoolListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ List<bool> l2 = Test.BoolListHelper.read(@in);
+ test(Compare(l, l2));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ byte[] arr =
+ {
+ (byte)0x01,
+ (byte)0x11,
+ (byte)0x12,
+ (byte)0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ List<byte> l = new List<byte>(arr);
+ Test.ByteListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ List<byte> l2 = Test.ByteListHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ Test.MyEnum[] arr =
+ {
+ Test.MyEnum.enum3,
+ Test.MyEnum.enum2,
+ Test.MyEnum.enum1,
+ Test.MyEnum.enum2
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ List<Test.MyEnum> l = new List<Test.MyEnum>(arr);
+ Test.MyEnumListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ List<Test.MyEnum> l2 = Test.MyEnumListHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ List<Test.SmallStruct> l = new List<Test.SmallStruct>(smallStructArray);
+ Test.SmallStructListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ List<Test.SmallStruct> l2 = Test.SmallStructListHelper.read(@in);
+ test(l2.Count == l.Count);
+ for (int i = 0; i < l2.Count; ++i)
+ {
+ test(l2[i].Equals(smallStructArray[i]));
+ }
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ List<Test.MyClass> l = new List<Test.MyClass>(myClassArray);
+ Test.MyClassListHelper.write(@out, l);
+ @out.writePendingObjects();
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ List<Test.MyClass> l2 = Test.MyClassListHelper.read(@in);
+ @in.readPendingObjects();
+ test(l2.Count == l.Count);
+ for (int i = 0; i < l2.Count; ++i)
+ {
+ test(l2[i] != null);
+ test(l2[i].c == l2[i]);
+ test(l2[i].o == l2[i]);
+ test(l2[i].s.e == Test.MyEnum.enum2);
+ test(Compare(l2[i].seq1, l[i].seq1));
+ test(Compare(l2[i].seq2, l[i].seq2));
+ test(Compare(l2[i].seq3, l[i].seq3));
+ test(Compare(l2[i].seq4, l[i].seq4));
+ test(Compare(l2[i].seq5, l[i].seq5));
+ test(Compare(l2[i].seq6, l[i].seq6));
+ test(Compare(l2[i].seq7, l[i].seq7));
+ test(Compare(l2[i].seq8, l[i].seq8));
+ test(Compare(l2[i].seq9, l[i].seq9));
+ test(l2[i].d["hi"].Equals(l2[i]));
+ }
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ Test.MyClassPrx[] arr = new Test.MyClassPrx[2];
+ arr[0] = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("zero"));
+ arr[1] = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("one"));
+ @out = Ice.Util.createOutputStream(communicator);
+ List<Test.MyClassPrx> l = new List<Test.MyClassPrx>(arr);
+ Test.MyClassProxyListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ List<Test.MyClassPrx> l2 = Test.MyClassProxyListHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ short[] arr =
+ {
+ (short)0x01,
+ (short)0x11,
+ (short)0x12,
+ (short)0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ LinkedList<short> l = new LinkedList<short>(arr);
+ Test.ShortLinkedListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ LinkedList<short> l2 = Test.ShortLinkedListHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ int[] arr =
+ {
+ 0x01,
+ 0x11,
+ 0x12,
+ 0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ LinkedList<int> l = new LinkedList<int>(arr);
+ Test.IntLinkedListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ LinkedList<int> l2 = Test.IntLinkedListHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ Test.MyEnum[] arr =
+ {
+ Test.MyEnum.enum3,
+ Test.MyEnum.enum2,
+ Test.MyEnum.enum1,
+ Test.MyEnum.enum2
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ LinkedList<Test.MyEnum> l = new LinkedList<Test.MyEnum>(arr);
+ Test.MyEnumLinkedListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ LinkedList<Test.MyEnum> l2 = Test.MyEnumLinkedListHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ LinkedList<Test.SmallStruct> l = new LinkedList<Test.SmallStruct>(smallStructArray);
+ Test.SmallStructLinkedListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ LinkedList<Test.SmallStruct> l2 = Test.SmallStructLinkedListHelper.read(@in);
+ test(l2.Count == l.Count);
+ IEnumerator<Test.SmallStruct> e = l.GetEnumerator();
+ IEnumerator<Test.SmallStruct> e2 = l2.GetEnumerator();
+ while (e.MoveNext() && e2.MoveNext())
+ {
+ test(e.Current.Equals(e2.Current));
+ }
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ long[] arr =
+ {
+ 0x01,
+ 0x11,
+ 0x12,
+ 0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Stack<long> l = new Stack<long>(arr);
+ Test.LongStackHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Stack<long> l2 = Test.LongStackHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ float[] arr =
+ {
+ (float)1,
+ (float)2,
+ (float)3,
+ (float)4
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Stack<float> l = new Stack<float>(arr);
+ Test.FloatStackHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Stack<float> l2 = Test.FloatStackHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Stack<Test.SmallStruct> l = new Stack<Test.SmallStruct>(smallStructArray);
+ Test.SmallStructStackHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Stack<Test.SmallStruct> l2 = Test.SmallStructStackHelper.read(@in);
+ test(l2.Count == l.Count);
+ IEnumerator<Test.SmallStruct> e = l.GetEnumerator();
+ IEnumerator<Test.SmallStruct> e2 = l2.GetEnumerator();
+ while (e.MoveNext() && e2.MoveNext())
+ {
+ test(e.Current.Equals(e2.Current));
+ }
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ Test.MyClassPrx[] arr = new Test.MyClassPrx[2];
+ arr[0] = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("zero"));
+ arr[1] = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("one"));
+ @out = Ice.Util.createOutputStream(communicator);
+ Stack<Test.MyClassPrx> l = new Stack<Test.MyClassPrx>(arr);
+ Test.MyClassProxyStackHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Stack<Test.MyClassPrx> l2 = Test.MyClassProxyStackHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ double[] arr =
+ {
+ (double)1,
+ (double)2,
+ (double)3,
+ (double)4
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Queue<double> l = new Queue<double>(arr);
+ Test.DoubleQueueHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Queue<double> l2 = Test.DoubleQueueHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ string[] arr =
+ {
+ "string1",
+ "string2",
+ "string3",
+ "string4"
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Queue<string> l = new Queue<string>(arr);
+ Test.StringQueueHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Queue<string> l2 = Test.StringQueueHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Queue<Test.SmallStruct> l = new Queue<Test.SmallStruct>(smallStructArray);
+ Test.SmallStructQueueHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Queue<Test.SmallStruct> l2 = Test.SmallStructQueueHelper.read(@in);
+ test(l2.Count == l.Count);
+ IEnumerator<Test.SmallStruct> e = l.GetEnumerator();
+ IEnumerator<Test.SmallStruct> e2 = l2.GetEnumerator();
+ while (e.MoveNext() && e2.MoveNext())
+ {
+ test(e.Current.Equals(e2.Current));
+ }
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ bool[] arr =
+ {
+ true,
+ false,
+ true,
+ false
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.BoolCollection l = new Test.BoolCollection(arr);
+ Test.BoolCollectionHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.BoolCollection l2 = Test.BoolCollectionHelper.read(@in);
+ test(Compare(l, l2));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ int[] arr =
+ {
+ 0x01,
+ 0x11,
+ 0x12,
+ 0x22
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.IntCollection l = new Test.IntCollection(arr);
+ Test.IntCollectionHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.IntCollection l2 = Test.IntCollectionHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ string[] arr =
+ {
+ "string1",
+ "string2",
+ "string3",
+ "string4"
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.StringCollection l = new Test.StringCollection(arr);
+ Test.StringCollectionHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.StringCollection l2 = Test.StringCollectionHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ Test.MyEnum[] arr =
+ {
+ Test.MyEnum.enum3,
+ Test.MyEnum.enum2,
+ Test.MyEnum.enum1,
+ Test.MyEnum.enum2
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyEnumCollection l = new Test.MyEnumCollection(arr);
+ Test.MyEnumCollectionHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.MyEnumCollection l2 = Test.MyEnumCollectionHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.SmallStructCollection l = new Test.SmallStructCollection(smallStructArray);
+ Test.SmallStructCollectionHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.SmallStructCollection l2 = Test.SmallStructCollectionHelper.read(@in);
+ test(l2.Count == l.Count);
+ IEnumerator<Test.SmallStruct> e = l.GetEnumerator();
+ IEnumerator<Test.SmallStruct> e2 = l2.GetEnumerator();
+ while (e.MoveNext() && e2.MoveNext())
+ {
+ test(e.Current.Equals(e2.Current));
+ }
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.MyClassCollection l = new Test.MyClassCollection(myClassArray);
+ Test.MyClassCollectionHelper.write(@out, l);
+ @out.writePendingObjects();
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.MyClassCollection l2 = Test.MyClassCollectionHelper.read(@in);
+ @in.readPendingObjects();
+ test(l2.Count == l.Count);
+ for (int i = 0; i < l2.Count; ++i)
+ {
+ test(l2[i] != null);
+ test(l2[i].c == l2[i]);
+ test(l2[i].o == l2[i]);
+ test(l2[i].s.e == Test.MyEnum.enum2);
+ test(Compare(l2[i].seq1, l[i].seq1));
+ test(Compare(l2[i].seq2, l[i].seq2));
+ test(Compare(l2[i].seq3, l[i].seq3));
+ test(Compare(l2[i].seq4, l[i].seq4));
+ test(Compare(l2[i].seq5, l[i].seq5));
+ test(Compare(l2[i].seq6, l[i].seq6));
+ test(Compare(l2[i].seq7, l[i].seq7));
+ test(Compare(l2[i].seq8, l[i].seq8));
+ test(Compare(l2[i].seq9, l[i].seq9));
+ test(l2[i].d["hi"].Equals(l2[i]));
+ }
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ string[] arr =
+ {
+ "string1",
+ "string2",
+ "string3",
+ "string4"
+ };
+ string[][] arrS =
+ {
+ arr,
+ new string[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ List<string[]> l = new List<string[]>(arrS);
+ Test.StringSListHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ List<string[]> l2 = Test.StringSListHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+
+ {
+ string[] arr =
+ {
+ "string1",
+ "string2",
+ "string3",
+ "string4"
+ };
+ string[][] arrS =
+ {
+ arr,
+ new string[0],
+ arr
+ };
+ @out = Ice.Util.createOutputStream(communicator);
+ Stack<string[]> l = new Stack<string[]>(arrS);
+ Test.StringSStackHelper.write(@out, l);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Stack<string[]> l2 = Test.StringSStackHelper.read(@in);
+ test(Compare(l2, l));
+ @out.destroy();
+ @in.destroy();
+ }
+#if !SILVERLIGHT
+ {
+#if COMPACT
+ SortedList<string, string> dict = new SortedList<string, string>();
+#else
+ SortedDictionary<string, string> dict = new SortedDictionary<string, string>();
+#endif
+ dict.Add("key1", "value1");
+ dict.Add("key2", "value2");
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.SortedStringStringDHelper.write(@out, dict);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ IDictionary<string, string> dict2 = Test.SortedStringStringDHelper.read(@in);
+ test(Ice.CollectionComparer.Equals(dict2, dict));
+ }
+
+ {
+ Test.StringIntDCollection dict = new Test.StringIntDCollection();
+ dict.Add("key1", 1);
+ dict.Add("key2", 2);
+ @out = Ice.Util.createOutputStream(communicator);
+ Test.StringIntDCollectionHelper.write(@out, dict);
+ byte[] data = @out.finished();
+ @in = Ice.Util.createInputStream(communicator, data);
+ Test.StringIntDCollection dict2 = Test.StringIntDCollectionHelper.read(@in);
+ test(Ice.CollectionComparer.Equals(dict2, dict));
+ }
+#endif
+ WriteLine("ok");
+#if !SILVERLIGHT
+ return 0;
+#endif
+ }
+}
diff --git a/cs/test/Ice/stream/App.xaml b/cs/test/Ice/stream/App.xaml
new file mode 100644
index 00000000000..ad9341c5046
--- /dev/null
+++ b/cs/test/Ice/stream/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="stream.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/stream/App.xaml.cs b/cs/test/Ice/stream/App.xaml.cs
new file mode 100644
index 00000000000..26c753f47df
--- /dev/null
+++ b/cs/test/Ice/stream/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace stream
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if (!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch (Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/stream/Client.cs b/cs/test/Ice/stream/Client.cs
index 1a3383191cc..1696e62af47 100644
--- a/cs/test/Ice/stream/Client.cs
+++ b/cs/test/Ice/stream/Client.cs
@@ -21,1412 +21,6 @@ using System.Collections.Generic;
public class Client
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new Exception();
- }
- }
-
- //
- // There does not appear to be any way to compare collections
- // in either C# or with the .NET framework. Something like
- // C++ STL EqualRange would be nice...
- //
- private static bool Compare(ICollection c1, ICollection c2)
- {
- if(c1 == null)
- {
- return c2 == null;
- }
- if(c2 == null)
- {
- return false;
- }
- if(!c1.GetType().Equals(c2.GetType()))
- {
- return false;
- }
-
- if(c1.Count != c2.Count)
- {
- return false;
- }
-
- IEnumerator i1 = c1.GetEnumerator();
- IEnumerator i2 = c2.GetEnumerator();
- while(i1.MoveNext())
- {
- i2.MoveNext();
- if(i1.Current is ICollection)
- {
- Debug.Assert(i2.Current is ICollection);
- if(!Compare((ICollection)i1.Current, (ICollection)i2.Current))
- {
- return false;
- }
- }
- else if(!i1.Current.Equals(i2.Current))
- {
- return false;
- }
- }
- return true;
- }
-
- private class TestObjectWriter : Ice.ObjectWriter
- {
- public TestObjectWriter(Test.MyClass obj)
- {
- this.obj = obj;
- }
-
- public override void write(Ice.OutputStream @out)
- {
- obj.write__(@out);
- called = true;
- }
-
- internal Test.MyClass obj;
- internal bool called = false;
- }
-
- private class TestObjectReader : Ice.ObjectReader
- {
- public override void read(Ice.InputStream @in, bool rid)
- {
- obj = new Test.MyClass();
- obj.read__(@in, rid);
- called = true;
- }
-
- internal Test.MyClass obj;
- internal bool called = false;
- }
-
- private class MyInterfaceI : Test.MyInterfaceDisp_
- {
- }
-
- private class MyInterfaceFactory : Ice.ObjectFactory
- {
- public Ice.Object create(string type)
- {
- Debug.Assert(type.Equals(Test.MyInterfaceDisp_.ice_staticId()));
- return new MyInterfaceI();
- }
-
- public void destroy()
- {
- }
- }
-
- private class TestObjectFactory : Ice.ObjectFactory
- {
- public Ice.Object create(string type)
- {
- Debug.Assert(type.Equals(Test.MyClass.ice_staticId()));
- return new TestObjectReader();
- }
-
- public void destroy()
- {
- }
- }
-
- private class TestReadObjectCallback : Ice.ReadObjectCallback
- {
- public void invoke(Ice.Object obj)
- {
- this.obj = obj;
- }
-
- internal Ice.Object obj;
- }
-
- public class MyClassFactoryWrapper : Ice.ObjectFactory
- {
- public MyClassFactoryWrapper()
- {
- _factory = null;
- }
-
- public Ice.Object create(string type)
- {
- if(_factory != null)
- {
- return _factory.create(type);
- }
- return new Test.MyClass();
- }
-
- public void destroy()
- {
- }
-
- public void setFactory(Ice.ObjectFactory factory)
- {
- _factory = factory;
- }
-
- private Ice.ObjectFactory _factory;
- }
-
- private static int run(string[] args, Ice.Communicator communicator)
- {
- MyClassFactoryWrapper factoryWrapper = new MyClassFactoryWrapper();
- communicator.addObjectFactory(factoryWrapper, Test.MyClass.ice_staticId());
- communicator.addObjectFactory(new MyInterfaceFactory(), Test.MyInterfaceDisp_.ice_staticId());
-
- Ice.InputStream @in;
- Ice.OutputStream @out;
-
- Console.Write("testing primitive types... ");
- Console.Out.Flush();
-
- {
- byte[] data = new byte[0];
- @in = Ice.Util.createInputStream(communicator, data);
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.startEncapsulation();
- @out.writeBool(true);
- @out.endEncapsulation();
- byte[] data = @out.finished();
- @out.destroy();
-
- @in = Ice.Util.createInputStream(communicator, data);
- @in.startEncapsulation();
- test(@in.readBool());
- @in.endEncapsulation();
- @in.destroy();
- }
-
- {
- byte[] data = new byte[0];
- @in = Ice.Util.createInputStream(communicator, data);
- try
- {
- @in.readBool();
- test(false);
- }
- catch(Ice.UnmarshalOutOfBoundsException)
- {
- }
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeBool(true);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(@in.readBool());
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeByte((byte)1);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(@in.readByte() == (byte)1);
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeShort((short)2);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(@in.readShort() == (short)2);
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeInt(3);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(@in.readInt() == 3);
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeLong(4);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(@in.readLong() == 4);
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeFloat((float)5.0);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(@in.readFloat() == (float)5.0);
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeDouble(6.0);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(@in.readDouble() == 6.0);
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeString("hello world");
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(@in.readString().Equals("hello world"));
- @out.destroy();
- @in.destroy();
- }
-
- Console.WriteLine("ok");
-
- Console.Write("testing constructed types... ");
- Console.Out.Flush();
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyEnumHelper.write(@out, Test.MyEnum.enum3);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- test(Test.MyEnumHelper.read(@in) == Test.MyEnum.enum3);
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Test.SmallStruct s = new Test.SmallStruct();
- s.bo = true;
- s.by = (byte)1;
- s.sh = (short)2;
- s.i = 3;
- s.l = 4;
- s.f = (float)5.0;
- s.d = 6.0;
- s.str = "7";
- s.e = Test.MyEnum.enum2;
- s.p = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("test:default"));
- s.ice_write(@out);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.SmallStruct s2 = new Test.SmallStruct();
- s2.ice_read(@in);
- test(s2.Equals(s));
- @out.destroy();
- @in.destroy();
- }
-
- {
- bool[] arr =
- {
- true,
- false,
- true,
- false
- };
- @out = Ice.Util.createOutputStream(communicator);
- Ice.BoolSeqHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- bool[] arr2 = Ice.BoolSeqHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- bool[][] arrS =
- {
- arr,
- new bool[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.BoolSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- bool[][] arr2S = Test.BoolSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
- {
- byte[] arr =
- {
- (byte)0x01,
- (byte)0x11,
- (byte)0x12,
- (byte)0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- Ice.ByteSeqHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- byte[] arr2 = Ice.ByteSeqHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- byte[][] arrS =
- {
- arr,
- new byte[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.ByteSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- byte[][] arr2S = Test.ByteSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
-#if !COMPACT
- {
- Serialize.Small small = new Serialize.Small();
- small.i = 99;
- @out = Ice.Util.createOutputStream(communicator);
- @out.writeSerializable(small);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Serialize.Small small2 = (Serialize.Small)@in.readSerializable();
- test(small2.i == 99);
- @out.destroy();
- @in.destroy();
- }
-#endif
-
- {
- short[] arr =
- {
- (short)0x01,
- (short)0x11,
- (short)0x12,
- (short)0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- Ice.ShortSeqHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- short[] arr2 = Ice.ShortSeqHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- short[][] arrS =
- {
- arr,
- new short[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.ShortSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- short[][] arr2S = Test.ShortSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
- {
- int[] arr =
- {
- 0x01,
- 0x11,
- 0x12,
- 0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- Ice.IntSeqHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- int[] arr2 = Ice.IntSeqHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- int[][] arrS =
- {
- arr,
- new int[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.IntSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- int[][] arr2S = Test.IntSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
- {
- long[] arr =
- {
- 0x01,
- 0x11,
- 0x12,
- 0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- Ice.LongSeqHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- long[] arr2 = Ice.LongSeqHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- long[][] arrS =
- {
- arr,
- new long[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.LongSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- long[][] arr2S = Test.LongSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
- {
- float[] arr =
- {
- (float)1,
- (float)2,
- (float)3,
- (float)4
- };
- @out = Ice.Util.createOutputStream(communicator);
- Ice.FloatSeqHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- float[] arr2 = Ice.FloatSeqHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- float[][] arrS =
- {
- arr,
- new float[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.FloatSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- float[][] arr2S = Test.FloatSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
- {
- double[] arr =
- {
- (double)1,
- (double)2,
- (double)3,
- (double)4
- };
- @out = Ice.Util.createOutputStream(communicator);
- Ice.DoubleSeqHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- double[] arr2 = Ice.DoubleSeqHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- double[][] arrS =
- {
- arr,
- new double[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.DoubleSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- double[][] arr2S = Test.DoubleSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
- {
- string[] arr =
- {
- "string1",
- "string2",
- "string3",
- "string4"
- };
- @out = Ice.Util.createOutputStream(communicator);
- Ice.StringSeqHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- string[] arr2 = Ice.StringSeqHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- string[][] arrS =
- {
- arr,
- new string[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.StringSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- string[][] arr2S = Test.StringSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
- {
- Test.MyEnum[] arr =
- {
- Test.MyEnum.enum3,
- Test.MyEnum.enum2,
- Test.MyEnum.enum1,
- Test.MyEnum.enum2
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyEnumSHelper.write(@out, arr);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.MyEnum[] arr2 = Test.MyEnumSHelper.read(@in);
- test(Compare(arr2, arr));
- @out.destroy();
- @in.destroy();
-
- Test.MyEnum[][] arrS =
- {
- arr,
- new Test.MyEnum[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyEnumSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.MyEnum[][] arr2S = Test.MyEnumSSHelper.read(@in);
- test(Compare(arr2S, arrS));
- @out.destroy();
- @in.destroy();
- }
-
- Test.SmallStruct[] smallStructArray = new Test.SmallStruct[3];
- for(int i = 0; i < smallStructArray.Length; ++i)
- {
- smallStructArray[i] = new Test.SmallStruct();
- smallStructArray[i].bo = true;
- smallStructArray[i].by = (byte)1;
- smallStructArray[i].sh = (short)2;
- smallStructArray[i].i = 3;
- smallStructArray[i].l = 4;
- smallStructArray[i].f = (float)5.0;
- smallStructArray[i].d = 6.0;
- smallStructArray[i].str = "7";
- smallStructArray[i].e = Test.MyEnum.enum2;
- smallStructArray[i].p = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("test:default"));
- }
-
- Test.MyClass[] myClassArray = new Test.MyClass[4];
- for(int i = 0; i < myClassArray.Length; ++i)
- {
- myClassArray[i] = new Test.MyClass();
- myClassArray[i].c = myClassArray[i];
- myClassArray[i].o = myClassArray[i];
- myClassArray[i].s = new Test.SmallStruct();
- myClassArray[i].s.e = Test.MyEnum.enum2;
- myClassArray[i].seq1 = new bool[] { true, false, true, false };
- myClassArray[i].seq2 = new byte[] { (byte)1, (byte)2, (byte)3, (byte)4 };
- myClassArray[i].seq3 = new short[] { (short)1, (short)2, (short)3, (short)4 };
- myClassArray[i].seq4 = new int[] { 1, 2, 3, 4 };
- myClassArray[i].seq5 = new long[] { 1, 2, 3, 4 };
- myClassArray[i].seq6 = new float[] { (float)1, (float)2, (float)3, (float)4 };
- myClassArray[i].seq7 = new double[] { (double)1, (double)2, (double)3, (double)4 };
- myClassArray[i].seq8 = new string[] { "string1", "string2", "string3", "string4" };
- myClassArray[i].seq9 = new Test.MyEnum[] { Test.MyEnum.enum3, Test.MyEnum.enum2, Test.MyEnum.enum1 };
- myClassArray[i].seq10 = new Test.MyClass[4]; // null elements.
- myClassArray[i].d = new System.Collections.Generic.Dictionary<string, Test.MyClass>();
- myClassArray[i].d["hi"] = myClassArray[i];
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyClassSHelper.write(@out, myClassArray);
- @out.writePendingObjects();
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.MyClass[] arr2 = Test.MyClassSHelper.read(@in);
- @in.readPendingObjects();
- test(arr2.Length == myClassArray.Length);
- for(int i = 0; i < arr2.Length; ++i)
- {
- test(arr2[i] != null);
- test(arr2[i].c == arr2[i]);
- test(arr2[i].o == arr2[i]);
- test(arr2[i].s.e == Test.MyEnum.enum2);
- test(Compare(arr2[i].seq1, myClassArray[i].seq1));
- test(Compare(arr2[i].seq2, myClassArray[i].seq2));
- test(Compare(arr2[i].seq3, myClassArray[i].seq3));
- test(Compare(arr2[i].seq4, myClassArray[i].seq4));
- test(Compare(arr2[i].seq5, myClassArray[i].seq5));
- test(Compare(arr2[i].seq6, myClassArray[i].seq6));
- test(Compare(arr2[i].seq7, myClassArray[i].seq7));
- test(Compare(arr2[i].seq8, myClassArray[i].seq8));
- test(Compare(arr2[i].seq9, myClassArray[i].seq9));
- test(arr2[i].d["hi"].Equals(arr2[i]));
- }
- @out.destroy();
- @in.destroy();
-
- Test.MyClass[][] arrS =
- {
- myClassArray,
- new Test.MyClass[0],
- myClassArray
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyClassSSHelper.write(@out, arrS);
- data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.MyClass[][] arr2S = Test.MyClassSSHelper.read(@in);
- test(arr2S.Length == arrS.Length);
- test(arr2S[0].Length == arrS[0].Length);
- test(arr2S[1].Length == arrS[1].Length);
- test(arr2S[2].Length == arrS[2].Length);
- @out.destroy();
- @in.destroy();
- }
-
- {
- Test.MyInterface i = new MyInterfaceI();
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyInterfaceHelper.write(@out, i);
- @out.writePendingObjects();
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.MyInterfaceHelper helper = new Test.MyInterfaceHelper(@in);
- helper.read();
- @in.readPendingObjects();
- test(helper.value != null);
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyClass obj = new Test.MyClass();
- obj.s = new Test.SmallStruct();
- obj.s.e = Test.MyEnum.enum2;
- TestObjectWriter writer = new TestObjectWriter(obj);
- @out.writeObject(writer);
- @out.writePendingObjects();
- byte[] data = @out.finished();
- test(writer.called);
- factoryWrapper.setFactory(new TestObjectFactory());
- @in = Ice.Util.createInputStream(communicator, data);
- TestReadObjectCallback cb = new TestReadObjectCallback();
- @in.readObject(cb);
- @in.readPendingObjects();
- test(cb.obj != null);
- test(cb.obj is TestObjectReader);
- TestObjectReader reader = (TestObjectReader)cb.obj;
- test(reader.called);
- test(reader.obj != null);
- test(reader.obj.s.e == Test.MyEnum.enum2);
- @out.destroy();
- @in.destroy();
- factoryWrapper.setFactory(null);
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyException ex = new Test.MyException();
-
- Test.MyClass c = new Test.MyClass();
- c.c = c;
- c.o = c;
- c.s = new Test.SmallStruct();
- c.s.e = Test.MyEnum.enum2;
- c.seq1 = new bool[] { true, false, true, false };
- c.seq2 = new byte[] { (byte)1, (byte)2, (byte)3, (byte)4 };
- c.seq3 = new short[] { (short)1, (short)2, (short)3, (short)4 };
- c.seq4 = new int[] { 1, 2, 3, 4 };
- c.seq5 = new long[] { 1, 2, 3, 4 };
- c.seq6 = new float[] { (float)1, (float)2, (float)3, (float)4 };
- c.seq7 = new double[] { (double)1, (double)2, (double)3, (double)4 };
- c.seq8 = new string[] { "string1", "string2", "string3", "string4" };
- c.seq9 = new Test.MyEnum[] { Test.MyEnum.enum3, Test.MyEnum.enum2, Test.MyEnum.enum1 };
- c.seq10 = new Test.MyClass[4]; // null elements.
- c.d = new Dictionary<string, Test.MyClass>();
- c.d.Add("hi", c);
-
- ex.c = c;
-
- @out.writeException(ex);
- byte[] data = @out.finished();
-
- @in = Ice.Util.createInputStream(communicator, data);
- try
- {
- @in.throwException();
- test(false);
- }
- catch(Test.MyException ex1)
- {
- test(ex1.c.s.e == c.s.e);
- test(Compare(ex1.c.seq1, c.seq1));
- test(Compare(ex1.c.seq2, c.seq2));
- test(Compare(ex1.c.seq3, c.seq3));
- test(Compare(ex1.c.seq4, c.seq4));
- test(Compare(ex1.c.seq5, c.seq5));
- test(Compare(ex1.c.seq6, c.seq6));
- test(Compare(ex1.c.seq7, c.seq7));
- test(Compare(ex1.c.seq8, c.seq8));
- test(Compare(ex1.c.seq9, c.seq9));
- }
- catch(Ice.UserException)
- {
- test(false);
- }
- }
-
- {
- Dictionary<byte, bool> dict = new Dictionary<byte, bool>();
- dict.Add((byte)4, true);
- dict.Add((byte)1, false);
- @out = Ice.Util.createOutputStream(communicator);
- Test.ByteBoolDHelper.write(@out, dict);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Dictionary<byte, bool> dict2 = Test.ByteBoolDHelper.read(@in);
- test(Ice.CollectionComparer.Equals(dict2, dict));
- }
-
- {
- Dictionary<short, int> dict = new Dictionary<short, int>();
- dict.Add((short)1, 9);
- dict.Add((short)4, 8);
- @out = Ice.Util.createOutputStream(communicator);
- Test.ShortIntDHelper.write(@out, dict);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Dictionary<short, int> dict2 = Test.ShortIntDHelper.read(@in);
- test(Ice.CollectionComparer.Equals(dict2, dict));
- }
-
- {
- Dictionary<long, float> dict = new Dictionary<long, float>();
- dict.Add((long)123809828, (float)0.51f);
- dict.Add((long)123809829, (float)0.56f);
- @out = Ice.Util.createOutputStream(communicator);
- Test.LongFloatDHelper.write(@out, dict);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Dictionary<long, float> dict2 = Test.LongFloatDHelper.read(@in);
- test(Ice.CollectionComparer.Equals(dict2, dict));
- }
-
- {
- Dictionary<string, string> dict = new Dictionary<string, string>();
- dict.Add("key1", "value1");
- dict.Add("key2", "value2");
- @out = Ice.Util.createOutputStream(communicator);
- Test.StringStringDHelper.write(@out, dict);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Dictionary<string, string> dict2 = Test.StringStringDHelper.read(@in);
- test(Ice.CollectionComparer.Equals(dict2, dict));
- }
-
- {
- Dictionary<string, Test.MyClass> dict = new Dictionary<string, Test.MyClass>();
- Test.MyClass c;
- c = new Test.MyClass();
- c.s = new Test.SmallStruct();
- c.s.e = Test.MyEnum.enum2;
- dict.Add("key1", c);
- c = new Test.MyClass();
- c.s = new Test.SmallStruct();
- c.s.e = Test.MyEnum.enum3;
- dict.Add("key2", c);
- @out = Ice.Util.createOutputStream(communicator);
- Test.StringMyClassDHelper.write(@out, dict);
- @out.writePendingObjects();
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Dictionary<string, Test.MyClass> dict2 = Test.StringMyClassDHelper.read(@in);
- @in.readPendingObjects();
- test(dict2.Count == dict.Count);
- test(dict2["key1"].s.e == Test.MyEnum.enum2);
- test(dict2["key2"].s.e == Test.MyEnum.enum3);
- }
-
- {
- bool[] arr =
- {
- true,
- false,
- true,
- false
- };
- @out = Ice.Util.createOutputStream(communicator);
- List<bool> l = new List<bool>(arr);
- Test.BoolListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- List<bool> l2 = Test.BoolListHelper.read(@in);
- test(Compare(l, l2));
- @out.destroy();
- @in.destroy();
- }
-
- {
- byte[] arr =
- {
- (byte)0x01,
- (byte)0x11,
- (byte)0x12,
- (byte)0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- List<byte> l = new List<byte>(arr);
- Test.ByteListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- List<byte> l2 = Test.ByteListHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- Test.MyEnum[] arr =
- {
- Test.MyEnum.enum3,
- Test.MyEnum.enum2,
- Test.MyEnum.enum1,
- Test.MyEnum.enum2
- };
- @out = Ice.Util.createOutputStream(communicator);
- List<Test.MyEnum> l = new List<Test.MyEnum>(arr);
- Test.MyEnumListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- List<Test.MyEnum> l2 = Test.MyEnumListHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- List<Test.SmallStruct> l = new List<Test.SmallStruct>(smallStructArray);
- Test.SmallStructListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- List<Test.SmallStruct> l2 = Test.SmallStructListHelper.read(@in);
- test(l2.Count == l.Count);
- for(int i = 0; i < l2.Count; ++i)
- {
- test(l2[i].Equals(smallStructArray[i]));
- }
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- List<Test.MyClass> l = new List<Test.MyClass>(myClassArray);
- Test.MyClassListHelper.write(@out, l);
- @out.writePendingObjects();
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- List<Test.MyClass> l2 = Test.MyClassListHelper.read(@in);
- @in.readPendingObjects();
- test(l2.Count == l.Count);
- for(int i = 0; i < l2.Count; ++i)
- {
- test(l2[i] != null);
- test(l2[i].c == l2[i]);
- test(l2[i].o == l2[i]);
- test(l2[i].s.e == Test.MyEnum.enum2);
- test(Compare(l2[i].seq1, l[i].seq1));
- test(Compare(l2[i].seq2, l[i].seq2));
- test(Compare(l2[i].seq3, l[i].seq3));
- test(Compare(l2[i].seq4, l[i].seq4));
- test(Compare(l2[i].seq5, l[i].seq5));
- test(Compare(l2[i].seq6, l[i].seq6));
- test(Compare(l2[i].seq7, l[i].seq7));
- test(Compare(l2[i].seq8, l[i].seq8));
- test(Compare(l2[i].seq9, l[i].seq9));
- test(l2[i].d["hi"].Equals(l2[i]));
- }
- @out.destroy();
- @in.destroy();
- }
-
- {
- Test.MyClassPrx[] arr = new Test.MyClassPrx[2];
- arr[0] = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("zero"));
- arr[1] = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("one"));
- @out = Ice.Util.createOutputStream(communicator);
- List<Test.MyClassPrx> l = new List<Test.MyClassPrx>(arr);
- Test.MyClassProxyListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- List<Test.MyClassPrx> l2 = Test.MyClassProxyListHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- short[] arr =
- {
- (short)0x01,
- (short)0x11,
- (short)0x12,
- (short)0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- LinkedList<short> l = new LinkedList<short>(arr);
- Test.ShortLinkedListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- LinkedList<short> l2 = Test.ShortLinkedListHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- int[] arr =
- {
- 0x01,
- 0x11,
- 0x12,
- 0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- LinkedList<int> l = new LinkedList<int>(arr);
- Test.IntLinkedListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- LinkedList<int> l2 = Test.IntLinkedListHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- Test.MyEnum[] arr =
- {
- Test.MyEnum.enum3,
- Test.MyEnum.enum2,
- Test.MyEnum.enum1,
- Test.MyEnum.enum2
- };
- @out = Ice.Util.createOutputStream(communicator);
- LinkedList<Test.MyEnum> l = new LinkedList<Test.MyEnum>(arr);
- Test.MyEnumLinkedListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- LinkedList<Test.MyEnum> l2 = Test.MyEnumLinkedListHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- LinkedList<Test.SmallStruct> l = new LinkedList<Test.SmallStruct>(smallStructArray);
- Test.SmallStructLinkedListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- LinkedList<Test.SmallStruct> l2 = Test.SmallStructLinkedListHelper.read(@in);
- test(l2.Count == l.Count);
- IEnumerator<Test.SmallStruct> e = l.GetEnumerator();
- IEnumerator<Test.SmallStruct> e2 = l2.GetEnumerator();
- while(e.MoveNext() && e2.MoveNext())
- {
- test(e.Current.Equals(e2.Current));
- }
- @out.destroy();
- @in.destroy();
- }
-
- {
- long[] arr =
- {
- 0x01,
- 0x11,
- 0x12,
- 0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- Stack<long> l = new Stack<long>(arr);
- Test.LongStackHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Stack<long> l2 = Test.LongStackHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- float[] arr =
- {
- (float)1,
- (float)2,
- (float)3,
- (float)4
- };
- @out = Ice.Util.createOutputStream(communicator);
- Stack<float> l = new Stack<float>(arr);
- Test.FloatStackHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Stack<float> l2 = Test.FloatStackHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Stack<Test.SmallStruct> l = new Stack<Test.SmallStruct>(smallStructArray);
- Test.SmallStructStackHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Stack<Test.SmallStruct> l2 = Test.SmallStructStackHelper.read(@in);
- test(l2.Count == l.Count);
- IEnumerator<Test.SmallStruct> e = l.GetEnumerator();
- IEnumerator<Test.SmallStruct> e2 = l2.GetEnumerator();
- while(e.MoveNext() && e2.MoveNext())
- {
- test(e.Current.Equals(e2.Current));
- }
- @out.destroy();
- @in.destroy();
- }
-
- {
- Test.MyClassPrx[] arr = new Test.MyClassPrx[2];
- arr[0] = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("zero"));
- arr[1] = Test.MyClassPrxHelper.uncheckedCast(communicator.stringToProxy("one"));
- @out = Ice.Util.createOutputStream(communicator);
- Stack<Test.MyClassPrx> l = new Stack<Test.MyClassPrx>(arr);
- Test.MyClassProxyStackHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Stack<Test.MyClassPrx> l2 = Test.MyClassProxyStackHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- double[] arr =
- {
- (double)1,
- (double)2,
- (double)3,
- (double)4
- };
- @out = Ice.Util.createOutputStream(communicator);
- Queue<double> l = new Queue<double>(arr);
- Test.DoubleQueueHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Queue<double> l2 = Test.DoubleQueueHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- string[] arr =
- {
- "string1",
- "string2",
- "string3",
- "string4"
- };
- @out = Ice.Util.createOutputStream(communicator);
- Queue<string> l = new Queue<string>(arr);
- Test.StringQueueHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Queue<string> l2 = Test.StringQueueHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Queue<Test.SmallStruct> l = new Queue<Test.SmallStruct>(smallStructArray);
- Test.SmallStructQueueHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Queue<Test.SmallStruct> l2 = Test.SmallStructQueueHelper.read(@in);
- test(l2.Count == l.Count);
- IEnumerator<Test.SmallStruct> e = l.GetEnumerator();
- IEnumerator<Test.SmallStruct> e2 = l2.GetEnumerator();
- while(e.MoveNext() && e2.MoveNext())
- {
- test(e.Current.Equals(e2.Current));
- }
- @out.destroy();
- @in.destroy();
- }
-
- {
- bool[] arr =
- {
- true,
- false,
- true,
- false
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.BoolCollection l = new Test.BoolCollection(arr);
- Test.BoolCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.BoolCollection l2 = Test.BoolCollectionHelper.read(@in);
- test(Compare(l, l2));
- @out.destroy();
- @in.destroy();
- }
-
- {
- int[] arr =
- {
- 0x01,
- 0x11,
- 0x12,
- 0x22
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.IntCollection l = new Test.IntCollection(arr);
- Test.IntCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.IntCollection l2 = Test.IntCollectionHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- string[] arr =
- {
- "string1",
- "string2",
- "string3",
- "string4"
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.StringCollection l = new Test.StringCollection(arr);
- Test.StringCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.StringCollection l2 = Test.StringCollectionHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- Test.MyEnum[] arr =
- {
- Test.MyEnum.enum3,
- Test.MyEnum.enum2,
- Test.MyEnum.enum1,
- Test.MyEnum.enum2
- };
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyEnumCollection l = new Test.MyEnumCollection(arr);
- Test.MyEnumCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.MyEnumCollection l2 = Test.MyEnumCollectionHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Test.SmallStructCollection l = new Test.SmallStructCollection(smallStructArray);
- Test.SmallStructCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.SmallStructCollection l2 = Test.SmallStructCollectionHelper.read(@in);
- test(l2.Count == l.Count);
- IEnumerator<Test.SmallStruct> e = l.GetEnumerator();
- IEnumerator<Test.SmallStruct> e2 = l2.GetEnumerator();
- while(e.MoveNext() && e2.MoveNext())
- {
- test(e.Current.Equals(e2.Current));
- }
- @out.destroy();
- @in.destroy();
- }
-
- {
- @out = Ice.Util.createOutputStream(communicator);
- Test.MyClassCollection l = new Test.MyClassCollection(myClassArray);
- Test.MyClassCollectionHelper.write(@out, l);
- @out.writePendingObjects();
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.MyClassCollection l2 = Test.MyClassCollectionHelper.read(@in);
- @in.readPendingObjects();
- test(l2.Count == l.Count);
- for(int i = 0; i < l2.Count; ++i)
- {
- test(l2[i] != null);
- test(l2[i].c == l2[i]);
- test(l2[i].o == l2[i]);
- test(l2[i].s.e == Test.MyEnum.enum2);
- test(Compare(l2[i].seq1, l[i].seq1));
- test(Compare(l2[i].seq2, l[i].seq2));
- test(Compare(l2[i].seq3, l[i].seq3));
- test(Compare(l2[i].seq4, l[i].seq4));
- test(Compare(l2[i].seq5, l[i].seq5));
- test(Compare(l2[i].seq6, l[i].seq6));
- test(Compare(l2[i].seq7, l[i].seq7));
- test(Compare(l2[i].seq8, l[i].seq8));
- test(Compare(l2[i].seq9, l[i].seq9));
- test(l2[i].d["hi"].Equals(l2[i]));
- }
- @out.destroy();
- @in.destroy();
- }
-
- {
- string[] arr =
- {
- "string1",
- "string2",
- "string3",
- "string4"
- };
- string[][] arrS =
- {
- arr,
- new string[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- List<string[]> l = new List<string[]>(arrS);
- Test.StringSListHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- List<string[]> l2 = Test.StringSListHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
- string[] arr =
- {
- "string1",
- "string2",
- "string3",
- "string4"
- };
- string[][] arrS =
- {
- arr,
- new string[0],
- arr
- };
- @out = Ice.Util.createOutputStream(communicator);
- Stack<string[]> l = new Stack<string[]>(arrS);
- Test.StringSStackHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Stack<string[]> l2 = Test.StringSStackHelper.read(@in);
- test(Compare(l2, l));
- @out.destroy();
- @in.destroy();
- }
-
- {
-#if COMPACT
- SortedList<string, string> dict = new SortedList<string, string>();
-#else
- SortedDictionary<string, string> dict = new SortedDictionary<string, string>();
-#endif
- dict.Add("key1", "value1");
- dict.Add("key2", "value2");
- @out = Ice.Util.createOutputStream(communicator);
- Test.SortedStringStringDHelper.write(@out, dict);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- IDictionary<string, string> dict2 = Test.SortedStringStringDHelper.read(@in);
- test(Ice.CollectionComparer.Equals(dict2, dict));
- }
-
- {
- Test.StringIntDCollection dict = new Test.StringIntDCollection();
- dict.Add("key1", 1);
- dict.Add("key2", 2);
- @out = Ice.Util.createOutputStream(communicator);
- Test.StringIntDCollectionHelper.write(@out, dict);
- byte[] data = @out.finished();
- @in = Ice.Util.createInputStream(communicator, data);
- Test.StringIntDCollection dict2 = Test.StringIntDCollectionHelper.read(@in);
- test(Ice.CollectionComparer.Equals(dict2, dict));
- }
-
- Console.WriteLine("ok");
-
- return 0;
- }
-
public static int Main(string[] args)
{
int status = 0;
@@ -1448,7 +42,7 @@ public class Client
data.properties.setProperty("Ice.FactoryAssemblies", "client");
#endif
communicator = Ice.Util.initialize(ref args, data);
- status = run(args, communicator);
+ status = AllTests.run(communicator);
}
catch(System.Exception ex)
{
diff --git a/cs/test/Ice/stream/Makefile b/cs/test/Ice/stream/Makefile
index 2f5bc590cb2..1741101e207 100644
--- a/cs/test/Ice/stream/Makefile
+++ b/cs/test/Ice/stream/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe
-C_SRCS = Client.cs
+C_SRCS = Client.cs AllTests.cs ../../TestCommon/TestApp.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/stream/Makefile.mak b/cs/test/Ice/stream/Makefile.mak
index 5b8f78c28ca..9f2d651e8e4 100644
--- a/cs/test/Ice/stream/Makefile.mak
+++ b/cs/test/Ice/stream/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe Serializable.dll
-C_SRCS = Client.cs
+C_SRCS = Client.cs AllTests.cs ..\..\TestCommon\TestApp.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/stream/Properties/AppManifest.xml b/cs/test/Ice/stream/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/stream/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/stream/Properties/AssemblyInfo.cs b/cs/test/Ice/stream/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..5b18f2eac22
--- /dev/null
+++ b/cs/test/Ice/stream/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("stream")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("stream")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("bd19b1a3-70fe-42b7-a833-4d9daa9e5fab")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/stream/Properties/InBrowserSettings.xml b/cs/test/Ice/stream/Properties/InBrowserSettings.xml
new file mode 100644
index 00000000000..3b6382d71c5
--- /dev/null
+++ b/cs/test/Ice/stream/Properties/InBrowserSettings.xml
@@ -0,0 +1,5 @@
+<InBrowserSettings>
+ <InBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="NotRequired" />
+ </InBrowserSettings.SecuritySettings>
+</InBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/stream/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/stream/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..a21bfded055
--- /dev/null
+++ b/cs/test/Ice/stream/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Stream Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>stream Application on your desktop; at home, at work or on the go.</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Stream Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/stream/Test.ice b/cs/test/Ice/stream/Test.ice
index 4c7c00b136a..41f76e41ca8 100644
--- a/cs/test/Ice/stream/Test.ice
+++ b/cs/test/Ice/stream/Test.ice
@@ -113,17 +113,22 @@ sequence<Ice::StringSeq> StringSList;
["clr:generic:Stack"]
sequence<Ice::StringSeq> StringSStack;
-#if COMPACT
+#ifndef SILVERLIGHT
+# if COMPACT
["clr:generic:SortedList"]
dictionary<string, string> SortedStringStringD;
-#else
+# else
["clr:generic:SortedDictionary"]
dictionary<string, string> SortedStringStringD;
+# endif
#endif
+
["clr:collection"]
dictionary<string, int> StringIntDCollection;
+#ifndef SILVERLIGHT
["clr:serializable:Serialize.Small"] sequence<byte> SerialSmall;
+#endif
class MyClass
{
@@ -141,7 +146,7 @@ class MyClass
MyEnumS seq9;
MyClassS seq10;
StringMyClassD d;
-#ifndef COMPACT
+#if !defined(COMPACT) && !defined(SILVERLIGHT)
SerialSmall ss;
#endif
};
diff --git a/cs/test/Ice/stream/stream.csproj b/cs/test/Ice/stream/stream.csproj
new file mode 100644
index 00000000000..444378bd7cf
--- /dev/null
+++ b/cs/test/Ice/stream/stream.csproj
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{21950547-9EDD-48D9-8311-8EBA541524C9}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>stream</RootNamespace>
+ <AssemblyName>stream</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>stream.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>stream.App</SilverlightAppEntry>
+ <TestPageFileName>streamTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ <InBrowserSettingsFile>Properties\InBrowserSettings.xml</InBrowserSettingsFile>
+ <RequireInBrowserElevation>false</RequireInBrowserElevation>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\InBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_ExtraOptions="-DSILVERLIGHT" ZerocIce_Streaming="True" ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/Ice/timeout/AllTests.cs b/cs/test/Ice/timeout/AllTests.cs
index 14cb68653c5..2aaf97dcb13 100644
--- a/cs/test/Ice/timeout/AllTests.cs
+++ b/cs/test/Ice/timeout/AllTests.cs
@@ -9,18 +9,14 @@
using System;
using System.Diagnostics;
-using System.Threading;
+using System.Threading;
+
+#if SILVERLIGHT
+using System.Windows.Controls;
+#endif
-public class AllTests
+public class AllTests : TestCommon.TestApp
{
- private static void test(bool b)
- {
- if(!b)
- {
- throw new Exception();
- }
- }
-
private class CallbackBase
{
internal CallbackBase()
@@ -96,7 +92,28 @@ public class AllTests
private CallbackBase callback = new CallbackBase();
}
+#if SILVERLIGHT
+ public override Ice.InitializationData initData()
+ {
+ Ice.InitializationData initData = new Ice.InitializationData();
+ initData.properties = Ice.Util.createProperties();
+ //
+ // For this test, we want to disable retries.
+ //
+ initData.properties.setProperty("Ice.RetryIntervals", "-1");
+
+ //
+ // This test kills connections, so we don't want warnings.
+ //
+ initData.properties.setProperty("Ice.Warn.Connections", "0");
+ return initData;
+ }
+
+ override
+ public void run(Ice.Communicator communicator)
+#else
public static Test.TimeoutPrx allTests(Ice.Communicator communicator)
+#endif
{
string sref = "timeout:default -p 12010";
Ice.ObjectPrx obj = communicator.stringToProxy(sref);
@@ -105,8 +122,8 @@ public class AllTests
Test.TimeoutPrx timeout = Test.TimeoutPrxHelper.checkedCast(obj);
test(timeout != null);
- Console.Out.Write("testing connect timeout... ");
- Console.Out.Flush();
+ Write("testing connect timeout... ");
+ Flush();
{
//
// Expect ConnectTimeoutException.
@@ -141,10 +158,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing read timeout... ");
- Console.Out.Flush();
+ Write("testing read timeout... ");
+ Flush();
{
//
// Expect TimeoutException.
@@ -175,10 +192,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing write timeout... ");
- Console.Out.Flush();
+ Write("testing write timeout... ");
+ Flush();
{
//
// Expect TimeoutException.
@@ -213,10 +230,10 @@ public class AllTests
test(false);
}
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing AMI read timeout... ");
- Console.Out.Flush();
+ Write("testing AMI read timeout... ");
+ Flush();
{
//
// Expect TimeoutException.
@@ -236,10 +253,10 @@ public class AllTests
to.begin_sleep(500).whenCompleted(cb.response, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing AMI write timeout... ");
- Console.Out.Flush();
+ Write("testing AMI write timeout... ");
+ Flush();
{
//
// Expect TimeoutException.
@@ -263,10 +280,10 @@ public class AllTests
to.begin_sendData(seq).whenCompleted(cb.response, cb.exception);
cb.check();
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing close timeout... ");
- Console.Out.Flush();
+ Write("testing close timeout... ");
+ Flush();
{
Test.TimeoutPrx to = Test.TimeoutPrxHelper.checkedCast(obj.ice_timeout(250));
Ice.Connection connection = to.ice_getConnection();
@@ -292,10 +309,10 @@ public class AllTests
}
timeout.op(); // Ensure adapter is active.
}
- Console.Out.WriteLine("ok");
+ WriteLine("ok");
- Console.Out.Write("testing timeout overrides... ");
- Console.Out.Flush();
+ Write("testing timeout overrides... ");
+ Flush();
{
//
// Test Ice.Override.Timeout. This property overrides all
@@ -391,14 +408,17 @@ public class AllTests
initData.properties.setProperty("Ice.Override.CloseTimeout", "200");
Ice.Communicator comm = Ice.Util.initialize(initData);
comm.stringToProxy(sref).ice_getConnection();
- timeout.holdAdapter(750);
- Stopwatch stopwatch = new Stopwatch();
- long now = stopwatch.ElapsedMilliseconds;
- comm.destroy();
- test(stopwatch.ElapsedMilliseconds - now < 500);
+ timeout.holdAdapter(750);
+ timeout.holdAdapter(750);
+ long begin = System.DateTime.Now.Ticks;
+ comm.destroy();
+ test(((long)new System.TimeSpan(System.DateTime.Now.Ticks - begin).TotalMilliseconds - begin) < 500);
}
- Console.Out.WriteLine("ok");
-
+ WriteLine("ok");
+#if SILVERLIGHT
+ timeout.shutdown();
+#else
return timeout;
+#endif
}
}
diff --git a/cs/test/Ice/timeout/App.xaml b/cs/test/Ice/timeout/App.xaml
new file mode 100644
index 00000000000..77376526f5d
--- /dev/null
+++ b/cs/test/Ice/timeout/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="timeout.App"
+ >
+ <Application.Resources>
+
+ </Application.Resources>
+</Application>
diff --git a/cs/test/Ice/timeout/App.xaml.cs b/cs/test/Ice/timeout/App.xaml.cs
new file mode 100644
index 00000000000..b84a63034db
--- /dev/null
+++ b/cs/test/Ice/timeout/App.xaml.cs
@@ -0,0 +1,81 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace timeout
+{
+ public partial class App : Application
+ {
+ public App()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Current.MainWindow.WindowState = WindowState.Minimized;
+ Current.MainWindow.Visibility = Visibility.Collapsed;
+ });
+ this.Startup += this.Application_Startup;
+ this.Exit += this.Application_Exit;
+ this.UnhandledException += this.Application_UnhandledException;
+ InitializeComponent();
+ }
+
+ private void Application_Startup(object sender, StartupEventArgs e)
+ {
+ TestCommon.TestApp app = new AllTests();
+ app.main();
+ }
+
+ private void Application_Exit(object sender, EventArgs e)
+ {
+
+ }
+
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ // If the app is running outside of the debugger then report the exception using
+ // the browser's exception mechanism. On IE this will display it a yellow alert
+ // icon in the status bar and Firefox will display a script error.
+ if(!System.Diagnostics.Debugger.IsAttached)
+ {
+
+ // NOTE: This will allow the application to continue running after an exception has been thrown
+ // but not handled.
+ // For production applications this error handling should be replaced with something that will
+ // report the error to the website and stop the application.
+ e.Handled = true;
+ Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
+ }
+ }
+
+ private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
+ {
+ try
+ {
+ string errorMsg = e.ExceptionObject.Message + e.ExceptionObject.StackTrace;
+ errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");
+
+ System.Windows.Browser.HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
+ }
+ catch(Exception)
+ {
+ }
+ }
+ }
+}
diff --git a/cs/test/Ice/timeout/Makefile b/cs/test/Ice/timeout/Makefile
index 42e0401ea1e..fd2863789a0 100644
--- a/cs/test/Ice/timeout/Makefile
+++ b/cs/test/Ice/timeout/Makefile
@@ -11,7 +11,7 @@ top_srcdir = ../../..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ../../TestCommon/TestApp.cs
S_SRCS = TimeoutI.cs Server.cs
SLICE_SRCS = $(SDIR)/Test.ice
diff --git a/cs/test/Ice/timeout/Makefile.mak b/cs/test/Ice/timeout/Makefile.mak
index fb119ff664e..16217e6d4b6 100644
--- a/cs/test/Ice/timeout/Makefile.mak
+++ b/cs/test/Ice/timeout/Makefile.mak
@@ -11,7 +11,7 @@ top_srcdir = ..\..\..
TARGETS = client.exe server.exe
-C_SRCS = AllTests.cs Client.cs
+C_SRCS = AllTests.cs Client.cs ..\..\TestCommon\TestApp.cs
S_SRCS = TimeoutI.cs Server.cs
GEN_SRCS = $(GDIR)\Test.cs
diff --git a/cs/test/Ice/timeout/Properties/AppManifest.xml b/cs/test/Ice/timeout/Properties/AppManifest.xml
new file mode 100644
index 00000000000..a9552327529
--- /dev/null
+++ b/cs/test/Ice/timeout/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+>
+ <Deployment.Parts>
+ </Deployment.Parts>
+</Deployment>
diff --git a/cs/test/Ice/timeout/Properties/AssemblyInfo.cs b/cs/test/Ice/timeout/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..8a962a894e1
--- /dev/null
+++ b/cs/test/Ice/timeout/Properties/AssemblyInfo.cs
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("timeout")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("ZeroC")]
+[assembly: AssemblyProduct("timeout")]
+[assembly: AssemblyCopyright("Copyright © ZeroC 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("f47eb28d-54ef-4285-8441-a55a39eb749b")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/cs/test/Ice/timeout/Properties/OutOfBrowserSettings.xml b/cs/test/Ice/timeout/Properties/OutOfBrowserSettings.xml
new file mode 100644
index 00000000000..fb7eaa8e3a6
--- /dev/null
+++ b/cs/test/Ice/timeout/Properties/OutOfBrowserSettings.xml
@@ -0,0 +1,10 @@
+<OutOfBrowserSettings ShortName="Timeout Test" EnableGPUAcceleration="False" ShowInstallMenuItem="True">
+ <OutOfBrowserSettings.Blurb>Timeout Test</OutOfBrowserSettings.Blurb>
+ <OutOfBrowserSettings.WindowSettings>
+ <WindowSettings Title="Timeout Test" Height="1" Width="1" Top="0" Left="0" WindowStartupLocation="Manual" />
+ </OutOfBrowserSettings.WindowSettings>
+ <OutOfBrowserSettings.SecuritySettings>
+ <SecuritySettings ElevatedPermissions="Required" />
+ </OutOfBrowserSettings.SecuritySettings>
+ <OutOfBrowserSettings.Icons />
+</OutOfBrowserSettings> \ No newline at end of file
diff --git a/cs/test/Ice/timeout/timeout.csproj b/cs/test/Ice/timeout/timeout.csproj
new file mode 100644
index 00000000000..35e4caa8dc6
--- /dev/null
+++ b/cs/test/Ice/timeout/timeout.csproj
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{86F3AD27-AC8E-417F-ADCF-461AE33870A6}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>timeout</RootNamespace>
+ <AssemblyName>timeout</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>true</SilverlightApplication>
+ <SupportedCultures>
+ </SupportedCultures>
+ <XapOutputs>true</XapOutputs>
+ <GenerateSilverlightManifest>true</GenerateSilverlightManifest>
+ <XapFilename>timeout.xap</XapFilename>
+ <SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
+ <SilverlightAppEntry>timeout.App</SilverlightAppEntry>
+ <TestPageFileName>timeoutTestPage.html</TestPageFileName>
+ <CreateTestPage>true</CreateTestPage>
+ <ValidateXaml>true</ValidateXaml>
+ <EnableOutOfBrowser>true</EnableOutOfBrowser>
+ <OutOfBrowserSettingsFile>Properties\OutOfBrowserSettings.xml</OutOfBrowserSettingsFile>
+ <UsePlatformExtensions>false</UsePlatformExtensions>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ <LinkedServerProject>
+ </LinkedServerProject>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AllTests.cs" />
+ <Compile Include="App.xaml.cs">
+ <DependentUpon>App.xaml</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Test.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ApplicationDefinition Include="App.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </ApplicationDefinition>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\AppManifest.xml" />
+ <None Include="Test.ice" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\TestCommon\TestCommon.csproj">
+ <Project>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</Project>
+ <Name>TestCommon</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="Properties\OutOfBrowserSettings.xml" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/cs/test/TestCommon/Properties/AssemblyInfo.cs b/cs/test/TestCommon/Properties/AssemblyInfo.cs
new file mode 100644
index 00000000000..a9735d4210b
--- /dev/null
+++ b/cs/test/TestCommon/Properties/AssemblyInfo.cs
@@ -0,0 +1,37 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("TestCommon")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyProduct("TestCommon")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("3e6b7796-9f29-4fb1-8dea-643450684954")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+[assembly: System.CLSCompliant(true)] \ No newline at end of file
diff --git a/cs/test/TestCommon/TestApp.cs b/cs/test/TestCommon/TestApp.cs
new file mode 100644
index 00000000000..75e6d8439f1
--- /dev/null
+++ b/cs/test/TestCommon/TestApp.cs
@@ -0,0 +1,142 @@
+using System;
+
+#if SILVERLIGHT
+using System.Collections.Generic;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+#endif
+
+namespace TestCommon
+{
+ public abstract class TestApp
+ {
+ protected static void test(bool b)
+ {
+ if(!b)
+ {
+ throw new System.Exception();
+ }
+ }
+
+#if !SILVERLIGHT
+ static
+#endif
+ public void Write(string msg)
+ {
+#if SILVERLIGHT
+ Console.Out.Write(msg);
+#else
+ Console.Out.Write(msg);
+#endif
+ }
+
+#if !SILVERLIGHT
+ static
+#endif
+ public void WriteLine(string msg)
+ {
+#if SILVERLIGHT
+ Console.Out.WriteLine(msg);
+#else
+ Console.Out.WriteLine(msg);
+#endif
+ }
+
+#if !SILVERLIGHT
+ static
+#endif
+ public void Flush()
+ {
+ Console.Out.Flush();
+ }
+
+#if SILVERLIGHT
+
+ public abstract void run(Ice.Communicator communicator);
+
+ public virtual Ice.InitializationData
+ initData()
+ {
+ return new Ice.InitializationData();
+ }
+
+ public void main()
+ {
+ int args = Application.Current.Host.Source.OriginalString.IndexOf("?");
+ Dictionary<string, string> properties = new Dictionary<string, string>();
+ if(args > 0 && args + 1 < Application.Current.Host.Source.OriginalString.Length)
+ {
+ string[] props = Application.Current.Host.Source.OriginalString.Substring(args + 1).Split(';');
+ foreach (string prop in props)
+ {
+ int pos = prop.IndexOf('=');
+ if(pos > 0)
+ {
+ properties[prop.Substring(0, pos)] = prop.Substring(pos + 1);
+ }
+ }
+ }
+
+ System.Threading.Thread t = new System.Threading.Thread(() =>
+ {
+ Ice.Communicator communicator = null;
+ try
+ {
+ Ice.InitializationData initializationData = initData();
+ if(initializationData.properties == null)
+ {
+ initializationData.properties = Ice.Util.createProperties();
+ }
+
+ foreach(KeyValuePair<String,String> entry in properties)
+ {
+ if(initializationData.properties.getProperty(entry.Key).Equals(""))
+ {
+ initializationData.properties.setProperty(entry.Key, entry.Value);
+ }
+ }
+
+ communicator = Ice.Util.initialize(initializationData);
+ run(communicator);
+ completed();
+ }
+ catch(System.Exception ex)
+ {
+ failed(ex);
+ }
+ finally
+ {
+ if(communicator != null)
+ {
+ communicator.destroy();
+ }
+ }
+ });
+ t.Start();
+ }
+
+ public void completed()
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(delegate()
+ {
+ Application.Current.MainWindow.Close();
+ });
+ }
+
+ public void failed(System.Exception ex)
+ {
+ System.Environment.ExitCode = 1;
+ WriteLine(Environment.NewLine + "Test Failed:");
+ WriteLine("Exception: " + ex.ToString());
+ completed();
+ }
+#endif
+ }
+}
diff --git a/cs/test/TestCommon/TestCommon.csproj b/cs/test/TestCommon/TestCommon.csproj
new file mode 100644
index 00000000000..696e058c607
--- /dev/null
+++ b/cs/test/TestCommon/TestCommon.csproj
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{09CE99C4-5118-4EFF-B99D-6E0C160E4413}</ProjectGuid>
+ <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>TestCommon</RootNamespace>
+ <AssemblyName>TestCommon</AssemblyName>
+ <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+ <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+ <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+ <SilverlightApplication>false</SilverlightApplication>
+ <ValidateXaml>true</ValidateXaml>
+ <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+ </PropertyGroup>
+ <!-- This property group is only here to support building this project using the
+ MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
+ to set the TargetFrameworkVersion to v3.5 -->
+ <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>DEBUG;TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>.</OutputPath>
+ <DefineConstants>TRACE;SILVERLIGHT</DefineConstants>
+ <NoStdLib>true</NoStdLib>
+ <NoConfig>true</NoConfig>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Ice, Version=3.4.2.0, Culture=neutral, PublicKeyToken=1f998c50fec78381, processorArchitecture=MSIL" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System.Windows" />
+ <Reference Include="system" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Net" />
+ <Reference Include="System.Windows.Browser" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="TestApp.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+ <SilverlightProjectProperties />
+ </FlavorProperties>
+ <UserProperties ZerocIce_Enabled="True" />
+ </VisualStudio>
+ </ProjectExtensions>
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project> \ No newline at end of file
diff --git a/cs/test/testsl.sln b/cs/test/testsl.sln
new file mode 100644
index 00000000000..bfd3f6d97ab
--- /dev/null
+++ b/cs/test/testsl.sln
@@ -0,0 +1,195 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestCommon", "TestCommon\TestCommon.csproj", "{09CE99C4-5118-4EFF-B99D-6E0C160E4413}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "adapterDeactivation", "Ice\adapterDeactivation\adapterDeactivation.csproj", "{73497706-4139-4821-B8DF-E83654E6EE55}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ami", "Ice\ami\ami.csproj", "{7A9447E3-31BF-46DF-A3FF-B4DF792DE86F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "binding", "Ice\binding\binding.csproj", "{974F0F9B-7EB4-4566-B5C8-1313AE9218A5}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "defaultValue", "Ice\defaultValue\defaultValue.csproj", "{0858ED5B-68D1-444D-912C-6147BC4FC968}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dictMapping", "Ice\dictMapping\dictMapping.csproj", "{4F085C35-BF17-4947-BB56-E5F48C1C30E8}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "dispatcher", "Ice\dispatcher\dispatcher.csproj", "{E71BAF76-681E-43F5-930F-8B547F4978C3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "exceptions", "Ice\exceptions\exceptions.csproj", "{270ADFFA-8123-4C8C-B117-607A3AE4973D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "facets", "Ice\facets\facets.csproj", "{ACEFEC42-29BF-48E8-BF14-EB554CD06EEF}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "faultTolerance", "Ice\faultTolerance\faultTolerance.csproj", "{61AD7756-4BB3-4772-AB43-A42F5C3CBB34}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "hold", "Ice\hold\hold.csproj", "{44EFC26A-42E7-46A8-B371-96969E8128ED}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "info", "Ice\info\info.csproj", "{11F271A3-319C-4C8F-B1C6-508416D8EB6A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "inheritance", "Ice\inheritance\inheritance.csproj", "{0C325152-DF80-4BFF-A412-EAC75504B393}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "invoke", "Ice\invoke\invoke.csproj", "{95E9131E-6630-4658-B48F-405DDBE0C1C9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "location", "Ice\location\location.csproj", "{1170795D-9EE2-472A-AC4F-18F77255292C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "objects", "Ice\objects\objects.csproj", "{B4C71555-2292-44E2-B5C6-9EB3C92FF308}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "operations", "Ice\operations\operations.csproj", "{EEF0327D-EAA7-49B4-80B9-7CC265A7AD96}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "proxy", "Ice\proxy\proxy.csproj", "{B558C1F5-CC5A-4D64-848F-BD196AFB1FC7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "retry", "Ice\retry\retry.csproj", "{59049797-A1DC-4D8E-BCC2-B2A86C8DFA99}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "seqMapping", "Ice\seqMapping\seqMapping.csproj", "{3B586590-63D2-48FD-9973-6CB6BA107C27}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "servantLocator", "Ice\servantLocator\servantLocator.csproj", "{E2F1D989-CA09-4A83-9511-7C03FD13E5D1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "exceptions", "Ice\slicing\exceptions\exceptions.csproj", "{DD327892-C079-4209-863D-855E32A4C379}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "objects", "Ice\slicing\objects\objects.csproj", "{0FB1D189-5BA6-4EE0-BAAF-E9EE0AFE6D3D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "stream", "Ice\stream\stream.csproj", "{21950547-9EDD-48D9-8311-8EBA541524C9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "timeout", "Ice\timeout\timeout.csproj", "{86F3AD27-AC8E-417F-ADCF-461AE33870A6}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Ice", "Ice", "{3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "slicing", "slicing", "{D20CFB7E-6C8B-47DD-928F-DAE52F01AF7E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {09CE99C4-5118-4EFF-B99D-6E0C160E4413}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {09CE99C4-5118-4EFF-B99D-6E0C160E4413}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {09CE99C4-5118-4EFF-B99D-6E0C160E4413}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {09CE99C4-5118-4EFF-B99D-6E0C160E4413}.Release|Any CPU.Build.0 = Release|Any CPU
+ {73497706-4139-4821-B8DF-E83654E6EE55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {73497706-4139-4821-B8DF-E83654E6EE55}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {73497706-4139-4821-B8DF-E83654E6EE55}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {73497706-4139-4821-B8DF-E83654E6EE55}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7A9447E3-31BF-46DF-A3FF-B4DF792DE86F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7A9447E3-31BF-46DF-A3FF-B4DF792DE86F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7A9447E3-31BF-46DF-A3FF-B4DF792DE86F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7A9447E3-31BF-46DF-A3FF-B4DF792DE86F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {974F0F9B-7EB4-4566-B5C8-1313AE9218A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {974F0F9B-7EB4-4566-B5C8-1313AE9218A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {974F0F9B-7EB4-4566-B5C8-1313AE9218A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {974F0F9B-7EB4-4566-B5C8-1313AE9218A5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0858ED5B-68D1-444D-912C-6147BC4FC968}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0858ED5B-68D1-444D-912C-6147BC4FC968}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0858ED5B-68D1-444D-912C-6147BC4FC968}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0858ED5B-68D1-444D-912C-6147BC4FC968}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4F085C35-BF17-4947-BB56-E5F48C1C30E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4F085C35-BF17-4947-BB56-E5F48C1C30E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4F085C35-BF17-4947-BB56-E5F48C1C30E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4F085C35-BF17-4947-BB56-E5F48C1C30E8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E71BAF76-681E-43F5-930F-8B547F4978C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E71BAF76-681E-43F5-930F-8B547F4978C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E71BAF76-681E-43F5-930F-8B547F4978C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E71BAF76-681E-43F5-930F-8B547F4978C3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {270ADFFA-8123-4C8C-B117-607A3AE4973D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {270ADFFA-8123-4C8C-B117-607A3AE4973D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {270ADFFA-8123-4C8C-B117-607A3AE4973D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {270ADFFA-8123-4C8C-B117-607A3AE4973D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ACEFEC42-29BF-48E8-BF14-EB554CD06EEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ACEFEC42-29BF-48E8-BF14-EB554CD06EEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ACEFEC42-29BF-48E8-BF14-EB554CD06EEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ACEFEC42-29BF-48E8-BF14-EB554CD06EEF}.Release|Any CPU.Build.0 = Release|Any CPU
+ {61AD7756-4BB3-4772-AB43-A42F5C3CBB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {61AD7756-4BB3-4772-AB43-A42F5C3CBB34}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {61AD7756-4BB3-4772-AB43-A42F5C3CBB34}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {61AD7756-4BB3-4772-AB43-A42F5C3CBB34}.Release|Any CPU.Build.0 = Release|Any CPU
+ {44EFC26A-42E7-46A8-B371-96969E8128ED}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {44EFC26A-42E7-46A8-B371-96969E8128ED}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {44EFC26A-42E7-46A8-B371-96969E8128ED}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {44EFC26A-42E7-46A8-B371-96969E8128ED}.Release|Any CPU.Build.0 = Release|Any CPU
+ {11F271A3-319C-4C8F-B1C6-508416D8EB6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {11F271A3-319C-4C8F-B1C6-508416D8EB6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {11F271A3-319C-4C8F-B1C6-508416D8EB6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {11F271A3-319C-4C8F-B1C6-508416D8EB6A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0C325152-DF80-4BFF-A412-EAC75504B393}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0C325152-DF80-4BFF-A412-EAC75504B393}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0C325152-DF80-4BFF-A412-EAC75504B393}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0C325152-DF80-4BFF-A412-EAC75504B393}.Release|Any CPU.Build.0 = Release|Any CPU
+ {95E9131E-6630-4658-B48F-405DDBE0C1C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {95E9131E-6630-4658-B48F-405DDBE0C1C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {95E9131E-6630-4658-B48F-405DDBE0C1C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {95E9131E-6630-4658-B48F-405DDBE0C1C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1170795D-9EE2-472A-AC4F-18F77255292C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1170795D-9EE2-472A-AC4F-18F77255292C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1170795D-9EE2-472A-AC4F-18F77255292C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1170795D-9EE2-472A-AC4F-18F77255292C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B4C71555-2292-44E2-B5C6-9EB3C92FF308}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B4C71555-2292-44E2-B5C6-9EB3C92FF308}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B4C71555-2292-44E2-B5C6-9EB3C92FF308}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B4C71555-2292-44E2-B5C6-9EB3C92FF308}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EEF0327D-EAA7-49B4-80B9-7CC265A7AD96}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EEF0327D-EAA7-49B4-80B9-7CC265A7AD96}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EEF0327D-EAA7-49B4-80B9-7CC265A7AD96}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EEF0327D-EAA7-49B4-80B9-7CC265A7AD96}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B558C1F5-CC5A-4D64-848F-BD196AFB1FC7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B558C1F5-CC5A-4D64-848F-BD196AFB1FC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B558C1F5-CC5A-4D64-848F-BD196AFB1FC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B558C1F5-CC5A-4D64-848F-BD196AFB1FC7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {59049797-A1DC-4D8E-BCC2-B2A86C8DFA99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {59049797-A1DC-4D8E-BCC2-B2A86C8DFA99}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {59049797-A1DC-4D8E-BCC2-B2A86C8DFA99}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {59049797-A1DC-4D8E-BCC2-B2A86C8DFA99}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B586590-63D2-48FD-9973-6CB6BA107C27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B586590-63D2-48FD-9973-6CB6BA107C27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B586590-63D2-48FD-9973-6CB6BA107C27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B586590-63D2-48FD-9973-6CB6BA107C27}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E2F1D989-CA09-4A83-9511-7C03FD13E5D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E2F1D989-CA09-4A83-9511-7C03FD13E5D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E2F1D989-CA09-4A83-9511-7C03FD13E5D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E2F1D989-CA09-4A83-9511-7C03FD13E5D1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DD327892-C079-4209-863D-855E32A4C379}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DD327892-C079-4209-863D-855E32A4C379}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DD327892-C079-4209-863D-855E32A4C379}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DD327892-C079-4209-863D-855E32A4C379}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0FB1D189-5BA6-4EE0-BAAF-E9EE0AFE6D3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0FB1D189-5BA6-4EE0-BAAF-E9EE0AFE6D3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0FB1D189-5BA6-4EE0-BAAF-E9EE0AFE6D3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0FB1D189-5BA6-4EE0-BAAF-E9EE0AFE6D3D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {21950547-9EDD-48D9-8311-8EBA541524C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {21950547-9EDD-48D9-8311-8EBA541524C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {21950547-9EDD-48D9-8311-8EBA541524C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {21950547-9EDD-48D9-8311-8EBA541524C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {86F3AD27-AC8E-417F-ADCF-461AE33870A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {86F3AD27-AC8E-417F-ADCF-461AE33870A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {86F3AD27-AC8E-417F-ADCF-461AE33870A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {86F3AD27-AC8E-417F-ADCF-461AE33870A6}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {86F3AD27-AC8E-417F-ADCF-461AE33870A6} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {21950547-9EDD-48D9-8311-8EBA541524C9} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {73497706-4139-4821-B8DF-E83654E6EE55} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {7A9447E3-31BF-46DF-A3FF-B4DF792DE86F} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {974F0F9B-7EB4-4566-B5C8-1313AE9218A5} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {0858ED5B-68D1-444D-912C-6147BC4FC968} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {4F085C35-BF17-4947-BB56-E5F48C1C30E8} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {E71BAF76-681E-43F5-930F-8B547F4978C3} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {270ADFFA-8123-4C8C-B117-607A3AE4973D} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {ACEFEC42-29BF-48E8-BF14-EB554CD06EEF} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {61AD7756-4BB3-4772-AB43-A42F5C3CBB34} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {44EFC26A-42E7-46A8-B371-96969E8128ED} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {11F271A3-319C-4C8F-B1C6-508416D8EB6A} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {0C325152-DF80-4BFF-A412-EAC75504B393} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {95E9131E-6630-4658-B48F-405DDBE0C1C9} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {1170795D-9EE2-472A-AC4F-18F77255292C} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {B4C71555-2292-44E2-B5C6-9EB3C92FF308} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {EEF0327D-EAA7-49B4-80B9-7CC265A7AD96} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {B558C1F5-CC5A-4D64-848F-BD196AFB1FC7} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {59049797-A1DC-4D8E-BCC2-B2A86C8DFA99} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {3B586590-63D2-48FD-9973-6CB6BA107C27} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {E2F1D989-CA09-4A83-9511-7C03FD13E5D1} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {D20CFB7E-6C8B-47DD-928F-DAE52F01AF7E} = {3182DFB4-2F4F-4131-8011-CA0A32C5B9C4}
+ {DD327892-C079-4209-863D-855E32A4C379} = {D20CFB7E-6C8B-47DD-928F-DAE52F01AF7E}
+ {0FB1D189-5BA6-4EE0-BAAF-E9EE0AFE6D3D} = {D20CFB7E-6C8B-47DD-928F-DAE52F01AF7E}
+ EndGlobalSection
+EndGlobal
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index cbc38dd6dc8..0878323c931 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -35,6 +35,7 @@ sqlUser = None
sqlPassword = None
serviceDir = None
compact = False
+silverlight = False
def isCygwin():
# The substring on sys.platform is required because some cygwin
@@ -324,6 +325,7 @@ def run(tests, root = False):
--sql-passwd=<passwd> Set SQL password.
--service-dir=<dir> Where to locate services for builds without service support.
--compact Ice for .NET uses the Compact Framework.
+ --silverlight Ice for .NET uses Silverlight.
""")
sys.exit(2)
@@ -333,7 +335,7 @@ def run(tests, root = False):
"debug", "protocol=", "compress", "valgrind", "host=", "serialize", "continue",
"ipv6", "no-ipv6", "ice-home=", "cross=", "x64", "script", "env", "sql-type=",
"sql-db=", "sql-host=", "sql-port=", "sql-user=", "sql-passwd=", "service-dir=",
- "appverifier", "compact"])
+ "appverifier", "compact", "silverlight"])
except getopt.GetoptError:
usage()
@@ -348,6 +350,7 @@ def run(tests, root = False):
script = False
noipv6 = False
compact = "--compact" in opts
+ silverlight = "--silverlight" in opts
filters = []
for o, a in opts:
@@ -388,10 +391,13 @@ def run(tests, root = False):
if compact:
print("SSL is not supported with the Compact Framework")
sys.exit(1)
+ if silverlight:
+ print "SSL is not supported with Silverlight"
+ sys.exit(1)
if o in ( "--cross", "--protocol", "--host", "--debug", "--compress", "--valgrind", "--serialize", "--ipv6", \
"--ice-home", "--x64", "--env", "--sql-type", "--sql-db", "--sql-host", "--sql-port", "--sql-user", \
- "--sql-passwd", "--service-dir", "--appverifier", "--compact"):
+ "--sql-passwd", "--service-dir", "--appverifier", "--compact", "--silverlight"):
arg += " " + o
if len(a) > 0:
arg += " " + a
@@ -449,7 +455,7 @@ def run(tests, root = False):
expanded.append([ ( "%s/test/%s" % (lang, test), a, []) for test in crossTests if not (test == "Ice/background" and (lang == "cs" or c == "cs"))])
# Add ssl & compress for the operations test.
- if (compact or mono) and c == "cs": # Don't add the ssl tests.
+ if (compact or mono or silverlight) and c == "cs": # Don't add the ssl tests.
continue
a = "--cross=%s --protocol=ssl --compress" % c
expanded.append([("%s/test/Ice/operations" % lang, a, [])])
@@ -777,6 +783,7 @@ class DriverConfig:
global sqlPassword
global serviceDir
global compact
+ global silverlight
self.lang = getDefaultMapping()
self.protocol = protocol
self.compress = compress
@@ -796,6 +803,7 @@ class DriverConfig:
self.sqlPassword = sqlPassword
self.serviceDir = serviceDir
self.compact = compact
+ self.silverlight = silverlight
def argsToDict(argumentString, results):
"""Converts an argument string to dictionary"""
@@ -883,13 +891,21 @@ def getCommandLineProperties(exe, config):
output.close()
return properties
-def getCommandLine(exe, config):
+def getCommandLine(exe, config, options = ""):
output = getStringIO()
+
if config.mono and config.lang == "cs":
output.write("mono --debug '%s.exe' " % exe)
elif config.lang == "rb" and config.type == "client":
output.write("ruby '" + exe + "' ")
+ elif config.silverlight and config.lang == "cs" and config.type == "client":
+ xap = "%s.xap" % os.path.basename(os.getcwd())
+ if (os.environ.has_key("PROCESSOR_ARCHITECTURE") and os.environ["PROCESSOR_ARCHITECTURE"] == "AMD64") or \
+ (os.environ.has_key("PROCESSOR_ARCHITEW6432") and os.environ["PROCESSOR_ARCHITEW6432"] == ""):
+ output.write("%s (x86)\Microsoft Silverlight\sllauncher.exe /emulate:%s" % ( os.environ["PROGRAMFILES"], xap))
+ else:
+ output.write("%s\Microsoft Silverlight\sllauncher.exe /emulate:%s" % ( os.environ["PROGRAMFILES"], xapPath))
elif config.lang == "java" or config.lang == "javae":
output.write("%s -ea " % javaCmd)
if isSolaris() and config.x64:
@@ -912,7 +928,17 @@ def getCommandLine(exe, config):
else:
output.write(exe + " ")
- output.write(getCommandLineProperties(exe, config))
+ if (config.silverlight and config.type == "client"):
+ properties = getCommandLineProperties(exe, config) + ' ' + options
+ props = ""
+ for p in properties.split(' '):
+ if props != "":
+ props = props + ";"
+ props = props + p.strip().replace("--", "")
+ output.write("/origin:http://localhost?%s" % props)
+ else:
+ output.write(getCommandLineProperties(exe, config) + ' ' + options)
+
commandline = output.getvalue()
output.close()
@@ -1030,6 +1056,7 @@ def spawn(cmd, env=None, cwd=None, startReader=True, lang=None):
sys.stdout.write("(%s) " % cmd)
if printenv:
dumpenv(env, lang)
+
return Expect.Expect(cmd, startReader=startReader, env=env, logfile=tracefile, cwd=cwd)
def spawnClient(cmd, env=None, cwd=None, echo=True, startReader=True, lang=None):
@@ -1188,7 +1215,7 @@ def clientServerTest(additionalServerOptions = "", additionalClientOptions = "",
serverCfg = DriverConfig("server")
if lang in ["rb", "php"]:
serverCfg.lang = "cpp"
- server = getCommandLine(server, serverCfg) + " " + additionalServerOptions
+ server = getCommandLine(server, serverCfg, additionalServerOptions)
serverProc = spawnServer(server, env = serverenv, lang=serverCfg.lang)
print("ok")
@@ -1197,7 +1224,7 @@ def clientServerTest(additionalServerOptions = "", additionalClientOptions = "",
else:
sys.stdout.write("starting %s %s ... " % (clientLang, clientDesc))
sys.stdout.flush()
- client = getCommandLine(client, clientCfg) + " " + additionalClientOptions
+ client = getCommandLine(client, clientCfg, additionalClientOptions)
clientProc = spawnClient(client, env = clientenv, startReader = False, lang=clientCfg.lang)
print("ok")
clientProc.startReader()
@@ -1213,6 +1240,9 @@ def collocatedTest(additionalOptions = ""):
if len(cross) > 1 or cross[0] != lang:
print("** skipping cross test")
return
+ if silverlight:
+ print "** skipping collocated test"
+ return
testdir = os.getcwd()
collocated = getDefaultCollocatedFile()
@@ -1227,7 +1257,7 @@ def collocatedTest(additionalOptions = ""):
sys.stdout.write("starting collocated... ")
sys.stdout.flush()
- collocated = getCommandLine(collocated, DriverConfig("colloc")) + ' ' + additionalOptions
+ collocated = getCommandLine(collocated, DriverConfig("colloc"), additionalOptions)
collocatedProc = spawnClient(collocated, env = env, startReader = False, lang=lang)
print("ok")
collocatedProc.startReader()
@@ -1248,7 +1278,7 @@ def startClient(exe, args = "", config=None, env=None, echo = True, startReader
config = DriverConfig("client")
if env is None:
env = getTestEnv(getDefaultMapping(), os.getcwd())
- cmd = getCommandLine(exe, config) + ' ' + args
+ cmd = getCommandLine(exe, config, args)
if config.lang == "php":
phpSetup(clientConfig, iceOptions, iceProfile)
return spawnClient(cmd, env = env, echo = echo, startReader = startReader, lang=config.lang)
@@ -1258,7 +1288,7 @@ def startServer(exe, args = "", config=None, env=None, adapter = None, count = 1
config = DriverConfig("server")
if env is None:
env = getTestEnv(getDefaultMapping(), os.getcwd())
- cmd = getCommandLine(exe, config) + ' ' + args
+ cmd = getCommandLine(exe, config, args)
return spawnServer(cmd, env = env, adapter = adapter, count = count, echo = echo,lang=config.lang)
def startColloc(exe, args, config=None, env=None):
@@ -1267,7 +1297,7 @@ def startColloc(exe, args, config=None, env=None):
config = DriverConfig("colloc")
if env is None:
env = getTestEnv(lang, testdir)
- cmd = getCommandLine(exe, config) + ' ' + args
+ cmd = getCommandLine(exe, config, args)
return spawnClient(cmd, env = env, lang=config.lang)
def simpleTest(exe = None, options = ""):
@@ -1285,7 +1315,7 @@ def simpleTest(exe = None, options = ""):
sys.stdout.flush()
command = exe + ' ' + options
if lang != "cpp":
- command = getCommandLine(exe, config) + ' ' + options
+ command = getCommandLine(exe, config, options)
client = spawnClient(command, startReader = False, lang = lang)
print("ok")
client.startReader()
@@ -1424,6 +1454,7 @@ def processCmdLine():
--sql-passwd=<passwd> Set SQL password.
--service-dir=<dir> Where to locate services for builds without service support.
--compact Ice for .NET uses the Compact Framework.
+ --silverlight Ice for .NET uses Silverlight.
""")
sys.exit(2)
@@ -1431,7 +1462,7 @@ def processCmdLine():
opts, args = getopt.getopt(
sys.argv[1:], "", ["debug", "trace=", "protocol=", "compress", "valgrind", "host=", "serialize", "ipv6", \
"ice-home=", "x64", "cross=", "env", "sql-type=", "sql-db=", "sql-host=", "sql-port=", \
- "sql-user=", "sql-passwd=", "service-dir=", "appverifier", "compact"])
+ "sql-user=", "sql-passwd=", "service-dir=", "appverifier", "compact", "silverlight"])
except getopt.GetoptError:
usage()
@@ -1529,6 +1560,9 @@ def processCmdLine():
elif o == "--compact":
global compact
compact = True
+ elif o == "--silverlight":
+ global silverlight
+ silverlight = True
if len(args) > 0:
usage()
@@ -1603,10 +1637,18 @@ def runTests(start, expanded, num = 0, script = False):
print("%s*** test not supported with Compact Framework%s" % (prefix, suffix))
continue
+ if args.find("silverlight") != -1 and "nosilverlight" in config:
+ print "%s*** test not supported with Silverlight%s" % (prefix, suffix)
+ continue
+
if args.find("compact") == -1 and "compact" in config:
print("%s*** test requires Compact Framework%s" % (prefix, suffix))
continue
+ if args.find("silverlight") == -1 and "silverlight" in config:
+ print "%s*** test requires Silverlight%s" % (prefix, suffix)
+ continue
+
if isVista() and "novista" in config:
print("%s*** test not supported under Vista%s" % (prefix, suffix))
continue
diff --git a/vsaddin/src/Builder.cs b/vsaddin/src/Builder.cs
index ca1b7b19307..742921af058 100644
--- a/vsaddin/src/Builder.cs
+++ b/vsaddin/src/Builder.cs
@@ -735,41 +735,20 @@ namespace Ice.VisualStudio
{
if(Util.isCSharpProject(project))
{
- bool development = Util.developmentMode(project);
- if(Util.isSilverlightProject(project))
- {
- string iceSlHome = Environment.GetEnvironmentVariable("ICE_SL_HOME");
- if(String.IsNullOrEmpty(iceSlHome))
- {
- MessageBox.Show("ICE_SL_HOME environment variable not set.\n" +
- "ICE_SL_HOME environment variable must be set to point to " +
- "Ice Silverlight installation path.",
- "Ice Visual Studio Add-in", MessageBoxButtons.OK,
- MessageBoxIcon.Error,
- MessageBoxDefaultButton.Button1,
- (MessageBoxOptions)0);
- return;
- }
-
- Util.addDotNetReference(project, "IceSL", Util.getIceSlHome(), development);
+ bool development = Util.developmentMode(project);
+ if(components.Count == 0)
+ {
+ components =
+ new ComponentList(Util.getProjectProperty(project, Util.PropertyIceComponents));
}
- else
+ if(!components.Contains("Ice"))
{
-
- if(components.Count == 0)
- {
- components =
- new ComponentList(Util.getProjectProperty(project, Util.PropertyIceComponents));
- }
- if(!components.Contains("Ice"))
- {
- components.Add("Ice");
- }
- string iceHome = Util.getIceHome();
- foreach(string component in components)
- {
- Util.addDotNetReference(project, component, iceHome, development);
- }
+ components.Add("Ice");
+ }
+ string iceHome = Util.getIceHome();
+ foreach(string component in components)
+ {
+ Util.addDotNetReference(project, component, iceHome, development);
}
}
else if(Util.isVBProject(project))
@@ -811,14 +790,7 @@ namespace Ice.VisualStudio
}
else if(Util.isCSharpProject(project))
{
- if(Util.isSilverlightProject(project))
- {
- Util.removeDotNetReference(project, "IceSL");
- }
- else
- {
- Util.removeDotNetReference(project, "Ice");
- }
+ Util.removeDotNetReference(project, "Ice");
}
Util.setProjectProperty(project, Util.PropertyIceComponents, components.ToString());
@@ -1606,22 +1578,13 @@ namespace Ice.VisualStudio
if(Util.isCSharpProject(project))
{
compiler = Util.slice2cs;
- if(Util.isSilverlightProject(project))
- {
- compiler = Util.slice2sl;
- iceHome = Util.getIceSlHome();
- }
}
return Path.Combine(Path.Combine(iceHome, "bin"), compiler);
}
public static string getSliceCompilerVersion(Project project, string sliceCompiler)
- {
- string iceHome = Util.getIceHome();
- if(Util.isSilverlightProject(project))
- {
- iceHome = Util.getIceSlHome();
- }
+ {
+ string iceHome = Util.getIceHome();
sliceCompiler = Path.Combine(iceHome, Path.Combine("bin", sliceCompiler));
System.Diagnostics.Process process = new System.Diagnostics.Process();
@@ -1666,20 +1629,6 @@ namespace Ice.VisualStudio
process.BeginOutputReadLine();
string version = process.StandardError.ReadToEnd();
process.WaitForExit();
-
- if(String.IsNullOrEmpty(version))
- {
- //
- // Some old version of slice compilers print version
- // to StdOut instead of StdErr
- //
- version = reader.data();
- if(String.IsNullOrEmpty(version))
- {
- return "";
- }
- }
-
return version.Trim();
}
@@ -1714,15 +1663,7 @@ namespace Ice.VisualStudio
args += "--add-header=" + Util.quote(preCompiledHeader) + " ";
}
}
-
- if(Util.isSilverlightProject(project))
- {
- args += "-I\"" + Util.getIceSlHome() + "\\slice\" ";
- }
- else
- {
- args += "-I\"" + Util.getIceHome() + "\\slice\" ";
- }
+ args += "-I\"" + Util.getIceHome() + "\\slice\" ";
foreach(string i in includes)
{
@@ -2575,30 +2516,7 @@ namespace Ice.VisualStudio
process.WaitForExit();
- //
- // slice2sl <= 0.3 doesn't print all errors to standard error, we check the slice2sl
- // version to know if we need to parse standard output for errors.
- //
- bool standardError = true;
- if(Util.isSilverlightProject(project))
- {
- string version = getSliceCompilerVersion(project, Util.slice2sl);
- List<String> tokens = new List<string>(version.Split(new char[]{'.'},
- StringSplitOptions.RemoveEmptyEntries));
-
- int mayor = Int32.Parse(tokens[0], CultureInfo.InvariantCulture);
- int minor = Int32.Parse(tokens[1], CultureInfo.InvariantCulture);
- if(mayor == 0 && minor <= 3)
- {
- standardError = false;
- }
- }
-
bool hasErrors = parseErrors(project, sliceCompiler, file, stderr);
- if(!standardError)
- {
- hasErrors = hasErrors || parseErrors(project, sliceCompiler, file, reader.data());
- }
process.Close();
if(hasErrors)
{
diff --git a/vsaddin/src/Connect.cs b/vsaddin/src/Connect.cs
index 28874349c67..c0f0ddce11d 100644
--- a/vsaddin/src/Connect.cs
+++ b/vsaddin/src/Connect.cs
@@ -169,16 +169,8 @@ namespace Ice.VisualStudio
if(Util.isCSharpProject(project))
{
- if(Util.isSilverlightProject(project))
- {
- IceSilverlightConfigurationDialog dialog = new IceSilverlightConfigurationDialog(project);
- dialog.ShowDialog();
- }
- else
- {
IceCsharpConfigurationDialog dialog = new IceCsharpConfigurationDialog(project);
dialog.ShowDialog();
- }
}
else if(Util.isVBProject(project))
{
diff --git a/vsaddin/src/ExtraCompilerOptionsView.cs b/vsaddin/src/ExtraCompilerOptionsView.cs
index ea533da13ec..2ac8fe684c1 100644
--- a/vsaddin/src/ExtraCompilerOptionsView.cs
+++ b/vsaddin/src/ExtraCompilerOptionsView.cs
@@ -98,12 +98,6 @@ namespace Ice.VisualStudio
_dialog.needSave();
}
- private bool parseSlice2slOptions()
- {
- Options opts = null;
- return Util.parseSlice2slOptions(txtExtraOptions.Text, true, ref opts);
- }
-
private bool parseSlice2csOptions()
{
Options opts = null;
@@ -126,14 +120,7 @@ namespace Ice.VisualStudio
}
else if(Util.isCSharpProject(_project))
{
- if(Util.isSilverlightProject(_project))
- {
- return parseSlice2slOptions();
- }
- else
- {
- return parseSlice2csOptions();
- }
+ return parseSlice2csOptions();
}
return true;
}
diff --git a/vsaddin/src/IceCsharpConfigurationDialog.cs b/vsaddin/src/IceCsharpConfigurationDialog.cs
index 96ef6e6a378..56a2542d031 100755
--- a/vsaddin/src/IceCsharpConfigurationDialog.cs
+++ b/vsaddin/src/IceCsharpConfigurationDialog.cs
@@ -43,7 +43,8 @@ namespace Ice.VisualStudio
{
this.Text = "Ice Configuration - Project: " + _project.Name;
bool enabled = Util.isSliceBuilderEnabled(project);
- _compactFramework = Util.isCSharpSmartDeviceProject(_project);
+ _compactFramework = Util.isCSharpSmartDeviceProject(_project);
+ _silverlightFramework = Util.isSilverlightProject(_project);
setEnabled(enabled);
chkEnableBuilder.Checked = enabled;
load();
@@ -84,10 +85,16 @@ namespace Ice.VisualStudio
{
dotNetNames = Util.getDotNetCompactNames();
checkComponent("IceSSL", false);
- }
- else
- {
- dotNetNames = Util.getDotNetNames();
+ }
+ else if(_silverlightFramework)
+ {
+ dotNetNames = Util.getSilverlightNames();
+ checkComponent("IceSSL", false);
+ checkComponent("IceBox", false);
+ }
+ else
+ {
+ dotNetNames = Util.getDotNetNames();
}
foreach(String s in dotNetNames)
{
@@ -251,15 +258,23 @@ namespace Ice.VisualStudio
chkIceGrid.Enabled = enabled;
chkIcePatch2.Enabled = enabled;
//
- // Ice .NET Compact Framework doesn't support SSL
+ // Ice .NET Compact Framework doesn't support IceSSL
//
if(_compactFramework)
{
chkIceSSL.Enabled = false;
- }
- else
- {
- chkIceSSL.Enabled = enabled;
+ }
+ //
+ // Ice Silverlight doesn't support IceSSL and IceBox
+ //
+ else if(_silverlightFramework)
+ {
+ chkIceSSL.Enabled = false;
+ chkIceBox.Enabled = false;
+ }
+ else
+ {
+ chkIceSSL.Enabled = enabled;
}
chkIceStorm.Enabled = enabled;
@@ -389,10 +404,13 @@ namespace Ice.VisualStudio
if(chkGlacier2.Checked)
{
components.Add("Glacier2");
- }
- if(chkIceBox.Checked)
- {
- components.Add("IceBox");
+ }
+ if(!_silverlightFramework)
+ {
+ if (chkIceBox.Checked)
+ {
+ components.Add("IceBox");
+ }
}
if(chkIceGrid.Checked)
{
@@ -402,7 +420,7 @@ namespace Ice.VisualStudio
{
components.Add("IcePatch2");
}
- if(!_compactFramework)
+ if(!_compactFramework && !_silverlightFramework)
{
if(chkIceSSL.Checked)
{
@@ -513,14 +531,17 @@ namespace Ice.VisualStudio
{
components.Add("Glacier2");
}
- }
- if(chkIceBox.Checked != Util.hasDotNetReference(_project, "IceBox"))
- {
- componentChanged("IceBox", chkIceBox.Checked, development);
- if(!chkIceBox.Checked)
- {
- components.Add("IceBox");
- }
+ }
+ if(!_silverlightFramework)
+ {
+ if (chkIceBox.Checked != Util.hasDotNetReference(_project, "IceBox"))
+ {
+ componentChanged("IceBox", chkIceBox.Checked, development);
+ if (!chkIceBox.Checked)
+ {
+ components.Add("IceBox");
+ }
+ }
}
if(chkIceGrid.Checked != Util.hasDotNetReference(_project, "IceGrid"))
{
@@ -538,7 +559,7 @@ namespace Ice.VisualStudio
components.Add("IcePatch2");
}
}
- if(!_compactFramework)
+ if(!_compactFramework && !_silverlightFramework)
{
if(chkIceSSL.Checked != Util.hasDotNetReference(_project, "IceSSL"))
{
@@ -638,10 +659,13 @@ namespace Ice.VisualStudio
if(chkGlacier2.Checked != Util.hasDotNetReference(_project, "Glacier2"))
{
return true;
- }
- if(chkIceBox.Checked != Util.hasDotNetReference(_project, "IceBox"))
- {
- return true;
+ }
+ if(!_silverlightFramework)
+ {
+ if(chkIceBox.Checked != Util.hasDotNetReference(_project, "IceBox"))
+ {
+ return true;
+ }
}
if(chkIceGrid.Checked != Util.hasDotNetReference(_project, "IceGrid"))
{
@@ -651,7 +675,7 @@ namespace Ice.VisualStudio
{
return true;
}
- if(!_compactFramework)
+ if(!_compactFramework && !_silverlightFramework)
{
if(chkIceSSL.Checked != Util.hasDotNetReference(_project, "IceSSL"))
{
@@ -668,6 +692,7 @@ namespace Ice.VisualStudio
private bool _initialized;
private Project _project;
private bool _changed = false;
- private bool _compactFramework = false;
+ private bool _compactFramework = false;
+ private bool _silverlightFramework = false;
}
}
diff --git a/vsaddin/src/IceSilverlightConfigurationDialog.Designer.cs b/vsaddin/src/IceSilverlightConfigurationDialog.Designer.cs
deleted file mode 100644
index d09c6b2ac02..00000000000
--- a/vsaddin/src/IceSilverlightConfigurationDialog.Designer.cs
+++ /dev/null
@@ -1,208 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-namespace Ice.VisualStudio
-{
- partial class IceSilverlightConfigurationDialog
- {
- /// <summary>
- /// Required designer variable.
- /// </summary>
- private System.ComponentModel.IContainer components = null;
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
- protected override void Dispose(bool disposing)
- {
- if (disposing && (components != null))
- {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- this.chkEnableBuilder = new System.Windows.Forms.CheckBox();
- this.groupBox4 = new System.Windows.Forms.GroupBox();
- this.chkIcePrefix = new System.Windows.Forms.CheckBox();
- this.label1 = new System.Windows.Forms.Label();
- this.comboBoxVerboseLevel = new System.Windows.Forms.ComboBox();
- this.btnCancel = new System.Windows.Forms.Button();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
- this.btnApply = new System.Windows.Forms.Button();
- this.btnOk = new System.Windows.Forms.Button();
- this.outputDirView = new Ice.VisualStudio.OutputDirView();
- this.includePathView = new Ice.VisualStudio.IncludePathView();
- this.extraCompilerOptions = new Ice.VisualStudio.ExtraCompilerOptionsView();
- this.groupBox4.SuspendLayout();
- this.SuspendLayout();
- //
- // chkEnableBuilder
- //
- this.chkEnableBuilder.AutoSize = true;
- this.chkEnableBuilder.Location = new System.Drawing.Point(4, 10);
- this.chkEnableBuilder.Name = "chkEnableBuilder";
- this.chkEnableBuilder.Size = new System.Drawing.Size(112, 17);
- this.chkEnableBuilder.TabIndex = 0;
- this.chkEnableBuilder.Text = "Enable Ice Builder";
- this.chkEnableBuilder.UseVisualStyleBackColor = true;
- this.chkEnableBuilder.CheckedChanged += new System.EventHandler(this.chkEnableBuilder_CheckedChanged);
- //
- // groupBox4
- //
- this.groupBox4.Controls.Add(this.chkIcePrefix);
- this.groupBox4.Location = new System.Drawing.Point(4, 91);
- this.groupBox4.Name = "groupBox4";
- this.groupBox4.Size = new System.Drawing.Size(487, 44);
- this.groupBox4.TabIndex = 4;
- this.groupBox4.TabStop = false;
- this.groupBox4.Text = "Slice compiler options";
- //
- // chkIcePrefix
- //
- this.chkIcePrefix.AutoSize = true;
- this.chkIcePrefix.Location = new System.Drawing.Point(10, 19);
- this.chkIcePrefix.Name = "chkIcePrefix";
- this.chkIcePrefix.Size = new System.Drawing.Size(41, 17);
- this.chkIcePrefix.TabIndex = 0;
- this.chkIcePrefix.Text = "Ice";
- this.chkIcePrefix.UseVisualStyleBackColor = true;
- this.chkIcePrefix.CheckedChanged += new System.EventHandler(this.component_Changed);
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(289, 12);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(75, 13);
- this.label1.TabIndex = 1;
- this.label1.Text = "Tracing Level:";
- //
- // comboBoxVerboseLevel
- //
- this.comboBoxVerboseLevel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.comboBoxVerboseLevel.FormattingEnabled = true;
- this.comboBoxVerboseLevel.Items.AddRange(new object[] {
- "Errors Only",
- "Info",
- "Debug"});
- this.comboBoxVerboseLevel.Location = new System.Drawing.Point(370, 8);
- this.comboBoxVerboseLevel.Name = "comboBoxVerboseLevel";
- this.comboBoxVerboseLevel.Size = new System.Drawing.Size(121, 21);
- this.comboBoxVerboseLevel.TabIndex = 2;
- this.comboBoxVerboseLevel.SelectedIndexChanged += new System.EventHandler(this.component_Changed);
- //
- // btnCancel
- //
- this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
- this.btnCancel.Location = new System.Drawing.Point(335, 394);
- this.btnCancel.Name = "btnCancel";
- this.btnCancel.Size = new System.Drawing.Size(75, 23);
- this.btnCancel.TabIndex = 8;
- this.btnCancel.Text = "Cancel";
- this.btnCancel.UseVisualStyleBackColor = true;
- this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
- //
- // btnApply
- //
- this.btnApply.Location = new System.Drawing.Point(416, 394);
- this.btnApply.Name = "btnApply";
- this.btnApply.Size = new System.Drawing.Size(75, 23);
- this.btnApply.TabIndex = 9;
- this.btnApply.Text = "Apply";
- this.btnApply.UseVisualStyleBackColor = true;
- this.btnApply.Click += new System.EventHandler(this.btnApply_Click);
- //
- // btnOk
- //
- this.btnOk.Location = new System.Drawing.Point(254, 394);
- this.btnOk.Name = "btnOk";
- this.btnOk.Size = new System.Drawing.Size(75, 23);
- this.btnOk.TabIndex = 7;
- this.btnOk.Text = "OK";
- this.btnOk.UseVisualStyleBackColor = true;
- this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
- //
- // outputDirView
- //
- this.outputDirView.Location = new System.Drawing.Point(4, 35);
- this.outputDirView.Margin = new System.Windows.Forms.Padding(0);
- this.outputDirView.Name = "outputDirView";
- this.outputDirView.Size = new System.Drawing.Size(487, 48);
- this.outputDirView.TabIndex = 3;
- //
- // includePathView
- //
- this.includePathView.Location = new System.Drawing.Point(4, 219);
- this.includePathView.Name = "includePathView";
- this.includePathView.Size = new System.Drawing.Size(487, 168);
- this.includePathView.TabIndex = 6;
- //
- // extraCompilerOptions
- //
- this.extraCompilerOptions.Location = new System.Drawing.Point(4, 143);
- this.extraCompilerOptions.Name = "extraCompilerOptions";
- this.extraCompilerOptions.Size = new System.Drawing.Size(487, 68);
- this.extraCompilerOptions.TabIndex = 5;
- //
- // IceSilverlightConfigurationDialog
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.CancelButton = this.btnCancel;
- this.ClientSize = new System.Drawing.Size(494, 426);
- this.Controls.Add(this.label1);
- this.Controls.Add(this.outputDirView);
- this.Controls.Add(this.comboBoxVerboseLevel);
- this.Controls.Add(this.btnOk);
- this.Controls.Add(this.btnApply);
- this.Controls.Add(this.includePathView);
- this.Controls.Add(this.extraCompilerOptions);
- this.Controls.Add(this.btnCancel);
- this.Controls.Add(this.groupBox4);
- this.Controls.Add(this.chkEnableBuilder);
- this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
- this.MaximizeBox = false;
- this.Name = "IceSilverlightConfigurationDialog";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
- this.Text = "Ice Configuration";
- this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.formClosing);
- this.groupBox4.ResumeLayout(false);
- this.groupBox4.PerformLayout();
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
-
- #endregion
-
- private System.Windows.Forms.CheckBox chkEnableBuilder;
- private System.Windows.Forms.GroupBox groupBox4;
- private System.Windows.Forms.CheckBox chkIcePrefix;
- private System.Windows.Forms.Button btnCancel;
- private System.Windows.Forms.ToolTip toolTip;
- private System.Windows.Forms.Label label1;
- private System.Windows.Forms.ComboBox comboBoxVerboseLevel;
- private ExtraCompilerOptionsView extraCompilerOptions;
- private IncludePathView includePathView;
- private System.Windows.Forms.Button btnApply;
- private System.Windows.Forms.Button btnOk;
- private OutputDirView outputDirView;
- }
-}
diff --git a/vsaddin/src/IceSilverlightConfigurationDialog.cs b/vsaddin/src/IceSilverlightConfigurationDialog.cs
deleted file mode 100644
index dd875874584..00000000000
--- a/vsaddin/src/IceSilverlightConfigurationDialog.cs
+++ /dev/null
@@ -1,395 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2012 ZeroC, Inc. All rights reserved.
-//
-// This copy of Ice is licensed to you under the terms described in the
-// ICE_LICENSE file included in this distribution.
-//
-// **********************************************************************
-
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.IO;
-using System.Text;
-using System.Windows.Forms;
-using System.Globalization;
-using EnvDTE;
-
-namespace Ice.VisualStudio
-{
- public partial class IceSilverlightConfigurationDialog : Form, IceConfigurationDialog
- {
- public IceSilverlightConfigurationDialog(Project project)
- {
- InitializeComponent();
- _project = project;
-
- outputDirView.init(this, _project);
- extraCompilerOptions.init(this, _project);
- includePathView.init(this, _project);
-
- //
- // Set the toolTip messages.
- //
- toolTip.SetToolTip(chkIcePrefix, "Allow Ice prefix (--ice).");
-
- if(_project != null)
- {
- this.Text = "Ice Configuration - Project: " + _project.Name;
- bool enabled = Util.isSliceBuilderEnabled(project);
- setEnabled(enabled);
- chkEnableBuilder.Checked = enabled;
- load();
- _initialized = true;
- }
- chkEnableBuilder.Focus();
- }
-
-#region IceConfigurationDialog interface
-
- public bool editingIncludeDir()
- {
- return includePathView.editingIncludeDir();
- }
-
- public void endEditIncludeDir(bool saveChanges)
- {
- includePathView.endEditIncludeDir(saveChanges);
- }
-
- public void needSave()
- {
- if(_initialized)
- {
- btnApply.Enabled = hasUnsavedChanges();
- }
- }
-
- public void unsetCancelButton()
- {
- CancelButton = null;
- }
-
- public void setCancelButton()
- {
- CancelButton = btnCancel;
- }
-
-#endregion IceConfigurationDialog interface
- private void load()
- {
- if(_project == null)
- {
- return;
- }
- Cursor = Cursors.WaitCursor;
- outputDirView.load();
- extraCompilerOptions.load();
-
- chkIcePrefix.Checked = Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix);
- comboBoxVerboseLevel.SelectedIndex = Util.getVerboseLevel(_project);
-
- includePathView.load();
-
- btnApply.Enabled = false;
- Cursor = Cursors.Default;
- }
-
- private void chkEnableBuilder_CheckedChanged(object sender, EventArgs e)
- {
- try
- {
- Cursor = Cursors.WaitCursor;
- if(editingIncludeDir())
- {
- endEditIncludeDir(true);
- }
- if(_initialized)
- {
- _initialized = false;
- setEnabled(chkEnableBuilder.Checked);
-
- ComponentList components;
- if(chkEnableBuilder.Checked)
- {
- //
- // Enable the components that were previously enabled, if any.
- //
- components = new ComponentList(Util.getProjectProperty(_project, Util.PropertyIceComponents));
-
- //
- // If there isn't a previous set of components, we enable the default components.
- //
- if(components.Count == 0)
- {
- components.Add("IceSL");
- }
- }
- else
- {
- components = new ComponentList("IceSL");
- }
-
-
- chkEnableBuilder.Enabled = true;
- _initialized = true;
- needSave();
- }
- Cursor = Cursors.Default;
- }
- catch(Exception ex)
- {
- Cursor = Cursors.Default;
- Util.unexpectedExceptionWarning(ex);
- throw;
- }
- }
-
- private void setEnabled(bool enabled)
- {
- outputDirView.setEnabled(enabled);
- chkIcePrefix.Enabled = enabled;
- comboBoxVerboseLevel.Enabled = enabled;
- extraCompilerOptions.setEnabled(enabled);
- includePathView.setEnabled(enabled);
- }
-
- private void formClosing(object sender, FormClosingEventArgs e)
- {
- try
- {
- if(editingIncludeDir())
- {
- endEditIncludeDir(false);
- }
-
- if(hasUnsavedChanges())
- {
- if(!Util.warnUnsavedChanges(this))
- {
- e.Cancel = true;
- return;
- }
- }
-
- Cursor = Cursors.WaitCursor;
- if(_changed && Util.isSliceBuilderEnabled(_project))
- {
- Util.rebuildProject(_project);
- }
- Cursor = Cursors.Default;
- }
- catch(Exception ex)
- {
- Cursor = Cursors.Default;
- Util.unexpectedExceptionWarning(ex);
- throw;
- }
- }
-
- private void btnCancel_Click(object sender, EventArgs e)
- {
- try
- {
- Close();
- }
- catch(Exception ex)
- {
- Util.unexpectedExceptionWarning(ex);
- throw;
- }
- }
-
- private void component_Changed(object sender, EventArgs e)
- {
- try
- {
- Cursor = Cursors.WaitCursor;
- if(editingIncludeDir())
- {
- endEditIncludeDir(true);
- }
- needSave();
- Cursor = Cursors.Default;
- }
- catch(Exception ex)
- {
- Cursor = Cursors.Default;
- Util.unexpectedExceptionWarning(ex);
- throw;
- }
- }
-
- //
- // Apply unsaved changes, returns true if new settings are all applied correctly,
- // otherwise returns false.
- //
- private bool apply()
- {
- if(!hasUnsavedChanges())
- {
- return true; // Nothing to do.
- }
-
- try
- {
- if(editingIncludeDir())
- {
- endEditIncludeDir(true);
- }
-
- //
- // This must be the first setting to be updated, as other settings cannot be
- // updated if the add-in is disabled.
- //
- if(chkEnableBuilder.Checked && !Util.isSliceBuilderEnabled(_project))
- {
- Util.addBuilderToProject(_project, new ComponentList(Util.getSilverlightNames()));
- _changed = true;
- }
-
- bool changed = false;
- if(!outputDirView.apply(ref changed))
- {
- return false;
- }
- if(changed)
- {
- _changed = true;
- }
-
- if(chkIcePrefix.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix))
- {
- Util.setProjectProperty(_project, Util.PropertyIcePrefix, chkIcePrefix.Checked.ToString());
- _changed = true;
- }
-
- if(comboBoxVerboseLevel.SelectedIndex != Util.getVerboseLevel(_project))
- {
- Util.setProjectProperty(_project, Util.PropertyVerboseLevel,
- comboBoxVerboseLevel.SelectedIndex.ToString(CultureInfo.InvariantCulture));
- _changed = true;
- }
-
- changed = false;
- if(!extraCompilerOptions.apply(ref changed))
- {
- return false;
- }
- if(changed)
- {
- _changed = true;
- }
-
- if(includePathView.apply())
- {
- _changed = true;
- }
-
- //
- // This must be the last setting to be updated, as we want to update
- // all other settings and that isn't possible if the builder is disabled.
- //
- if(!chkEnableBuilder.Checked && Util.isSliceBuilderEnabled(_project))
- {
- Util.removeBuilderFromProject(_project, new ComponentList());
- _initialized = false;
- load();
- _initialized = true;
- _changed = true;
- }
-
- return true;
- }
- finally
- {
- needSave(); // Call needSave to update apply button status
- }
- }
-
- private bool hasUnsavedChanges()
- {
- if(chkEnableBuilder.Checked != Util.isSliceBuilderEnabled(_project))
- {
- return true;
- }
-
- //
- // If the builder is disabled, we are not interested in the other settings
- // to compute changes.
- //
- if(!Util.isSliceBuilderEnabled(_project))
- {
- return false;
- }
-
- if(outputDirView.hasUnsavedChanges())
- {
- return true;
- }
-
- if(chkIcePrefix.Checked != Util.getProjectPropertyAsBool(_project, Util.PropertyIcePrefix))
- {
- return true;
- }
-
- if(comboBoxVerboseLevel.SelectedIndex != Util.getVerboseLevel(_project))
- {
- return true;
- }
-
- if(extraCompilerOptions.hasUnsavedChanges())
- {
- return true;
- }
-
- if(includePathView.hasUnsavedChanges())
- {
- return true;
- }
- return false;
- }
-
- private void btnOk_Click(object sender, EventArgs e)
- {
- try
- {
- Cursor = Cursors.WaitCursor;
- if(apply())
- {
- Close();
- }
- Cursor = Cursors.Default;
- }
- catch(Exception ex)
- {
- Cursor = Cursors.Default;
- Util.unexpectedExceptionWarning(ex);
- throw;
- }
- }
-
- private void btnApply_Click(object sender, EventArgs e)
- {
- try
- {
- Cursor = Cursors.WaitCursor;
- apply();
- Cursor = Cursors.Default;
- }
- catch(Exception ex)
- {
- Cursor = Cursors.Default;
- Util.unexpectedExceptionWarning(ex);
- throw;
- }
- }
-
- private bool _initialized;
- private bool _changed;
- private Project _project;
- }
-}
diff --git a/vsaddin/src/Util.cs b/vsaddin/src/Util.cs
index 2f5f7e6cac0..083b9adc70e 100644
--- a/vsaddin/src/Util.cs
+++ b/vsaddin/src/Util.cs
@@ -294,7 +294,6 @@ namespace Ice.VisualStudio
public const string slice2cs = "slice2cs.exe";
public const string slice2cpp = "slice2cpp.exe";
- public const string slice2sl = "slice2sl.exe";
//
// Property names used to persist project configuration.
@@ -315,7 +314,8 @@ namespace Ice.VisualStudio
private static readonly string[] silverlightNames =
{
- "IceSL"
+ "Glacier2", "Ice", "IceGrid", "IcePatch2",
+ "IceStorm"
};
public static string[] getSilverlightNames()
@@ -356,15 +356,6 @@ namespace Ice.VisualStudio
return (string[])dotNetNames.Clone();
}
- public static string getIceSlHome()
- {
- //
- // For Silverlight projects Ice Home is always set to the value of ICE_SL_HOME
- // environment variable.
- //
- return Environment.ExpandEnvironmentVariables("%ICE_SL_HOME%");
- }
-
public static string getIceHome()
{
string defaultIceHome = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
@@ -473,6 +464,10 @@ namespace Ice.VisualStudio
{
binDir = _csCompactFrameworkBinDirs;
}
+ else if(isSilverlightProject(project))
+ {
+ binDir = _slBinDirs;
+ }
else
{
binDir = _csBinDirs;
@@ -630,6 +625,7 @@ namespace Ice.VisualStudio
private static readonly string _csBinDirs = "\\bin\\";
private static readonly string _csCompactFrameworkBinDirs = "\\bin\\cf\\";
+ private static readonly string _slBinDirs = "\\bin\\sl\\";
public static bool addDotNetReference(Project project, string component, string iceHome, bool development)
{
@@ -643,6 +639,10 @@ namespace Ice.VisualStudio
{
csBinDir = _csCompactFrameworkBinDirs;
}
+ else if (isSilverlightProject(project))
+ {
+ csBinDir = _slBinDirs;
+ }
else
{
csBinDir = _csBinDirs;
@@ -650,7 +650,7 @@ namespace Ice.VisualStudio
string reference = iceHome + csBinDir + component + ".dll";
- if (File.Exists(reference))
+ if(File.Exists(reference))
{
VSLangProj.VSProject vsProject = (VSLangProj.VSProject)project.Object;
try
@@ -2153,6 +2153,10 @@ namespace Ice.VisualStudio
{
componentNames = getDotNetCompactNames();
}
+ else if (Util.isSilverlightProject(project))
+ {
+ componentNames = getSilverlightNames();
+ }
else
{
componentNames = getDotNetNames();
@@ -2568,12 +2572,6 @@ namespace Ice.VisualStudio
string binDir = getCsBinDir(project);
ComponentList components = Util.getIceDotNetComponents(project);
- if(isSilverlightProject(project))
- {
- iceHome = getIceSlHome();
- components = Util.getIceSilverlightComponents(project);
- }
-
foreach(string component in components)
{
if (String.IsNullOrEmpty(component))
@@ -2833,46 +2831,6 @@ namespace Ice.VisualStudio
}
}
- public static bool parseSlice2slOptions(string args, bool showWarning, ref Options opts)
- {
- try
- {
- opts = null;
-
- if(String.IsNullOrEmpty(args))
- {
- return true; //No options to parse
- }
-
- opts = new Options();
- opts.addOpt("h", "help");
- opts.addOpt("v", "version");
- opts.addOpt("D", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
- opts.addOpt("U", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
- opts.addOpt("I", "", Options.ArgType.NeedArg, "", Options.RepeatType.Repeat);
- opts.addOpt("E");
- opts.addOpt("", "output-dir", Options.ArgType.NeedArg);
- opts.addOpt("", "depend");
- opts.addOpt("d", "debug");
- opts.addOpt("", "ice");
- opts.addOpt("", "case-sensitive");
-
- opts.parse(Options.split(args));
-
- checkInvalidOptions(opts);
-
- return true;
- }
- catch(BadOptionException ex)
- {
- if(showWarning)
- {
- showExtraOptionsWarning(ex);
- }
- return false;
- }
- }
-
public static bool parseSlice2csOptions(string args, bool showWarning, ref Options opts)
{
try
diff --git a/vsaddin/src/addin-vs2008.csproj b/vsaddin/src/addin-vs2008.csproj
index 75fb93f0c5e..da095d3ba67 100755
--- a/vsaddin/src/addin-vs2008.csproj
+++ b/vsaddin/src/addin-vs2008.csproj
@@ -2,7 +2,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{DB79C06D-CC17-4B29-B4BE-EAE5C8FED3E5}</ProjectGuid>
<OutputType>Library</OutputType>
@@ -107,12 +107,6 @@
<Compile Include="IceCsharpConfigurationDialog.Designer.cs">
<DependentUpon>IceCsharpConfigurationDialog.cs</DependentUpon>
</Compile>
- <Compile Include="IceSilverlightConfigurationDialog.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="IceSilverlightConfigurationDialog.designer.cs">
- <DependentUpon>IceSilverlightConfigurationDialog.cs</DependentUpon>
- </Compile>
<Compile Include="IncludePathView.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -175,9 +169,6 @@
<EmbeddedResource Include="IceCsharpConfigurationDialog.resx">
<DependentUpon>IceCsharpConfigurationDialog.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="IceSilverlightConfigurationDialog.resx">
- <DependentUpon>IceSilverlightConfigurationDialog.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="IncludePathView.resx">
<DependentUpon>IncludePathView.cs</DependentUpon>
</EmbeddedResource>
diff --git a/vsaddin/src/addin-vs2010.csproj b/vsaddin/src/addin-vs2010.csproj
index 1f01d8eee00..6426060c9ae 100755
--- a/vsaddin/src/addin-vs2010.csproj
+++ b/vsaddin/src/addin-vs2010.csproj
@@ -140,12 +140,6 @@
<Compile Include="IceCsharpConfigurationDialog.Designer.cs">
<DependentUpon>IceCsharpConfigurationDialog.cs</DependentUpon>
</Compile>
- <Compile Include="IceSilverlightConfigurationDialog.cs">
- <SubType>Form</SubType>
- </Compile>
- <Compile Include="IceSilverlightConfigurationDialog.designer.cs">
- <DependentUpon>IceSilverlightConfigurationDialog.cs</DependentUpon>
- </Compile>
<Compile Include="IncludePathView.cs">
<SubType>UserControl</SubType>
</Compile>
@@ -208,9 +202,6 @@
<EmbeddedResource Include="IceCsharpConfigurationDialog.resx">
<DependentUpon>IceCsharpConfigurationDialog.cs</DependentUpon>
</EmbeddedResource>
- <EmbeddedResource Include="IceSilverlightConfigurationDialog.resx">
- <DependentUpon>IceSilverlightConfigurationDialog.cs</DependentUpon>
- </EmbeddedResource>
<EmbeddedResource Include="IncludePathView.resx">
<DependentUpon>IncludePathView.cs</DependentUpon>
</EmbeddedResource>