summaryrefslogtreecommitdiff
path: root/csharp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-05-11 16:51:13 +0200
committerJose <jose@zeroc.com>2016-05-11 16:51:13 +0200
commit20ead35bcd15c258b00da6b1a16d26107f8dea8b (patch)
tree0aa99a82b9d56383c76c372fc1050dfd5493b4e9 /csharp
parentFixed make install issue (diff)
downloadice-20ead35bcd15c258b00da6b1a16d26107f8dea8b.tar.bz2
ice-20ead35bcd15c258b00da6b1a16d26107f8dea8b.tar.xz
ice-20ead35bcd15c258b00da6b1a16d26107f8dea8b.zip
CSharp mapping cleanup
- Remove code support for old ussuported frameworks (SILVERLIGHT, COMPACT, MONO) - Remove code support for deprecated collection mappings clr:collection
Diffstat (limited to 'csharp')
-rw-r--r--csharp/src/Glacier2/Application.cs7
-rw-r--r--csharp/src/Ice/Application.cs11
-rw-r--r--csharp/src/Ice/AssemblyUtil.cs65
-rw-r--r--csharp/src/Ice/AsyncIOThread.cs13
-rw-r--r--csharp/src/Ice/AsyncResult.cs4
-rw-r--r--csharp/src/Ice/BZip2.cs14
-rw-r--r--csharp/src/Ice/ByteBuffer.cs44
-rw-r--r--csharp/src/Ice/CollectionBase.cs450
-rw-r--r--csharp/src/Ice/CollocatedRequestHandler.cs4
-rw-r--r--csharp/src/Ice/ConnectionFactory.cs19
-rw-r--r--csharp/src/Ice/DefaultsAndOverrides.cs5
-rw-r--r--csharp/src/Ice/DictionaryBase.cs355
-rw-r--r--csharp/src/Ice/EndpointHostResolver.cs3
-rw-r--r--csharp/src/Ice/Exception.cs30
-rw-r--r--csharp/src/Ice/HashSet.cs114
-rw-r--r--csharp/src/Ice/HttpParser.cs1
-rw-r--r--csharp/src/Ice/IPEndpointI.cs13
-rw-r--r--csharp/src/Ice/InputStream.cs11
-rw-r--r--csharp/src/Ice/Instance.cs63
-rw-r--r--csharp/src/Ice/LoggerAdminI.cs2
-rw-r--r--csharp/src/Ice/LoggerI.cs9
-rw-r--r--csharp/src/Ice/MetricsAdminI.cs12
-rw-r--r--csharp/src/Ice/MetricsObserverI.cs22
-rw-r--r--csharp/src/Ice/Network.cs175
-rw-r--r--csharp/src/Ice/NetworkProxy.cs25
-rw-r--r--csharp/src/Ice/ObjectAdapterI.cs49
-rw-r--r--csharp/src/Ice/Optional.cs8
-rw-r--r--csharp/src/Ice/Options.cs3
-rw-r--r--csharp/src/Ice/OutgoingAsync.cs10
-rw-r--r--csharp/src/Ice/OutputStream.cs6
-rw-r--r--csharp/src/Ice/Patcher.cs36
-rw-r--r--csharp/src/Ice/PluginManagerI.cs44
-rw-r--r--csharp/src/Ice/PropertiesI.cs11
-rw-r--r--csharp/src/Ice/Protocol.cs1
-rw-r--r--csharp/src/Ice/ProtocolInstance.cs7
-rw-r--r--csharp/src/Ice/Proxy.cs2
-rw-r--r--csharp/src/Ice/Reference.cs1
-rw-r--r--csharp/src/Ice/ReferenceFactory.cs1
-rw-r--r--csharp/src/Ice/RequestHandler.cs3
-rw-r--r--csharp/src/Ice/RequestHandlerFactory.cs1
-rw-r--r--csharp/src/Ice/RouterInfo.cs2
-rw-r--r--csharp/src/Ice/SliceChecksums.cs4
-rw-r--r--csharp/src/Ice/StreamSocket.cs134
-rw-r--r--csharp/src/Ice/StreamWrapper.cs3
-rw-r--r--csharp/src/Ice/SysLoggerI.cs2
-rw-r--r--csharp/src/Ice/TcpAcceptor.cs5
-rw-r--r--csharp/src/Ice/TcpConnector.cs3
-rw-r--r--csharp/src/Ice/TcpEndpointI.cs8
-rw-r--r--csharp/src/Ice/TcpTransceiver.cs2
-rw-r--r--csharp/src/Ice/ThreadPool.cs33
-rw-r--r--csharp/src/Ice/Time.cs75
-rw-r--r--csharp/src/Ice/Timer.cs51
-rw-r--r--csharp/src/Ice/TraceLevels.cs1
-rw-r--r--csharp/src/Ice/TraceUtil.cs1
-rw-r--r--csharp/src/Ice/Transceiver.cs1
-rw-r--r--csharp/src/Ice/UdpConnector.cs3
-rw-r--r--csharp/src/Ice/UdpTransceiver.cs191
-rw-r--r--csharp/src/Ice/UserExceptionFactory.cs19
-rw-r--r--csharp/src/Ice/Util.cs23
-rw-r--r--csharp/src/Ice/ValueWriter.cs1
-rw-r--r--csharp/src/Ice/WSAcceptor.cs2
-rw-r--r--csharp/src/Ice/WSEndpoint.cs1
-rw-r--r--csharp/src/Ice/WSTransceiver.cs10
-rw-r--r--csharp/src/Ice/msbuild/ice.csproj64
-rw-r--r--csharp/src/IceBox/ServiceManagerI.cs4
-rw-r--r--csharp/src/IceSSL/RFC2253.cs2
-rw-r--r--csharp/src/IceSSL/SSLEngine.cs21
-rw-r--r--csharp/src/IceSSL/TransceiverI.cs20
-rw-r--r--csharp/src/IceSSL/TrustManager.cs4
-rw-r--r--csharp/test/Glacier2/router/Client.cs13
-rw-r--r--csharp/test/Glacier2/router/Server.cs9
-rw-r--r--csharp/test/Glacier2/sessionHelper/CallbackI.cs5
-rw-r--r--csharp/test/Glacier2/sessionHelper/Client.cs62
-rw-r--r--csharp/test/Glacier2/sessionHelper/Server.cs1
-rw-r--r--csharp/test/Ice/acm/AllTests.cs26
-rw-r--r--csharp/test/Ice/adapterDeactivation/AllTests.cs23
-rw-r--r--csharp/test/Ice/adapterDeactivation/Collocated.cs2
-rw-r--r--csharp/test/Ice/adapterDeactivation/ServantLocatorI.cs1
-rw-r--r--csharp/test/Ice/adapterDeactivation/Server.cs1
-rw-r--r--csharp/test/Ice/admin/AllTests.cs10
-rw-r--r--csharp/test/Ice/admin/Client.cs2
-rw-r--r--csharp/test/Ice/admin/Server.cs1
-rw-r--r--csharp/test/Ice/ami/AllTests.cs30
-rw-r--r--csharp/test/Ice/ami/Client.cs8
-rw-r--r--csharp/test/Ice/ami/Collocated.cs8
-rw-r--r--csharp/test/Ice/ami/Server.cs7
-rw-r--r--csharp/test/Ice/ami/TestI.cs1
-rw-r--r--csharp/test/Ice/application/Client.cs1
-rw-r--r--csharp/test/Ice/background/Acceptor.cs4
-rw-r--r--csharp/test/Ice/background/BackgroundControllerI.cs5
-rw-r--r--csharp/test/Ice/background/Client.cs3
-rw-r--r--csharp/test/Ice/background/Connector.cs3
-rw-r--r--csharp/test/Ice/background/Server.cs1
-rw-r--r--csharp/test/Ice/binding/AllTests.cs24
-rw-r--r--csharp/test/Ice/binding/Client.cs1
-rw-r--r--csharp/test/Ice/binding/RemoteObjectAdapterI.cs2
-rw-r--r--csharp/test/Ice/binding/Server.cs5
-rw-r--r--csharp/test/Ice/checksum/server/Server.cs1
-rw-r--r--csharp/test/Ice/defaultServant/AllTests.cs2
-rw-r--r--csharp/test/Ice/defaultServant/Client.cs3
-rw-r--r--csharp/test/Ice/defaultServant/MyObjectI.cs1
-rw-r--r--csharp/test/Ice/defaultValue/AllTests.cs19
-rw-r--r--csharp/test/Ice/defaultValue/Client.cs1
-rw-r--r--csharp/test/Ice/dictMapping/AllTests.cs26
-rw-r--r--csharp/test/Ice/dictMapping/Collocated.cs1
-rw-r--r--csharp/test/Ice/dictMapping/MyClassAMDI.cs80
-rw-r--r--csharp/test/Ice/dictMapping/MyClassI.cs102
-rw-r--r--csharp/test/Ice/dictMapping/Server.cs3
-rw-r--r--csharp/test/Ice/dictMapping/Test.ice44
-rw-r--r--csharp/test/Ice/dictMapping/TestAMD.ice44
-rw-r--r--csharp/test/Ice/dictMapping/Twoways.cs290
-rw-r--r--csharp/test/Ice/dictMapping/TwowaysAMI.cs408
-rw-r--r--csharp/test/Ice/dispatcher/AllTests.cs29
-rw-r--r--csharp/test/Ice/dispatcher/Client.cs5
-rw-r--r--csharp/test/Ice/dispatcher/Collocated.cs7
-rw-r--r--csharp/test/Ice/dispatcher/Dispatcher.cs20
-rw-r--r--csharp/test/Ice/dispatcher/Server.cs1
-rw-r--r--csharp/test/Ice/echo/BlobjectI.cs4
-rw-r--r--csharp/test/Ice/echo/Server.cs3
-rw-r--r--csharp/test/Ice/enums/AllTests.cs18
-rw-r--r--csharp/test/Ice/enums/Client.cs4
-rw-r--r--csharp/test/Ice/enums/Server.cs8
-rw-r--r--csharp/test/Ice/exceptions/AllTests.cs42
-rw-r--r--csharp/test/Ice/exceptions/Client.cs14
-rw-r--r--csharp/test/Ice/exceptions/Collocated.cs15
-rw-r--r--csharp/test/Ice/exceptions/Server.cs1
-rw-r--r--csharp/test/Ice/exceptions/ThrowerAMDI.cs7
-rw-r--r--csharp/test/Ice/exceptions/ThrowerI.cs2
-rw-r--r--csharp/test/Ice/facets/AllTests.cs26
-rw-r--r--csharp/test/Ice/facets/Client.cs7
-rw-r--r--csharp/test/Ice/facets/Collocated.cs1
-rw-r--r--csharp/test/Ice/facets/Server.cs1
-rw-r--r--csharp/test/Ice/faultTolerance/AllTests.cs38
-rw-r--r--csharp/test/Ice/faultTolerance/Client.cs17
-rw-r--r--csharp/test/Ice/faultTolerance/Server.cs21
-rw-r--r--csharp/test/Ice/faultTolerance/TestI.cs4
-rw-r--r--csharp/test/Ice/hash/Client.cs31
-rw-r--r--csharp/test/Ice/hold/AllTests.cs17
-rw-r--r--csharp/test/Ice/hold/Client.cs8
-rw-r--r--csharp/test/Ice/hold/HoldI.cs2
-rw-r--r--csharp/test/Ice/hold/Server.cs7
-rw-r--r--csharp/test/Ice/hold/Timer.cs20
-rw-r--r--csharp/test/Ice/info/AllTests.cs52
-rw-r--r--csharp/test/Ice/info/Client.cs7
-rw-r--r--csharp/test/Ice/info/Server.cs3
-rw-r--r--csharp/test/Ice/inheritance/AllTests.cs26
-rw-r--r--csharp/test/Ice/inheritance/Client.cs15
-rw-r--r--csharp/test/Ice/inheritance/Server.cs7
-rw-r--r--csharp/test/Ice/interceptor/AMDInterceptorI.cs8
-rw-r--r--csharp/test/Ice/interceptor/Client.cs9
-rw-r--r--csharp/test/Ice/interceptor/InterceptorI.cs2
-rw-r--r--csharp/test/Ice/interceptor/MyObjectI.cs1
-rw-r--r--csharp/test/Ice/invoke/AllTests.cs30
-rw-r--r--csharp/test/Ice/invoke/Client.cs10
-rw-r--r--csharp/test/Ice/invoke/Server.cs3
-rw-r--r--csharp/test/Ice/location/AllTests.cs22
-rw-r--r--csharp/test/Ice/location/Client.cs7
-rw-r--r--csharp/test/Ice/location/Server.cs7
-rw-r--r--csharp/test/Ice/metrics/AllTests.cs40
-rw-r--r--csharp/test/Ice/metrics/Client.cs14
-rw-r--r--csharp/test/Ice/metrics/Collocated.cs13
-rw-r--r--csharp/test/Ice/metrics/InstrumentationI.cs2
-rw-r--r--csharp/test/Ice/metrics/MetricsAMDI.cs1
-rw-r--r--csharp/test/Ice/metrics/Server.cs6
-rw-r--r--csharp/test/Ice/networkProxy/AllTests.cs20
-rw-r--r--csharp/test/Ice/networkProxy/Client.cs3
-rw-r--r--csharp/test/Ice/networkProxy/Server.cs3
-rw-r--r--csharp/test/Ice/objects/AllTests.cs21
-rw-r--r--csharp/test/Ice/objects/Client.cs15
-rw-r--r--csharp/test/Ice/objects/Collocated.cs16
-rw-r--r--csharp/test/Ice/objects/Server.cs14
-rw-r--r--csharp/test/Ice/operations/AllTests.cs30
-rw-r--r--csharp/test/Ice/operations/BatchOneways.cs2
-rw-r--r--csharp/test/Ice/operations/BatchOnewaysAMI.cs2
-rw-r--r--csharp/test/Ice/operations/Client.cs3
-rw-r--r--csharp/test/Ice/operations/Collocated.cs5
-rw-r--r--csharp/test/Ice/operations/MyDerivedClassAMDI.cs3
-rw-r--r--csharp/test/Ice/operations/MyDerivedClassAMDTieI.cs2
-rw-r--r--csharp/test/Ice/operations/OnewaysAMI.cs15
-rw-r--r--csharp/test/Ice/operations/Server.cs3
-rw-r--r--csharp/test/Ice/operations/Twoways.cs4
-rw-r--r--csharp/test/Ice/operations/TwowaysAMI.cs6
-rw-r--r--csharp/test/Ice/optional/AllTests.cs44
-rw-r--r--csharp/test/Ice/optional/Client.cs9
-rw-r--r--csharp/test/Ice/optional/SerializableClass.cs4
-rw-r--r--csharp/test/Ice/optional/Server.cs10
-rw-r--r--csharp/test/Ice/optional/ServerAMD.cs11
-rw-r--r--csharp/test/Ice/optional/TestAMDI.cs13
-rw-r--r--csharp/test/Ice/optional/TestI.cs13
-rw-r--r--csharp/test/Ice/plugin/BasePlugin.cs2
-rw-r--r--csharp/test/Ice/plugin/BasePluginFail.cs2
-rw-r--r--csharp/test/Ice/plugin/Client.cs4
-rw-r--r--csharp/test/Ice/properties/Client.cs15
-rw-r--r--csharp/test/Ice/proxy/AllTests.cs34
-rw-r--r--csharp/test/Ice/proxy/Client.cs5
-rw-r--r--csharp/test/Ice/proxy/Collocated.cs3
-rw-r--r--csharp/test/Ice/proxy/MyDerivedClassAMDI.cs1
-rw-r--r--csharp/test/Ice/proxy/MyDerivedClassI.cs1
-rw-r--r--csharp/test/Ice/proxy/Server.cs3
-rw-r--r--csharp/test/Ice/retry/AllTests.cs53
-rw-r--r--csharp/test/Ice/retry/Client.cs3
-rw-r--r--csharp/test/Ice/retry/Collocated.cs3
-rw-r--r--csharp/test/Ice/retry/RetryI.cs2
-rw-r--r--csharp/test/Ice/retry/Server.cs3
-rw-r--r--csharp/test/Ice/retry/SystemFailure.cs3
-rw-r--r--csharp/test/Ice/seqMapping/AllTests.cs26
-rw-r--r--csharp/test/Ice/seqMapping/Client.cs11
-rw-r--r--csharp/test/Ice/seqMapping/Collocated.cs11
-rw-r--r--csharp/test/Ice/seqMapping/Custom.cs3
-rw-r--r--csharp/test/Ice/seqMapping/MyClassAMDI.cs80
-rw-r--r--csharp/test/Ice/seqMapping/MyClassI.cs97
-rw-r--r--csharp/test/Ice/seqMapping/Serializable.cs3
-rw-r--r--csharp/test/Ice/seqMapping/Server.cs11
-rw-r--r--csharp/test/Ice/seqMapping/ServerAMD.cs11
-rw-r--r--csharp/test/Ice/seqMapping/Test.ice40
-rw-r--r--csharp/test/Ice/seqMapping/TestAMD.ice32
-rw-r--r--csharp/test/Ice/seqMapping/Twoways.cs263
-rw-r--r--csharp/test/Ice/seqMapping/TwowaysAMI.cs366
-rw-r--r--csharp/test/Ice/serialize/AllTests.cs26
-rw-r--r--csharp/test/Ice/serialize/Client.cs13
-rw-r--r--csharp/test/Ice/serialize/Test.ice6
-rw-r--r--csharp/test/Ice/servantLocator/AllTests.cs21
-rw-r--r--csharp/test/Ice/servantLocator/Client.cs10
-rw-r--r--csharp/test/Ice/servantLocator/Collocated.cs10
-rw-r--r--csharp/test/Ice/servantLocator/ServantLocatorI.cs2
-rw-r--r--csharp/test/Ice/servantLocator/Server.cs1
-rw-r--r--csharp/test/Ice/slicing/exceptions/AllTests.cs30
-rw-r--r--csharp/test/Ice/slicing/exceptions/Client.cs16
-rw-r--r--csharp/test/Ice/slicing/exceptions/Server.cs16
-rw-r--r--csharp/test/Ice/slicing/exceptions/ServerAMD.cs16
-rw-r--r--csharp/test/Ice/slicing/objects/AllTests.cs55
-rw-r--r--csharp/test/Ice/slicing/objects/Client.cs16
-rw-r--r--csharp/test/Ice/slicing/objects/Server.cs16
-rw-r--r--csharp/test/Ice/slicing/objects/ServerAMD.cs16
-rw-r--r--csharp/test/Ice/slicing/objects/Test.ice2
-rw-r--r--csharp/test/Ice/slicing/objects/TestAMD.ice2
-rw-r--r--csharp/test/Ice/stream/AllTests.cs153
-rw-r--r--csharp/test/Ice/stream/Client.cs13
-rw-r--r--csharp/test/Ice/stream/Test.ice27
-rw-r--r--csharp/test/Ice/threadPoolPriority/Client.cs4
-rw-r--r--csharp/test/Ice/threadPoolPriority/Server.cs3
-rw-r--r--csharp/test/Ice/timeout/AllTests.cs42
-rw-r--r--csharp/test/Ice/timeout/Client.cs3
-rw-r--r--csharp/test/Ice/timeout/Server.cs3
-rw-r--r--csharp/test/Ice/timeout/TimeoutI.cs1
-rw-r--r--csharp/test/Ice/udp/Client.cs11
-rw-r--r--csharp/test/Ice/udp/Server.cs11
-rw-r--r--csharp/test/IceBox/admin/AllTests.cs1
-rw-r--r--csharp/test/IceBox/admin/Client.cs5
-rw-r--r--csharp/test/IceBox/configuration/Client.cs8
-rw-r--r--csharp/test/IceDiscovery/simple/AllTests.cs1
-rw-r--r--csharp/test/IceDiscovery/simple/Client.cs11
-rw-r--r--csharp/test/IceDiscovery/simple/Server.cs11
-rw-r--r--csharp/test/IceGrid/simple/AllTests.cs7
-rw-r--r--csharp/test/IceGrid/simple/Client.cs8
-rw-r--r--csharp/test/IceGrid/simple/Server.cs1
-rw-r--r--csharp/test/IceGrid/simple/TestI.cs5
-rw-r--r--csharp/test/IceSSL/configuration/Client.cs3
-rw-r--r--csharp/test/IceSSL/configuration/Server.cs3
-rw-r--r--csharp/test/IceUtil/inputUtil/Client.cs13
-rw-r--r--csharp/test/Slice/keyword/Client.cs4
-rw-r--r--csharp/test/Slice/keyword/Key.ice13
-rw-r--r--csharp/test/Slice/structure/Client.cs15
-rw-r--r--csharp/test/Slice/structure/Test.ice2
-rw-r--r--csharp/test/TestCommon/TestApp.cs124
265 files changed, 400 insertions, 6035 deletions
diff --git a/csharp/src/Glacier2/Application.cs b/csharp/src/Glacier2/Application.cs
index 6b91325a181..dd7caf4f806 100644
--- a/csharp/src/Glacier2/Application.cs
+++ b/csharp/src/Glacier2/Application.cs
@@ -9,10 +9,6 @@
using System;
using System.Diagnostics;
-using System.Collections.Generic;
-using System.Threading;
-
-#if !SILVERLIGHT
namespace Glacier2
{
@@ -32,7 +28,7 @@ public abstract class Application : Ice.Application
/// <summary>
/// This exception is raised if the session should be restarted.
/// </summary>
- public class RestartSessionException : System.Exception
+ public class RestartSessionException : Exception
{
}
@@ -454,4 +450,3 @@ public abstract class Application : Ice.Application
}
}
-#endif
diff --git a/csharp/src/Ice/Application.cs b/csharp/src/Ice/Application.cs
index 791d5670851..b41ba4e8996 100644
--- a/csharp/src/Ice/Application.cs
+++ b/csharp/src/Ice/Application.cs
@@ -7,8 +7,6 @@
//
// **********************************************************************
-#if !SILVERLIGHT
-
namespace Ice
{
using System;
@@ -20,7 +18,6 @@ namespace Ice
internal static class NativeMethods
{
-#if !COMPACT && !UNITY
//
// Technically it's not necessary to wrap DllImport in conditional compilation because
// the binding occurs at run time and it will never be executed on Mono. However, it
@@ -30,7 +27,6 @@ namespace Ice
[return: MarshalAsAttribute(UnmanagedType.Bool)]
internal static extern bool
SetConsoleCtrlHandler(CtrlCEventHandler eh, [MarshalAsAttribute(UnmanagedType.Bool)]bool add);
-#endif
}
/// <summary>
@@ -224,9 +220,6 @@ namespace Ice
_application = this;
int status;
-#if COMPACT || UNITY
- status = doMain(args, initData);
-#else
if(signalPolicy__ == SignalPolicy.HandleSignals)
{
if(IceInternal.AssemblyUtil.platform_ == IceInternal.AssemblyUtil.Platform.Windows)
@@ -248,7 +241,6 @@ namespace Ice
{
status = doMain(args, initData);
}
-#endif
return status;
}
@@ -749,7 +741,6 @@ namespace Ice
private delegate void SignalHandler(int sig);
private static readonly SignalHandler _handler = new SignalHandler(signalHandler);
-#if !COMPACT && !UNITY
private Signals _signals;
private interface Signals
@@ -928,9 +919,7 @@ namespace Ice
#endif
private SignalHandler _handler;
}
-#endif
}
delegate bool CtrlCEventHandler(int sig);
}
-#endif
diff --git a/csharp/src/Ice/AssemblyUtil.cs b/csharp/src/Ice/AssemblyUtil.cs
index 454fde42b1b..9eb8805235a 100644
--- a/csharp/src/Ice/AssemblyUtil.cs
+++ b/csharp/src/Ice/AssemblyUtil.cs
@@ -13,9 +13,7 @@ namespace IceInternal
using System;
using System.Collections;
using System.Collections.Generic;
- using System.Diagnostics;
using System.Reflection;
- using System.Threading;
public sealed class AssemblyUtil
{
@@ -53,34 +51,8 @@ namespace IceInternal
runtimeRevision_ = v.Revision;
v = System.Environment.OSVersion.Version;
- xp_ = v.Major == 5 && v.Minor == 1; // Are we running on XP?
osx_ = false;
-#if COMPACT || SILVERLIGHT
- //
- // Populate the _iceAssemblies list with the fully-qualified names
- // of the standard Ice assemblies. The fully-qualified name looks
- // like this:
- //
- // Ice, Version=X.Y.Z.0, Culture=neutral, PublicKeyToken=...
- //
- string name = Assembly.GetExecutingAssembly().FullName;
- _iceAssemblies.Add(name);
- int pos = name.IndexOf(',');
- if(pos >= 0 && pos < name.Length - 1)
- {
- //
- // Strip off the leading assembly name and use the remainder of the
- // string to compose the names of the other standard assemblies.
- //
- string suffix = name.Substring(pos + 1);
- _iceAssemblies.Add("Glacier2," + suffix);
- _iceAssemblies.Add("IceBox," + suffix);
- _iceAssemblies.Add("IceGrid," + suffix);
- _iceAssemblies.Add("IcePatch2," + suffix);
- _iceAssemblies.Add("IceStorm," + suffix);
- }
-#elif !UNITY
if (platform_ == Platform.NonWindows)
{
try
@@ -107,7 +79,6 @@ namespace IceInternal
{
}
}
-#endif
}
public static Type findType(Instance instance, string csharpId)
@@ -119,33 +90,7 @@ namespace IceInternal
{
return t;
}
-#if COMPACT || SILVERLIGHT
- string[] assemblies = instance.factoryAssemblies();
- for(int i = 0; i < assemblies.Length; ++i)
- {
- string s = csharpId + "," + assemblies[i];
- if((t = Type.GetType(s)) != null)
- {
- _typeTable[csharpId] = t;
- return t;
- }
- }
- //
- // As a last resort, look for the type in the standard Ice assemblies.
- // This avoids the need for a program to set a property such as:
- //
- // Ice.FactoryAssemblies=Ice
- //
- foreach(string a in _iceAssemblies)
- {
- string s = csharpId + "," + a;
- if((t = Type.GetType(s)) != null)
- {
- _typeTable[csharpId] = t;
- return t;
- }
- }
-#else
+
loadAssemblies(); // Lazy initialization
foreach (Assembly a in _loadedAssemblies.Values)
{
@@ -155,12 +100,10 @@ namespace IceInternal
return t;
}
}
-#endif
}
return null;
}
-#if !COMPACT && !SILVERLIGHT
public static Type[] findTypesWithPrefix(string prefix)
{
LinkedList<Type> l = new LinkedList<Type>();
@@ -188,7 +131,6 @@ namespace IceInternal
}
return result;
}
-#endif
public static object createInstance(Type t)
{
@@ -202,7 +144,6 @@ namespace IceInternal
}
}
-#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
@@ -264,9 +205,6 @@ namespace IceInternal
}
private static Hashtable _loadedAssemblies = new Hashtable(); // <string, Assembly> pairs.
-#else
- private static List<string> _iceAssemblies = new List<string>();
-#endif
private static Dictionary<string, Type> _typeTable = new Dictionary<string, Type>(); // <type name, Type> pairs.
private static object _mutex = new object();
@@ -281,7 +219,6 @@ namespace IceInternal
public readonly static int runtimeRevision_;
public readonly static Platform platform_;
- public readonly static bool xp_;
public readonly static bool osx_;
}
diff --git a/csharp/src/Ice/AsyncIOThread.cs b/csharp/src/Ice/AsyncIOThread.cs
index 9aa8bec52c3..0d9db92604f 100644
--- a/csharp/src/Ice/AsyncIOThread.cs
+++ b/csharp/src/Ice/AsyncIOThread.cs
@@ -9,10 +9,8 @@
namespace IceInternal
{
- using System;
using System.Collections.Generic;
using System.Diagnostics;
- using System.Net;
using System.Threading;
public class AsyncIOThread
@@ -23,7 +21,6 @@ namespace IceInternal
_thread = new HelperThread(this);
updateObserver();
-#if !SILVERLIGHT
if(instance.initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
{
ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
@@ -34,9 +31,6 @@ namespace IceInternal
{
_thread.Start(ThreadPriority.Normal);
}
-#else
- _thread.Start();
-#endif
}
public void
@@ -178,18 +172,11 @@ namespace IceInternal
return _name;
}
-#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/csharp/src/Ice/AsyncResult.cs b/csharp/src/Ice/AsyncResult.cs
index 42e8f78608d..5fad90abb05 100644
--- a/csharp/src/Ice/AsyncResult.cs
+++ b/csharp/src/Ice/AsyncResult.cs
@@ -205,11 +205,7 @@ namespace IceInternal
{
if(_waitHandle == null)
{
-#if SILVERLIGHT
- _waitHandle = new ManualResetEvent(false);
-#else
_waitHandle = new EventWaitHandle(false, EventResetMode.ManualReset);
-#endif
}
if((state_ & StateDone) != 0)
{
diff --git a/csharp/src/Ice/BZip2.cs b/csharp/src/Ice/BZip2.cs
index ffa26f967b0..79e8020663d 100644
--- a/csharp/src/Ice/BZip2.cs
+++ b/csharp/src/Ice/BZip2.cs
@@ -12,13 +12,9 @@ namespace IceInternal
using System;
using System.Diagnostics;
-#if !COMPACT && !SILVERLIGHT
using System.Runtime.InteropServices;
- using System.Runtime.Serialization;
- using System.Runtime.Serialization.Formatters.Binary;
-#endif
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
internal static class NativeMethods
{
[DllImport("bzip2.dll")]
@@ -47,7 +43,7 @@ namespace IceInternal
{
static BZip2()
{
-#if MANAGED || COMPACT || SILVERLIGHT
+#if MANAGED
//
// Protocol compression is not supported when using managed code.
//
@@ -94,7 +90,7 @@ namespace IceInternal
#endif
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
static string getBZ2Error(int error)
{
string rc;
@@ -165,7 +161,7 @@ namespace IceInternal
{
Debug.Assert(supported());
-#if MANAGED || COMPACT || SILVERLIGHT
+#if MANAGED
return null;
#else
//
@@ -227,7 +223,7 @@ namespace IceInternal
{
Debug.Assert(supported());
-#if MANAGED || COMPACT || SILVERLIGHT
+#if MANAGED
return null;
#else
buf.b.position(headerSize);
diff --git a/csharp/src/Ice/ByteBuffer.cs b/csharp/src/Ice/ByteBuffer.cs
index 8112a6149bc..0dd59e20ed4 100644
--- a/csharp/src/Ice/ByteBuffer.cs
+++ b/csharp/src/Ice/ByteBuffer.cs
@@ -323,7 +323,7 @@ namespace IceInternal
return v;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public short getShort(int pos)
@@ -331,7 +331,7 @@ namespace IceInternal
checkUnderflow(pos, 2);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[pos])
{
_valBytes.shortVal = *((short*)p);
@@ -370,7 +370,7 @@ namespace IceInternal
_position += len;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public ByteBuffer putShort(short val)
@@ -379,7 +379,7 @@ namespace IceInternal
_valBytes.shortVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[_position])
{
*((short*)p) = _valBytes.shortVal;
@@ -420,7 +420,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public int getInt()
@@ -428,7 +428,7 @@ namespace IceInternal
checkUnderflow(4);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[_position])
{
_valBytes.intVal = *((int*)p);
@@ -481,7 +481,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public ByteBuffer putInt(int pos, int val)
@@ -497,7 +497,7 @@ namespace IceInternal
_valBytes.intVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[pos])
{
*((int*)p) = _valBytes.intVal;
@@ -550,7 +550,7 @@ namespace IceInternal
return v;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public long getLong(int pos)
@@ -558,7 +558,7 @@ namespace IceInternal
checkUnderflow(pos, 8);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[pos])
{
_valBytes.longVal = *((long*)p);
@@ -615,7 +615,7 @@ namespace IceInternal
_position += len;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public ByteBuffer putLong(long val)
@@ -624,7 +624,7 @@ namespace IceInternal
_valBytes.longVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[_position])
{
*((long*)p) = _valBytes.longVal;
@@ -683,7 +683,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public float getFloat()
@@ -691,7 +691,7 @@ namespace IceInternal
checkUnderflow(4);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[_position])
{
_valBytes.floatVal = *((float*)p);
@@ -737,7 +737,7 @@ namespace IceInternal
_position += len;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public ByteBuffer putFloat(float val)
@@ -746,7 +746,7 @@ namespace IceInternal
_valBytes.floatVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[_position])
{
*((float*)p) = _valBytes.floatVal;
@@ -793,7 +793,7 @@ namespace IceInternal
return this;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public double getDouble()
@@ -801,7 +801,7 @@ namespace IceInternal
checkUnderflow(8);
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[_position])
{
_valBytes.doubleVal = *((double*)p);
@@ -859,7 +859,7 @@ namespace IceInternal
_position += len;
}
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
unsafe
#endif
public ByteBuffer putDouble(double val)
@@ -868,7 +868,7 @@ namespace IceInternal
_valBytes.doubleVal = val;
if(NO._o == _order)
{
-#if !MANAGED && !COMPACT && !SILVERLIGHT
+#if !MANAGED
fixed(byte* p = &_bytes[_position])
{
*((double*)p) = _valBytes.doubleVal;
@@ -989,11 +989,7 @@ namespace IceInternal
private static void throwOutOfRange(string param, object value, string message)
{
-#if COMPACT || SILVERLIGHT
- throw new ArgumentOutOfRangeException(param, message);
-#else
throw new ArgumentOutOfRangeException(param, value, message);
-#endif
}
}
}
diff --git a/csharp/src/Ice/CollectionBase.cs b/csharp/src/Ice/CollectionBase.cs
deleted file mode 100644
index df1ae7b1038..00000000000
--- a/csharp/src/Ice/CollectionBase.cs
+++ /dev/null
@@ -1,450 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 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;
-
-namespace IceInternal
-{
-#if !SILVERLIGHT
- [Serializable]
-#endif
- public abstract class CollectionBase<T> : System.Collections.IList
- {
- protected List<T> list_;
-
- public CollectionBase()
- {
- list_ = new List<T>();
- }
-
- public CollectionBase(int capacity)
- {
- list_ = new List<T>(capacity);
- }
-
- public CollectionBase(T[] a)
- {
- if(a == null)
- {
- throw new ArgumentNullException("a", "Cannot construct collection from null array");
- }
-
- list_ = new List<T>(a.Length);
- list_.AddRange(a);
- }
-
- public CollectionBase(IEnumerable<T> l)
- {
- if(l == null)
- {
- throw new ArgumentNullException("l", "Cannot construct collection from null collection");
- }
-
- list_ = new List<T>();
- list_.AddRange(l);
- }
-
- public static implicit operator List<T>(CollectionBase<T> l)
- {
- return l.list_;
- }
-
-
- public void CopyTo(T[] a__)
- {
- list_.CopyTo(a__);
- }
-
- public void CopyTo(T[] a__, int i__)
- {
- list_.CopyTo(a__, i__);
- }
-
- public void CopyTo(int i__, T[] a__, int ai__, int _c_)
- {
- list_.CopyTo(i__, a__, ai__, _c_);
- }
-
- public T[] ToArray()
- {
- return list_.ToArray();
- }
-
- public virtual void TrimToSize()
- {
- list_.TrimExcess();
- }
-
- public virtual void Sort()
- {
- list_.Sort();
- }
-
- public virtual void Sort(System.Collections.IComparer comparer)
- {
- list_.Sort(new Comparer(comparer));
- }
-
- public virtual void Sort(int index, int count, System.Collections.IComparer comparer)
- {
- list_.Sort(index, count, new Comparer(comparer));
- }
-
- public virtual void Reverse()
- {
- list_.Reverse();
- }
-
- public virtual void Reverse(int index, int count)
- {
- list_.Reverse(index, count);
- }
-
- public virtual int BinarySearch(T value)
- {
- return list_.BinarySearch(value);
- }
-
- public virtual int BinarySearch(T value, System.Collections.IComparer comparer)
- {
- return list_.BinarySearch(value, new Comparer(comparer));
- }
-
- public virtual int BinarySearch(int index, int count, T value, System.Collections.IComparer comparer)
- {
- return list_.BinarySearch(index, count, value, new Comparer(comparer));
- }
-
- public virtual void InsertRange(int index, CollectionBase<T> c)
- {
- list_.InsertRange(index, c.list_);
- }
-
- public virtual void InsertRange(int index, T[] c)
- {
- list_.InsertRange(index, c);
- }
-
- public virtual void RemoveRange(int index, int count)
- {
- list_.RemoveRange(index, count);
- }
-
- public virtual void SetRange(int index, CollectionBase<T> c)
- {
- if(c == null)
- {
- throw new ArgumentNullException("c", "Collection must not be null for SetRange()");
- }
- if(index < 0 || index + c.Count > list_.Count)
- {
- throw new ArgumentOutOfRangeException("index", "Index out of range");
- }
- for(int i = index; i < list_.Count; ++i)
- {
- list_[i] = c[i - index];
- }
- }
-
- public virtual void SetRange(int index, T[] c)
- {
- if(c == null)
- {
- throw new ArgumentNullException("c", "Collection must not be null for SetRange()");
- }
- if(index < 0 || index + c.Length > list_.Count)
- {
- throw new ArgumentOutOfRangeException("index", "Index out of range");
- }
- for(int i = index; i < list_.Count; ++i)
- {
- list_[i] = c[i - index];
- }
- }
-
- public virtual int LastIndexOf(T value)
- {
- return list_.LastIndexOf(value);
- }
-
- public virtual int LastIndexOf(T value, int startIndex)
- {
- return list_.LastIndexOf(value, startIndex);
- }
-
- public virtual int LastIndexOf(T value, int startIndex, int count)
- {
- return list_.LastIndexOf(value, startIndex, count);
- }
-
- public void AddRange(CollectionBase<T> s__)
- {
- list_.AddRange(s__.list_);
- }
-
- public void AddRange(T[] a__)
- {
- list_.AddRange(a__);
- }
-
- public int Capacity
- {
- get
- {
- return list_.Capacity;
- }
-
- set
- {
- list_.Capacity = value;
- }
- }
-
- public int Count
- {
- get
- {
- return list_.Count;
- }
- }
-
- System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
- {
- return list_.GetEnumerator();
- }
-
- public IEnumerator<T> GetEnumerator()
- {
- return list_.GetEnumerator();
- }
-
- public void RemoveAt(int index)
- {
- list_.RemoveAt(index);
- }
-
- public int Add(T value)
- {
- list_.Add(value);
- return list_.Count - 1;
- }
-
- public void Clear()
- {
- list_.Clear();
- }
-
- public bool IsFixedSize
- {
- get
- {
- return false;
- }
- }
-
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- public int IndexOf(T value)
- {
- return list_.IndexOf(value);
- }
-
- public void Insert(int index, T value)
- {
- list_.Insert(index, value);
- }
-
- public void Remove(T value)
- {
- list_.Remove(value);
- }
-
- public bool Contains(T value)
- {
- return list_.Contains(value);
- }
-
- public bool IsSynchronized
- {
- get
- {
- return false;
- }
- }
-
- public object SyncRoot
- {
- get
- {
- return this;
- }
- }
-
- public T this[int index]
- {
- get
- {
- return list_[index];
- }
- set
- {
- list_[index] = value;
- }
- }
-
- public override int GetHashCode()
- {
- int h = 5381;
- for(int i = 0; i < Count; ++i)
- {
- T v__ = list_[i];
- IceInternal.HashUtil.hashAdd(ref h, v__);
- }
- return h;
- }
-
- public override bool Equals(object other)
- {
- if(object.ReferenceEquals(this, other))
- {
- return true;
- }
- try
- {
- CollectionBase<T> c = (CollectionBase<T>)other;
- if(list_.Count != c.list_.Count)
- {
- return false;
- }
- if(list_.Count == 0)
- {
- return true;
- }
- for(int i = 0; i < list_.Count; ++i)
- {
- if(!Equals(list_[i], c.list_[i]))
- {
- return false;
- }
- }
- }
- catch(System.Exception)
- {
- return false;
- }
-
- return true;
- }
-
- public static bool operator==(CollectionBase<T> lhs__, CollectionBase<T> rhs__)
- {
- return Equals(lhs__, rhs__);
- }
-
- public static bool operator!=(CollectionBase<T> lhs__, CollectionBase<T> rhs__)
- {
- return !Equals(lhs__, rhs__);
- }
-
- private class Comparer : IComparer<T>
- {
- private System.Collections.IComparer _c;
-
- public Comparer(System.Collections.IComparer c)
- {
- _c = c;
- }
-
- public virtual int Compare(T l, T r)
- {
- return _c.Compare(l, r);
- }
- }
-
- public int Add(object o)
- {
- checkType(o);
- return Add((T)o);
- }
-
- public bool Contains(object o)
- {
- checkType(o);
- return Contains((T)o);
- }
-
- public int IndexOf(object o)
- {
- checkType(o);
- return IndexOf((T)o);
- }
-
- public void Insert(int i, object o)
- {
- checkType(o);
- Insert(i, (T)o);
- }
-
- public void Remove(object o)
- {
- checkType(o);
- Remove((T)o);
- }
-
- object System.Collections.IList.this[int index]
- {
- get
- {
- return this[index];
- }
- set
- {
- checkType(value);
- this[index] = (T)value;
- }
- }
-
- public void CopyTo(Array a, int index)
- {
- Type t = a.GetType().GetElementType();
- if(!t.IsAssignableFrom(typeof(T)))
- {
- throw new ArgumentException("a__", "Cannot assign " + typeof(T).ToString() + " to array of "
- + t.ToString());
- }
- CopyTo((T[])a, index);
- }
-
- private void checkType(object o)
- {
-
- if(o != null && !(o is T))
- {
- throw new ArgumentException("Cannot use an object of type " + o.GetType().ToString()
- + " with a collection of " + typeof(T).ToString());
- }
- }
- }
-
-}
-
-namespace Ice
-{
- [Obsolete("This class is deprecated.")]
- public abstract class CollectionBase<T> : IceInternal.CollectionBase<T>
- {
- }
-}
diff --git a/csharp/src/Ice/CollocatedRequestHandler.cs b/csharp/src/Ice/CollocatedRequestHandler.cs
index b08e8626b9b..9e8ce8b777d 100644
--- a/csharp/src/Ice/CollocatedRequestHandler.cs
+++ b/csharp/src/Ice/CollocatedRequestHandler.cs
@@ -191,10 +191,10 @@ namespace IceInternal
_sendAsyncRequests.Add(outAsync, requestId);
}
}
- catch(System.Exception ex)
+ catch(System.Exception)
{
_adapter.decDirectCount();
- throw ex;
+ throw;
}
outAsync.attachCollocatedObserver(_adapter, requestId);
diff --git a/csharp/src/Ice/ConnectionFactory.cs b/csharp/src/Ice/ConnectionFactory.cs
index 8c56a2fbab3..d68b7e808c1 100644
--- a/csharp/src/Ice/ConnectionFactory.cs
+++ b/csharp/src/Ice/ConnectionFactory.cs
@@ -11,13 +11,9 @@ namespace IceInternal
{
using System;
- using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
- using System.Net.Sockets;
- using System.Threading;
using System.Text;
- using IceUtilInternal;
public class MultiDictionary<K, V> : Dictionary<K, ICollection<V>>
{
@@ -28,7 +24,7 @@ namespace IceInternal
if(!this.TryGetValue(key, out list))
{
list = new List<V>();
- this.Add(key, list);
+ Add(key, list);
}
list.Add(value);
}
@@ -40,7 +36,7 @@ namespace IceInternal
list.Remove(value);
if(list.Count == 0)
{
- this.Remove(key);
+ Remove(key);
}
}
}
@@ -148,7 +144,6 @@ namespace IceInternal
}
}
-
public void create(EndpointI[] endpts, bool hasMore, Ice.EndpointSelectionType selType,
CreateConnectionCallback callback)
{
@@ -1303,9 +1298,7 @@ namespace IceInternal
}
finally
{
-#if !COMPACT && !SILVERLIGHT
System.Environment.FailFast(s);
-#endif
}
return false;
}
@@ -1329,9 +1322,7 @@ namespace IceInternal
}
finally
{
-#if !COMPACT && !SILVERLIGHT
System.Environment.FailFast(s);
-#endif
}
return false;
}
@@ -1409,9 +1400,7 @@ namespace IceInternal
}
finally
{
-#if !COMPACT && !SILVERLIGHT
System.Environment.FailFast(s);
-#endif
}
}
@@ -1725,13 +1714,13 @@ namespace IceInternal
_adapter.getThreadPool().unregister(this, SocketOperation.Read);
}
}
- catch(SystemException ex)
+ catch(SystemException)
{
if(_acceptor != null)
{
_acceptor.close();
}
- throw ex;
+ throw;
}
}
diff --git a/csharp/src/Ice/DefaultsAndOverrides.cs b/csharp/src/Ice/DefaultsAndOverrides.cs
index 573e0b673ec..bdf1084fd6e 100644
--- a/csharp/src/Ice/DefaultsAndOverrides.cs
+++ b/csharp/src/Ice/DefaultsAndOverrides.cs
@@ -107,10 +107,6 @@ namespace IceInternal
overrideCloseTimeoutValue = -1;
}
-#if COMPACT
- overrideCompress = false;
- overrideCompressValue = false;
-#else
val = properties.getProperty("Ice.Override.Compress");
if(val.Length > 0)
{
@@ -128,7 +124,6 @@ namespace IceInternal
overrideCompress = !BZip2.supported();
overrideCompressValue = false;
}
-#endif
val = properties.getProperty("Ice.Override.Secure");
if(val.Length > 0)
diff --git a/csharp/src/Ice/DictionaryBase.cs b/csharp/src/Ice/DictionaryBase.cs
deleted file mode 100644
index 53dbb0a91ac..00000000000
--- a/csharp/src/Ice/DictionaryBase.cs
+++ /dev/null
@@ -1,355 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 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;
-
-namespace IceInternal
-{
-#if !SILVERLIGHT
- [Serializable]
-#endif
- public abstract class DictionaryBase<KT, VT> : System.Collections.IDictionary
- {
- protected Dictionary<KT, VT> dict_;
-
- public DictionaryBase()
- {
- dict_ = new Dictionary<KT, VT>();
- }
-
- public int Count
- {
- get
- {
- return dict_.Count;
- }
- }
-
- public void Clear()
- {
- dict_.Clear();
- }
-
- public void CopyTo(System.Array a__, int index)
- {
- if(a__ == null)
- {
- throw new ArgumentNullException("a__", "Cannot copy to null array");
- }
- if(index < 0)
- {
- throw new ArgumentException("Array index cannot be less than zero", "index");
- }
- if(index >= a__.Length)
- {
- throw new ArgumentException("Array index must less than array length");
- }
- if(dict_.Count > a__.Length - index)
- {
- throw new ArgumentException("Insufficient room in target array beyond index");
- }
- if(a__.Rank > 1)
- {
- throw new ArgumentException("Cannot copy to multidimensional array", "a__");
- }
- Type t = a__.GetType().GetElementType();
- if(!t.IsAssignableFrom(typeof(System.Collections.DictionaryEntry)))
- {
- throw new ArgumentException("Cannot assign DictionaryEntry to target array", "a__");
- }
-
- IEnumerator<KeyValuePair<KT, VT>> e = dict_.GetEnumerator();
- while(e.MoveNext())
- {
- a__.SetValue(new System.Collections.DictionaryEntry(e.Current.Key, e.Current.Value), index++);
- }
- }
-
- public override bool Equals(object other)
- {
- if(object.ReferenceEquals(this, other))
- {
- return true;
- }
- if(other == null)
- {
- return false;
- }
-
- try
- {
- DictionaryBase<KT, VT> d2 = (DictionaryBase<KT, VT>)other;
-
- if(dict_.Count != d2.dict_.Count)
- {
- return false;
- }
- if(Count == 0)
- {
- return true;
- }
-
- //
- // Compare both sets of keys. Keys are unique and non-null.
- //
- Dictionary<KT, VT>.KeyCollection keys1 = dict_.Keys;
- Dictionary<KT, VT>.KeyCollection keys2 = d2.dict_.Keys;
- KT[] ka1 = new KT[dict_.Count];
- KT[] ka2 = new KT[d2.dict_.Count];
- keys1.CopyTo(ka1, 0);
- keys2.CopyTo(ka2, 0);
- Array.Sort(ka1);
- Array.Sort(ka2);
-
- for(int i = 0; i < ka1.Length; ++i)
- {
- if(!Equals(ka1[i], ka2[i]))
- {
- return false;
- }
- if(!Equals(dict_[ka1[i]], d2.dict_[ka1[i]]))
- {
- return false;
- }
- }
-
- return true;
- }
- catch(System.Exception)
- {
- return false;
- }
- }
-
- public static bool operator==(DictionaryBase<KT, VT> lhs__, DictionaryBase<KT, VT> rhs__)
- {
- return Equals(lhs__, rhs__);
- }
-
- public static bool operator!=(DictionaryBase<KT, VT> lhs__, DictionaryBase<KT, VT> rhs__)
- {
- return !Equals(lhs__, rhs__);
- }
-
- public override int GetHashCode()
- {
- int h = 5381;
- foreach(KeyValuePair<KT, VT> kvp in dict_)
- {
- IceInternal.HashUtil.hashAdd(ref h, kvp.Key);
- IceInternal.HashUtil.hashAdd(ref h, kvp.Value);
- }
- return h;
- }
-
- public class CEnumerator : System.Collections.IDictionaryEnumerator
- {
- public CEnumerator(IEnumerator<KeyValuePair<KT, VT>> e)
- {
- _e = e;
- }
-
- public bool MoveNext()
- {
- return _e.MoveNext();
- }
-
- public object Current
- {
- get
- {
- return new System.Collections.DictionaryEntry(_e.Current.Key, _e.Current.Value);
- }
- }
-
- public System.Collections.DictionaryEntry Entry
- {
- get
- {
- return new System.Collections.DictionaryEntry(_e.Current.Key, _e.Current.Value);
- }
- }
-
- public object Key
- {
- get
- {
- return _e.Current.Key;
- }
- }
-
- public object Value
- {
- get
- {
- return _e.Current.Value;
- }
- }
-
- public void Reset()
- {
- _e.Reset();
- }
-
- private IEnumerator<KeyValuePair<KT, VT>> _e;
- }
-
- public System.Collections.IEnumerator GetEnumerator()
- {
- return new CEnumerator(dict_.GetEnumerator());
- }
-
- public bool IsFixedSize
- {
- get
- {
- return false;
- }
- }
-
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- public bool IsSynchronized
- {
- get
- {
- return false;
- }
- }
-
- public object SyncRoot
- {
- get
- {
- return this;
- }
- }
-
- public VT this[KT key]
- {
- get
- {
- return dict_[key];
- }
- set
- {
- dict_[key] = value;
- }
- }
-
- public System.Collections.ICollection Keys
- {
- get
- {
- return dict_.Keys;
- }
- }
-
- public System.Collections.ICollection Values
- {
- get
- {
- return dict_.Values;
- }
- }
-
- public void Add(KT key, VT value)
- {
- try
- {
- dict_.Add(key, value);
- }
- catch(ArgumentException)
- {
- // Ignore.
- }
- }
-
- public void Remove(KT key)
- {
- dict_.Remove(key);
- }
-
- public bool Contains(KT key)
- {
- return dict_.ContainsKey(key);
- }
-
- public void Add(object key, object value)
- {
- checkKeyType(key);
- checkValueType(value);
- Add((KT)key, (VT)value);
- }
-
- public void Remove(object key)
- {
- checkKeyType(key);
- Remove((KT)key);
- }
-
- public bool Contains(object key)
- {
- return dict_.ContainsKey((KT)key);
- }
-
- System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator()
- {
- return new CEnumerator(dict_.GetEnumerator());
- }
-
- public object this[object key]
- {
- get
- {
- checkKeyType(key);
- return dict_[(KT)key];
- }
- set
- {
- checkKeyType(key);
- checkValueType(value);
- dict_[(KT)key] = (VT)value;
- }
- }
-
- private void checkKeyType(object o)
- {
- if(o != null && !(o is KT))
- {
- throw new ArgumentException("Cannot use a key of type " + o.GetType().ToString()
- + " for a dictionary with key type " + typeof(KT).ToString());
- }
- }
-
- private void checkValueType(object o)
- {
- if(o != null && !(o is KT))
- {
- throw new ArgumentException("Cannot use a value of type " + o.GetType().ToString()
- + " for a dictionary with value type " + typeof(VT).ToString());
- }
- }
- }
-}
-
-namespace Ice
-{
- [Obsolete("This class is deprecated.")]
- public abstract class DictionaryBase<KT, VT> : IceInternal.DictionaryBase<KT, VT>
- {
- }
-}
diff --git a/csharp/src/Ice/EndpointHostResolver.cs b/csharp/src/Ice/EndpointHostResolver.cs
index c925763dfeb..886b5cc484c 100644
--- a/csharp/src/Ice/EndpointHostResolver.cs
+++ b/csharp/src/Ice/EndpointHostResolver.cs
@@ -7,10 +7,8 @@
//
// **********************************************************************
-#if !SILVERLIGHT
namespace IceInternal
{
- using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Net;
@@ -289,4 +287,3 @@ namespace IceInternal
private HelperThread _thread;
}
}
-#endif
diff --git a/csharp/src/Ice/Exception.cs b/csharp/src/Ice/Exception.cs
index 3fcda64934f..e07e9209a9c 100644
--- a/csharp/src/Ice/Exception.cs
+++ b/csharp/src/Ice/Exception.cs
@@ -7,7 +7,7 @@
//
// **********************************************************************
-using System.Diagnostics;
+using System;
using System.Globalization;
using System.Runtime.Serialization;
@@ -35,10 +35,8 @@ namespace Ice
/// <summary>
/// Base class for Ice exceptions.
/// </summary>
-#if !SILVERLIGHT
- [System.Serializable]
-#endif
- public abstract class Exception : System.Exception, System.ICloneable
+ [Serializable]
+ public abstract class Exception : System.Exception, ICloneable
{
/// <summary>
/// Creates and returns a copy of this exception.
@@ -61,21 +59,19 @@ namespace Ice
/// <param name="ex">The inner exception.</param>
public Exception(System.Exception ex) : base("", ex) {}
-#if !SILVERLIGHT
/// <summary>
/// Initializes a new instance of the exception with serialized data.
/// </summary>
/// <param name="info">Holds the serialized object data about the exception being thrown.</param>
/// <param name="context">Contains contextual information about the source or destination.</param>
protected Exception(SerializationInfo info, StreamingContext context) : base(info, context) {}
-#endif
/// <summary>
/// ice_name() is deprecated, use ice_id() instead.
/// Returns the name of this exception.
/// </summary>
/// <returns>The name of this exception.</returns>
- [System.Obsolete("ice_name() is deprecated, use ice_id() instead.")]
+ [Obsolete("ice_name() is deprecated, use ice_id() instead.")]
public string ice_name()
{
return ice_id().Substring(2);
@@ -132,9 +128,7 @@ namespace Ice
/// <summary>
/// Base class for local exceptions.
/// </summary>
-#if !SILVERLIGHT
- [System.Serializable]
-#endif
+ [Serializable]
public abstract class LocalException : Exception
{
/// <summary>
@@ -149,22 +143,18 @@ namespace Ice
/// <param name="ex">The inner exception.</param>
public LocalException(System.Exception ex) : base(ex) {}
-#if !SILVERLIGHT
/// <summary>
/// Initializes a new instance of the exception with serialized data.
/// </summary>
/// <param name="info">Holds the serialized object data about the exception being thrown.</param>
/// <param name="context">Contains contextual information about the source or destination.</param>
protected LocalException(SerializationInfo info, StreamingContext context) : base(info, context) {}
-#endif
}
/// <summary>
/// Base class for Ice run-time exceptions.
/// </summary>
-#if !SILVERLIGHT
- [System.Serializable]
-#endif
+ [Serializable]
public abstract class SystemException : Exception
{
/// <summary>
@@ -179,22 +169,18 @@ namespace Ice
/// <param name="ex">The inner exception.</param>
public SystemException(System.Exception ex) : base(ex) {}
-#if !SILVERLIGHT
/// <summary>
/// Initializes a new instance of the exception with serialized data.
/// </summary>
/// <param name="info">Holds the serialized object data about the exception being thrown.</param>
/// <param name="context">Contains contextual information about the source or destination.</param>
protected SystemException(SerializationInfo info, StreamingContext context) : base(info, context) {}
-#endif
}
/// <summary>
/// Base class for Slice user exceptions.
/// </summary>
-#if !SILVERLIGHT
- [System.Serializable]
-#endif
+ [Serializable]
public abstract class UserException : Exception
{
/// <summary>
@@ -209,14 +195,12 @@ namespace Ice
/// <param name="ex">The inner exception.</param>
public UserException(System.Exception ex) : base(ex) {}
-#if !SILVERLIGHT
/// <summary>
/// Initializes a new instance of the exception with serialized data.
/// </summary>
/// <param name="info">Holds the serialized object data about the exception being thrown.</param>
/// <param name="context">Contains contextual information about the source or destination.</param>
protected UserException(SerializationInfo info, StreamingContext context) : base(info, context) {}
-#endif
public virtual void write__(OutputStream os__)
{
diff --git a/csharp/src/Ice/HashSet.cs b/csharp/src/Ice/HashSet.cs
deleted file mode 100644
index 07b9743404e..00000000000
--- a/csharp/src/Ice/HashSet.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 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.
-//
-// **********************************************************************
-
-#if COMPACT
-
-//
-// System.Collections.Generic.HashSet is not available in the .NET Compact Framework.
-// This class is a minimal implementation that provides only the methods required by
-// Ice internals.
-//
-using System;
-using System.Collections.Generic;
-
-namespace IceInternal
-{
- public class HashSet<T> : ICollection<T>
- {
- public HashSet()
- {
- entries_ = new Dictionary<T, bool>();
- }
-
- public HashSet(int capacity)
- {
- entries_ = new Dictionary<T, bool>(capacity);
- }
-
- void ICollection<T>.Add(T item)
- {
- try
- {
- entries_.Add(item, false);
- }
- catch(ArgumentException)
- {
- // Item already present.
- }
- }
-
- public bool Add(T item)
- {
- try
- {
- entries_.Add(item, false);
- }
- catch(ArgumentException)
- {
- return false; // Item already present.
- }
- return true;
- }
-
- public void Clear()
- {
- entries_.Clear();
- }
-
- public bool Contains(T item)
- {
- return entries_.ContainsKey(item);
- }
-
- public void CopyTo(T[] a, int idx)
- {
- entries_.Keys.CopyTo(a, idx);
- }
-
- public void CopyTo(T[] a)
- {
- entries_.Keys.CopyTo(a, 0);
- }
-
- System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
- {
- return entries_.Keys.GetEnumerator();
- }
-
- public IEnumerator<T> GetEnumerator()
- {
- return entries_.Keys.GetEnumerator();
- }
-
- public bool Remove(T item)
- {
- return entries_.Remove(item);
- }
-
- public int Count
- {
- get
- {
- return entries_.Count;
- }
- }
-
- public bool IsReadOnly
- {
- get
- {
- return false;
- }
- }
-
- private Dictionary<T, bool> entries_;
- }
-}
-
-#endif
diff --git a/csharp/src/Ice/HttpParser.cs b/csharp/src/Ice/HttpParser.cs
index e05758686fd..008ad3d6ca1 100644
--- a/csharp/src/Ice/HttpParser.cs
+++ b/csharp/src/Ice/HttpParser.cs
@@ -9,7 +9,6 @@
namespace IceInternal
{
- using System;
using System.Diagnostics;
using System.Collections.Generic;
using System.Text;
diff --git a/csharp/src/Ice/IPEndpointI.cs b/csharp/src/Ice/IPEndpointI.cs
index 7cb442a4284..3a0263407bd 100644
--- a/csharp/src/Ice/IPEndpointI.cs
+++ b/csharp/src/Ice/IPEndpointI.cs
@@ -121,11 +121,7 @@ namespace IceInternal
public override void connectors_async(Ice.EndpointSelectionType selType, EndpointI_connectors callback)
{
-#if SILVERLIGHT
- callback.connectors(connectors(selType));
-#else
instance_.resolve(host_, port_, selType, this, callback);
-#endif
}
public override List<EndpointI> expand()
@@ -167,15 +163,6 @@ namespace IceInternal
return connectors;
}
-#if SILVERLIGHT
- public List<Connector> connectors(Ice.EndpointSelectionType selType)
- {
- return connectors(Network.getAddresses(host_, port_, instance_.protocolSupport(), selType,
- instance_.preferIPv6(), false),
- instance_.networkProxy());
- }
-#endif
-
public override string options()
{
//
diff --git a/csharp/src/Ice/InputStream.cs b/csharp/src/Ice/InputStream.cs
index 121274da87d..b9cb5a50e35 100644
--- a/csharp/src/Ice/InputStream.cs
+++ b/csharp/src/Ice/InputStream.cs
@@ -11,15 +11,10 @@ namespace Ice
{
using System;
- using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
- using System.Reflection;
-#if !COMPACT && !SILVERLIGHT
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
-#endif
- using System.Threading;
using Protocol = IceInternal.Protocol;
/// <summary>
@@ -1094,7 +1089,6 @@ namespace Ice
/// <returns>The serializable object.</returns>
public object readSerializable()
{
-#if !COMPACT && !SILVERLIGHT
int sz = readAndCheckSeqSize(1);
if(sz == 0)
{
@@ -1110,9 +1104,6 @@ namespace Ice
{
throw new Ice.MarshalException("cannot deserialize object:", ex);
}
-#else
- throw new Ice.MarshalException("serialization not supported");
-#endif
}
/// <summary>
@@ -3112,7 +3103,7 @@ namespace Ice
// Set the reason member to a more helpful message.
//
ex.reason = "unknown exception type `" + mostDerivedId + "'";
- throw ex;
+ throw;
}
}
}
diff --git a/csharp/src/Ice/Instance.cs b/csharp/src/Ice/Instance.cs
index a2fe6072a2c..4aef3c883d5 100644
--- a/csharp/src/Ice/Instance.cs
+++ b/csharp/src/Ice/Instance.cs
@@ -83,13 +83,6 @@ namespace IceInternal
return _defaultsAndOverrides;
}
-#if COMPACT || SILVERLIGHT
- public string[] factoryAssemblies()
- {
- return _factoryAssemblies;
- }
-#endif
-
public RouterManager routerManager()
{
lock(this)
@@ -259,7 +252,6 @@ namespace IceInternal
}
}
-#if !SILVERLIGHT
public EndpointHostResolver endpointHostResolver()
{
lock(this)
@@ -273,7 +265,7 @@ namespace IceInternal
return _endpointHostResolver;
}
}
-#endif
+
public RetryQueue
retryQueue()
{
@@ -730,7 +722,7 @@ namespace IceInternal
{
_initData.properties = Ice.Util.createProperties();
}
-#if !SILVERLIGHT && !UNITY
+
lock(_staticLock)
{
if(!_oneOffDone)
@@ -784,11 +776,9 @@ namespace IceInternal
_oneOffDone = true;
}
}
-#endif
if(_initData.logger == null)
{
-#if !SILVERLIGHT && !UNITY
string logfile = _initData.properties.getProperty("Ice.LogFile");
if(_initData.properties.getPropertyAsInt("Ice.UseSyslog") > 0 &&
AssemblyUtil.platform_ != AssemblyUtil.Platform.Windows)
@@ -811,23 +801,17 @@ namespace IceInternal
//
// Ice.ConsoleListener is enabled by default.
//
-# if COMPACT
- _initData.logger =
- new Ice.ConsoleLoggerI(_initData.properties.getProperty("Ice.ProgramName"));
-# else
bool console =
_initData.properties.getPropertyAsIntWithDefault("Ice.ConsoleListener", 1) > 0;
_initData.logger =
new Ice.TraceLoggerI(_initData.properties.getProperty("Ice.ProgramName"), console);
-# endif
}
-#else
+
if(Ice.Util.getProcessLogger() is Ice.LoggerI)
{
_initData.logger =
new Ice.ConsoleLoggerI(_initData.properties.getProperty("Ice.ProgramName"));
}
-#endif
else
{
_initData.logger = Ice.Util.getProcessLogger();
@@ -850,10 +834,6 @@ namespace IceInternal
new ACMConfig(_initData.properties, _initData.logger, "Ice.ACM",
new ACMConfig(true)));
-#if COMPACT || SILVERLIGHT
- char[] separators = { ' ', '\t', '\n', '\r' };
- _factoryAssemblies = _initData.properties.getProperty("Ice.FactoryAssemblies").Split(separators);
-#endif
{
const int defaultMessageSizeMax = 1024;
int num =
@@ -936,10 +916,7 @@ namespace IceInternal
ProtocolInstance udpInstance = new ProtocolInstance(this, Ice.UDPEndpointType.value, "udp", false);
_endpointFactoryManager.add(new UdpEndpointFactory(udpInstance));
-
-#if !SILVERLIGHT
_pluginManager = new Ice.PluginManagerI(communicator);
-#endif
if(_initData.valueFactoryManager == null)
{
@@ -965,10 +942,8 @@ namespace IceInternal
// Load plug-ins.
//
Debug.Assert(_serverThreadPool == null);
-#if !SILVERLIGHT
Ice.PluginManagerI pluginManagerImpl = (Ice.PluginManagerI)_pluginManager;
pluginManagerImpl.loadPlugins(ref args);
-#endif
//
// Add WS and WSS endpoint factories if TCP/SSL factories are installed.
@@ -1077,7 +1052,6 @@ namespace IceInternal
//
try
{
-#if !SILVERLIGHT
if(initializationData().properties.getProperty("Ice.ThreadPriority").Length > 0)
{
ThreadPriority priority = IceInternal.Util.stringToThreadPriority(
@@ -1088,9 +1062,6 @@ namespace IceInternal
{
_timer = new Timer(this);
}
-#else
- _timer = new Timer(this);
-#endif
}
catch(System.Exception ex)
{
@@ -1099,7 +1070,6 @@ namespace IceInternal
throw;
}
-#if !SILVERLIGHT
try
{
_endpointHostResolver = new EndpointHostResolver(this);
@@ -1110,7 +1080,6 @@ namespace IceInternal
_initData.logger.error(s);
throw;
}
-#endif
_clientThreadPool = new ThreadPool(this, "Ice.ThreadPool.Client", 0);
//
@@ -1140,7 +1109,6 @@ namespace IceInternal
//
// Show process id if requested (but only once).
//
-#if !SILVERLIGHT
lock(this)
{
if(!_printProcessIdDone && _initData.properties.getPropertyAsInt("Ice.PrintProcessId") > 0)
@@ -1152,7 +1120,6 @@ namespace IceInternal
_printProcessIdDone = true;
}
}
-#endif
//
// Server thread pool initialization is lazy in serverThreadPool().
@@ -1163,12 +1130,11 @@ 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
@@ -1261,12 +1227,10 @@ namespace IceInternal
{
_asyncIOThread.destroy();
}
-#if !SILVERLIGHT
if(_endpointHostResolver != null)
{
_endpointHostResolver.destroy();
}
-#endif
//
// Wait for all the threads to be finished.
@@ -1287,12 +1251,10 @@ namespace IceInternal
{
_asyncIOThread.joinWithThread();
}
-#if !SILVERLIGHT
if(_endpointHostResolver != null)
{
_endpointHostResolver.joinWithThread();
}
-#endif
foreach(Ice.ObjectFactory factory in _objectFactoryMap.Values)
{
@@ -1350,9 +1312,7 @@ namespace IceInternal
_serverThreadPool = null;
_clientThreadPool = null;
_asyncIOThread = null;
-#if !SILVERLIGHT
_endpointHostResolver = null;
-#endif
_timer = null;
_referenceFactory = null;
@@ -1469,12 +1429,10 @@ namespace IceInternal
}
Debug.Assert(_objectAdapterFactory != null);
_objectAdapterFactory.updateThreadObservers();
-#if !SILVERLIGHT
if(_endpointHostResolver != null)
{
_endpointHostResolver.updateObserver();
}
-#endif
if(_asyncIOThread != null)
{
_asyncIOThread.updateObserver();
@@ -1590,9 +1548,6 @@ 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 || SILVERLIGHT
- private string[] _factoryAssemblies; // Immutable, not reset by destroy().
-#endif
private int _messageSizeMax; // Immutable, not reset by destroy().
private int _batchAutoFlushSize; // Immutable, not reset by destroy().
private int _cacheMessageBuffers; // Immutable, not reset by destroy().
@@ -1612,9 +1567,7 @@ 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;
@@ -1625,17 +1578,9 @@ namespace IceInternal
private HashSet<string> _adminFacetFilter = new HashSet<string>();
private Ice.Identity _adminIdentity;
private Dictionary<short, BufSizeWarnInfo> _setBufSizeWarn = new Dictionary<short, BufSizeWarnInfo>();
-
-#if !SILVERLIGHT
private static bool _printProcessIdDone = false;
-#endif
-
-#if !SILVERLIGHT && !UNITY
private static bool _oneOffDone = false;
-#endif
-
private Dictionary<string, Ice.ObjectFactory> _objectFactoryMap = new Dictionary<string, Ice.ObjectFactory>();
-
private static System.Object _staticLock = new System.Object();
}
}
diff --git a/csharp/src/Ice/LoggerAdminI.cs b/csharp/src/Ice/LoggerAdminI.cs
index 9a3733803d5..0b8b872ee09 100644
--- a/csharp/src/Ice/LoggerAdminI.cs
+++ b/csharp/src/Ice/LoggerAdminI.cs
@@ -86,7 +86,7 @@ sealed class LoggerAdminI : Ice.LoggerAdminDisp_
catch(Ice.LocalException ex)
{
deadRemoteLogger(remoteLogger, _logger, ex, "init");
- throw ex;
+ throw;
}
}
diff --git a/csharp/src/Ice/LoggerI.cs b/csharp/src/Ice/LoggerI.cs
index 362c22dad60..8cdf59ddd98 100644
--- a/csharp/src/Ice/LoggerI.cs
+++ b/csharp/src/Ice/LoggerI.cs
@@ -7,15 +7,11 @@
//
// **********************************************************************
-#define TRACE
-
namespace Ice
{
using System.Diagnostics;
using System.Globalization;
-#if !SILVERLIGHT && !UNITY
using System.IO;
-#endif
public abstract class LoggerI : Logger
{
@@ -120,7 +116,6 @@ namespace Ice
}
}
-#if !SILVERLIGHT && !UNITY
public sealed class FileLoggerI : LoggerI
{
public FileLoggerI(string prefix, string file) :
@@ -145,8 +140,6 @@ namespace Ice
private TextWriter _writer;
}
-
-# if !COMPACT
public class ConsoleListener : TraceListener
{
public ConsoleListener()
@@ -259,6 +252,4 @@ namespace Ice
private bool _console;
internal static ConsoleListener _consoleListener = new ConsoleListener();
}
-# endif
-#endif
}
diff --git a/csharp/src/Ice/MetricsAdminI.cs b/csharp/src/Ice/MetricsAdminI.cs
index f949c593f3b..e298680e487 100644
--- a/csharp/src/Ice/MetricsAdminI.cs
+++ b/csharp/src/Ice/MetricsAdminI.cs
@@ -713,11 +713,7 @@ namespace IceInternal
class MetricsMapFactory<T> : IMetricsMapFactory where T : IceMX.Metrics, new()
{
-#if COMPACT
- public MetricsMapFactory(Ice.VoidAction updater)
-#else
public MetricsMapFactory(System.Action updater)
-#endif
{
_updater = updater;
}
@@ -739,11 +735,7 @@ namespace IceInternal
_subMaps.Add(subMap, new SubMapFactory<S>(field));
}
-#if COMPACT
- readonly private Ice.VoidAction _updater;
-#else
readonly private System.Action _updater;
-#endif
readonly private Dictionary<string, ISubMapFactory> _subMaps = new Dictionary<string, ISubMapFactory>();
}
@@ -903,11 +895,7 @@ namespace IceInternal
}
}
-#if COMPACT
- public void registerMap<T>(string map, Ice.VoidAction updater)
-#else
public void registerMap<T>(string map, System.Action updater)
-#endif
where T : IceMX.Metrics, new()
{
bool updated;
diff --git a/csharp/src/Ice/MetricsObserverI.cs b/csharp/src/Ice/MetricsObserverI.cs
index bf7bc261362..ad3f4ad2412 100644
--- a/csharp/src/Ice/MetricsObserverI.cs
+++ b/csharp/src/Ice/MetricsObserverI.cs
@@ -38,17 +38,13 @@ namespace IceMX
}
return "";
}
- catch(ArgumentOutOfRangeException ex)
+ catch(ArgumentOutOfRangeException)
{
- throw ex;
+ throw;
}
catch(Exception ex)
{
-#if COMPACT
- throw new ArgumentOutOfRangeException(_name, ex.ToString());
-#else
throw new ArgumentOutOfRangeException(_name, ex);
-#endif
}
}
@@ -407,11 +403,7 @@ namespace IceMX
public void update()
{
-#if COMPACT
- Ice.VoidAction updater;
-#else
- System.Action updater;
-#endif
+ System.Action updater;
lock(this)
{
_maps.Clear();
@@ -429,11 +421,7 @@ namespace IceMX
}
}
-#if COMPACT
- public void setUpdater(Ice.VoidAction updater)
-#else
public void setUpdater(System.Action updater)
-#endif
{
lock(this)
{
@@ -445,10 +433,6 @@ namespace IceMX
private readonly string _name;
private List<MetricsMap<T>> _maps = new List<MetricsMap<T>>();
private volatile bool _enabled;
-#if COMPACT
- private Ice.VoidAction _updater;
-#else
private System.Action _updater;
-#endif
}
}
diff --git a/csharp/src/Ice/Network.cs b/csharp/src/Ice/Network.cs
index 21e4caac666..a91fb166fe0 100644
--- a/csharp/src/Ice/Network.cs
+++ b/csharp/src/Ice/Network.cs
@@ -10,17 +10,10 @@
namespace IceInternal
{
using System;
- using System.Collections;
using System.Collections.Generic;
- using System.ComponentModel;
- using System.Diagnostics;
using System.Net;
-#if !COMPACT && !UNITY
using System.Net.NetworkInformation;
-#endif
using System.Net.Sockets;
- using System.Runtime.InteropServices;
- using System.Threading;
using System.Globalization;
public sealed class Network
@@ -30,71 +23,10 @@ namespace IceInternal
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
- //
- // SocketError enumeration isn't available with Silverlight
- //
- 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
public static bool interrupted(SocketException ex)
{
@@ -166,7 +98,6 @@ namespace IceInternal
return connectionLost(ex.InnerException as SocketException);
}
-#if !UNITY
//
// In other cases the IOException has no inner exception. We could examine the
// exception's message, but that is fragile due to localization issues. We
@@ -186,8 +117,6 @@ namespace IceInternal
{
return true;
}
-#endif
-
return false;
}
@@ -240,11 +169,7 @@ namespace IceInternal
public static bool isMulticast(IPEndPoint addr)
{
-#if COMPACT
- string ip = addr.Address.ToString().ToUpper();
-#else
string ip = addr.Address.ToString().ToUpperInvariant();
-#endif
if(addr.AddressFamily == AddressFamily.InterNetwork)
{
char[] splitChars = { '.' };
@@ -316,12 +241,8 @@ namespace IceInternal
try
{
setTcpNoDelay(socket);
-#if !SILVERLIGHT
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, 1);
-# if !__MonoCS__
setTcpLoopbackFastPath(socket);
-# endif
-#endif
}
catch(SocketException ex)
{
@@ -335,7 +256,6 @@ namespace IceInternal
public static Socket createServerSocket(bool udp, AddressFamily family, int protocol)
{
Socket socket = createSocket(udp, family);
-# if !COMPACT && !UNITY && !__MonoCS__ && !SILVERLIGHT && !DOTNET3_5
//
// The IPv6Only enumerator was added in .NET 4.
//
@@ -352,7 +272,6 @@ namespace IceInternal
throw new Ice.SocketException(ex);
}
}
-#endif
return socket;
}
@@ -392,11 +311,7 @@ namespace IceInternal
{
try
{
-#if SILVERLIGHT
- socket.NoDelay = true;
-#else
socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, 1);
-#endif
}
catch(System.Exception ex)
{
@@ -405,7 +320,6 @@ namespace IceInternal
}
}
-#if !SILVERLIGHT
public static void setTcpLoopbackFastPath(Socket socket)
{
const int SIO_LOOPBACK_FAST_PATH = (-1744830448);
@@ -446,17 +360,12 @@ 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)
{
@@ -470,11 +379,7 @@ namespace IceInternal
int sz;
try
{
-#if SILVERLIGHT
- sz = socket.SendBufferSize;
-#else
sz = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendBuffer);
-#endif
}
catch(SocketException ex)
{
@@ -488,11 +393,7 @@ namespace IceInternal
{
try
{
-#if SILVERLIGHT
- socket.ReceiveBufferSize = sz;
-#else
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer, sz);
-#endif
}
catch(SocketException ex)
{
@@ -506,11 +407,7 @@ namespace IceInternal
int sz = 0;
try
{
-#if SILVERLIGHT
- sz = socket.ReceiveBufferSize;
-#else
sz = (int)socket.GetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer);
-#endif
}
catch(SocketException ex)
{
@@ -520,7 +417,6 @@ namespace IceInternal
return sz;
}
-#if !SILVERLIGHT
public static void setReuseAddress(Socket socket, bool reuse)
{
try
@@ -577,9 +473,6 @@ namespace IceInternal
if(group.AddressFamily == AddressFamily.InterNetwork)
{
MulticastOption option;
-#if COMPACT
- option = new MulticastOption(group);
-#else
if(index == -1)
{
option = new MulticastOption(group);
@@ -589,7 +482,6 @@ namespace IceInternal
{
option = new MulticastOption(group, index);
}
-#endif
s.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.AddMembership, option);
}
else
@@ -612,15 +504,11 @@ 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);
@@ -629,7 +517,6 @@ namespace IceInternal
{
socket.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.MulticastTimeToLive, ttl);
}
-#endif
}
catch(SocketException ex)
{
@@ -638,7 +525,6 @@ namespace IceInternal
}
}
-#if !SILVERLIGHT
public static IPEndPoint doBind(Socket socket, EndPoint addr)
{
try
@@ -673,9 +559,7 @@ namespace IceInternal
throw new Ice.SocketException(ex);
}
}
-#endif
-#if !SILVERLIGHT
public static bool doConnect(Socket fd, EndPoint addr, EndPoint sourceAddr)
{
EndPoint bindAddr = sourceAddr;
@@ -835,7 +719,6 @@ namespace IceInternal
}
}
}
-#endif
public static EndPoint getAddressForServer(string host, int port, int protocol, bool preferIPv6)
{
@@ -898,29 +781,13 @@ namespace IceInternal
}
catch(FormatException)
{
-#if !SILVERLIGHT
if(!blocking)
{
return addresses;
}
-#endif
}
-#if SILVERLIGHT
- if(protocol != EnableIPv6)
- {
- addresses.Add(new DnsEndPoint(host, port, AddressFamily.InterNetwork));
- }
- if(protocol != EnableIPv4)
- {
- addresses.Add(new DnsEndPoint(host, port, AddressFamily.InterNetworkV6));
- }
-#else
-# if COMPACT
- foreach(IPAddress a in Dns.GetHostEntry(host).AddressList)
-# else
foreach(IPAddress a in Dns.GetHostAddresses(host))
-# endif
{
if((a.AddressFamily == AddressFamily.InterNetwork && protocol != EnableIPv6) ||
(a.AddressFamily == AddressFamily.InterNetworkV6 && protocol != EnableIPv4))
@@ -928,7 +795,6 @@ namespace IceInternal
addresses.Add(new IPEndPoint(a, port));
}
}
-#endif
if(selType == Ice.EndpointSelectionType.Random)
{
@@ -978,9 +844,6 @@ namespace IceInternal
public static IPAddress[] getLocalAddresses(int protocol, bool includeLoopback)
{
-#if SILVERLIGHT
- return new List<IPAddress>().ToArray();
-#else
List<IPAddress> addresses;
int retry = 5;
@@ -988,7 +851,6 @@ namespace IceInternal
try
{
addresses = new List<IPAddress>();
-# if !COMPACT && !UNITY
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
foreach(NetworkInterface ni in nics)
{
@@ -1006,12 +868,8 @@ namespace IceInternal
}
}
}
-# else
-# if COMPACT
- foreach(IPAddress a in Dns.GetHostEntry(Dns.GetHostName()).AddressList)
-# else
+
foreach(IPAddress a in Dns.GetHostAddresses(Dns.GetHostName()))
-# endif
{
if((a.AddressFamily == AddressFamily.InterNetwork && protocol != EnableIPv6) ||
(a.AddressFamily == AddressFamily.InterNetworkV6 && protocol != EnableIPv4))
@@ -1022,7 +880,6 @@ namespace IceInternal
}
}
}
-# endif
}
catch(SocketException ex)
{
@@ -1042,7 +899,6 @@ namespace IceInternal
}
return addresses.ToArray();
-#endif
}
public static bool
@@ -1153,11 +1009,7 @@ namespace IceInternal
getLocalAddresses(ipv4Wildcard ? Network.EnableIPv4 : protocol, includeLoopback);
foreach(IPAddress a in addrs)
{
-#if COMPACT
- if(!IPAddress.IsLoopback(a))
-#else
if(!isLinklocal(a))
-#endif
{
hosts.Add(a.ToString());
}
@@ -1239,11 +1091,7 @@ namespace IceInternal
{
if(endpoint == null)
{
-#if SILVERLIGHT
- return "<not available>";
-#else
return "<not bound>";
-#endif
}
return endpointAddressToString(endpoint) + ":" + endpointPort(endpoint);
}
@@ -1261,8 +1109,6 @@ namespace IceInternal
public static EndPoint
getLocalAddress(Socket socket)
{
- // Silverlight socket doesn't exposes a local endpoint
-#if !SILVERLIGHT
try
{
return socket.LocalEndPoint;
@@ -1271,9 +1117,6 @@ namespace IceInternal
{
throw new Ice.SocketException(ex);
}
-#else
- return null;
-#endif
}
public static EndPoint
@@ -1312,7 +1155,6 @@ namespace IceInternal
{
}
-#if !COMPACT && !SILVERLIGHT && !UNITY
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
try
{
@@ -1371,7 +1213,6 @@ namespace IceInternal
}
}
}
-#endif
return -1;
}
@@ -1418,13 +1259,6 @@ namespace IceInternal
{
if(endpoint != null)
{
-#if SILVERLIGHT
- if(endpoint is DnsEndPoint)
- {
- DnsEndPoint dnsEndpoint = (DnsEndPoint)endpoint;
- return dnsEndpoint.Host;
- }
-#endif
if(endpoint is IPEndPoint)
{
IPEndPoint ipEndpoint = (IPEndPoint) endpoint;
@@ -1439,13 +1273,6 @@ namespace IceInternal
{
if(endpoint != null)
{
-#if SILVERLIGHT
- if(endpoint is DnsEndPoint)
- {
- DnsEndPoint dnsEndpoint = (DnsEndPoint)endpoint;
- return dnsEndpoint.Port;
- }
-#endif
if(endpoint is IPEndPoint)
{
IPEndPoint ipEndpoint = (IPEndPoint) endpoint;
diff --git a/csharp/src/Ice/NetworkProxy.cs b/csharp/src/Ice/NetworkProxy.cs
index 09cffa914d2..424dc1a5e67 100644
--- a/csharp/src/Ice/NetworkProxy.cs
+++ b/csharp/src/Ice/NetworkProxy.cs
@@ -39,7 +39,6 @@ namespace IceInternal
//
void finish(Buffer readBuffer, Buffer writeBuffer);
-#if !SILVERLIGHT
//
// If the proxy host needs to be resolved, this should return
// a new NetworkProxy containing the IP address of the proxy.
@@ -47,7 +46,7 @@ namespace IceInternal
// it's safe if this this method blocks.
//
NetworkProxy resolveHost(int protocolSupport);
-#endif
+
//
// Returns the IP address of the network proxy. This method
// must not block. It's only called on a network proxy object
@@ -70,12 +69,8 @@ namespace IceInternal
{
public SOCKSNetworkProxy(string host, int port)
{
-#if SILVERLIGHT
- _address = new DnsEndPoint(host, port, AddressFamily.InterNetwork);
-#else
_host = host;
_port = port;
-#endif
}
private SOCKSNetworkProxy(EndPoint address)
@@ -144,7 +139,6 @@ namespace IceInternal
}
}
-#if !SILVERLIGHT
public NetworkProxy resolveHost(int protocolSupport)
{
Debug.Assert(_host != null);
@@ -155,7 +149,6 @@ namespace IceInternal
false,
true)[0]);
}
-#endif
public EndPoint getAddress()
{
@@ -173,10 +166,8 @@ namespace IceInternal
return Network.EnableIPv4;
}
-#if !SILVERLIGHT
private readonly string _host;
private readonly int _port;
-#endif
private readonly EndPoint _address;
}
@@ -184,14 +175,9 @@ namespace IceInternal
{
public HTTPNetworkProxy(string host, int port)
{
-#if SILVERLIGHT
- _address = new DnsEndPoint(host, port, AddressFamily.InterNetwork);
- _protocolSupport = Network.EnableIPv4;
-#else
_host = host;
_port = port;
_protocolSupport = Network.EnableBoth;
-#endif
}
private HTTPNetworkProxy(EndPoint address, int protocolSupport)
@@ -209,12 +195,7 @@ namespace IceInternal
str.Append(" HTTP/1.1\r\nHost: ");
str.Append(addr);
str.Append("\r\n\r\n");
-
-#if SILVERLIGHT
- byte[] b = System.Text.Encoding.UTF8.GetBytes(str.ToString());
-#else
byte[] b = System.Text.Encoding.ASCII.GetBytes(str.ToString());
-#endif
//
// HTTP connect request
@@ -271,7 +252,6 @@ namespace IceInternal
}
}
-#if !SILVERLIGHT
public NetworkProxy resolveHost(int protocolSupport)
{
Debug.Assert(_host != null);
@@ -283,7 +263,6 @@ namespace IceInternal
true)[0],
protocolSupport);
}
-#endif
public EndPoint getAddress()
{
@@ -301,10 +280,8 @@ namespace IceInternal
return _protocolSupport;
}
-#if !SILVERLIGHT
private readonly string _host;
private readonly int _port;
-#endif
private readonly EndPoint _address;
private readonly int _protocolSupport;
}
diff --git a/csharp/src/Ice/ObjectAdapterI.cs b/csharp/src/Ice/ObjectAdapterI.cs
index df2f40c720d..f6dec965c71 100644
--- a/csharp/src/Ice/ObjectAdapterI.cs
+++ b/csharp/src/Ice/ObjectAdapterI.cs
@@ -1018,36 +1018,6 @@ namespace Ice
}
}
- /*
- ~ObjectAdapterI()
- {
- if(!_deactivated)
- {
- string msg = "object adapter `" + getName() + "' has not been deactivated";
- if(!Environment.HasShutdownStarted)
- {
- instance_.initializationData().logger.warning(msg);
- }
- else
- {
- Console.Error.WriteLine(msg);
- }
- }
- else if(!_destroyed)
- {
- string msg = "object adapter `" + getName() + "' has not been destroyed";
- if(!Environment.HasShutdownStarted)
- {
- instance_.initializationData().logger.warning(msg);
- }
- else
- {
- Console.Error.WriteLine(msg);
- }
- }
- }
- */
-
private ObjectPrx newProxy(Identity ident, string facet)
{
if(_id.Length == 0)
@@ -1205,25 +1175,6 @@ namespace Ice
EndpointI endp = instance_.endpointFactoryManager().create(s, oaEndpoints);
if(endp == null)
{
-#if COMPACT
- if(s.StartsWith("ssl", StringComparison.Ordinal) || s.StartsWith("wss", StringComparison.Ordinal))
- {
- instance_.initializationData().logger.warning(
- "ignoring endpoint `" + s +
- "': IceSSL is not supported with the .NET Compact Framework");
- ++end;
- continue;
- }
-#else
- if(AssemblyUtil.runtime_ == AssemblyUtil.Runtime.Mono &&
- (s.StartsWith("ssl", StringComparison.Ordinal) || s.StartsWith("wss", StringComparison.Ordinal)))
- {
- instance_.initializationData().logger.warning(
- "ignoring endpoint `" + s + "': IceSSL is not supported with Mono");
- ++end;
- continue;
- }
-#endif
Ice.EndpointParseException e2 = new Ice.EndpointParseException();
e2.str = "invalid object adapter endpoint `" + s + "'";
throw e2;
diff --git a/csharp/src/Ice/Optional.cs b/csharp/src/Ice/Optional.cs
index 84802723371..1ea9aad3862 100644
--- a/csharp/src/Ice/Optional.cs
+++ b/csharp/src/Ice/Optional.cs
@@ -20,12 +20,8 @@ namespace Ice
/// <summary>
/// Encapsulates an optional value. Instances of this type are immutable.
/// </summary>
-#if SILVERLIGHT
- public struct Optional<T>
-#else
[Serializable]
public struct Optional<T> : ISerializable
-#endif
{
/// <summary>
/// Creates an optional value whose state is unset.
@@ -54,7 +50,6 @@ namespace Ice
_isSet = v._isSet;
}
-#if !SILVERLIGHT
/// <summary>
/// Initializes a new instance of the exception with serialized data.
/// </summary>
@@ -72,7 +67,6 @@ namespace Ice
_value = default(T);
}
}
-#endif
/// <summary>
/// Conversion operator to the underlying type; a cast is required. An exception
@@ -175,7 +169,6 @@ namespace Ice
}
}
-#if !SILVERLIGHT
/// <summary>
/// Serializes an optional value.
/// </summary>
@@ -189,7 +182,6 @@ namespace Ice
info.AddValue("value", _value, typeof(T));
}
}
-#endif
private T _value;
private bool _isSet;
diff --git a/csharp/src/Ice/Options.cs b/csharp/src/Ice/Options.cs
index 0455909611a..d8fb7a9958a 100644
--- a/csharp/src/Ice/Options.cs
+++ b/csharp/src/Ice/Options.cs
@@ -7,6 +7,7 @@
//
// **********************************************************************
+using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
@@ -15,7 +16,7 @@ namespace IceUtilInternal
{
public sealed class Options
{
- public sealed class BadQuote : System.Exception
+ public sealed class BadQuote : Exception
{
public BadQuote(string message) : base(message)
{
diff --git a/csharp/src/Ice/OutgoingAsync.cs b/csharp/src/Ice/OutgoingAsync.cs
index 22c8966020a..0f376ede850 100644
--- a/csharp/src/Ice/OutgoingAsync.cs
+++ b/csharp/src/Ice/OutgoingAsync.cs
@@ -347,7 +347,7 @@ namespace IceInternal
//
if(userThread)
{
- throw ex;
+ throw;
}
Ice.AsyncCallback cb = finished(ex); // No retries, we're done
if(cb != null)
@@ -775,10 +775,10 @@ namespace IceInternal
_is.startEncapsulation();
_is.throwException(null);
}
- catch(Ice.UserException ex)
+ catch(Ice.UserException)
{
_is.endEncapsulation();
- throw ex;
+ throw;
}
}
@@ -868,10 +868,10 @@ namespace IceInternal
}
Debug.Assert(sentCB == null);
}
- catch(Ice.LocalException ex)
+ catch(Ice.LocalException)
{
doCheck(false);
- throw ex;
+ throw;
}
}
diff --git a/csharp/src/Ice/OutputStream.cs b/csharp/src/Ice/OutputStream.cs
index 242f89d3b0a..fa7ae881100 100644
--- a/csharp/src/Ice/OutputStream.cs
+++ b/csharp/src/Ice/OutputStream.cs
@@ -15,10 +15,8 @@ namespace Ice
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
-#if !COMPACT && !SILVERLIGHT
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
-#endif
using System.Threading;
using Protocol = IceInternal.Protocol;
@@ -728,7 +726,6 @@ namespace Ice
/// <param name="o">The serializable object to write.</param>
public void writeSerializable(object o)
{
-#if !COMPACT && !SILVERLIGHT
if(o == null)
{
writeSize(0);
@@ -745,9 +742,6 @@ namespace Ice
{
throw new Ice.MarshalException("cannot serialize object:", ex);
}
-#else
- throw new Ice.MarshalException("serialization not supported");
-#endif
}
/// <summary>
diff --git a/csharp/src/Ice/Patcher.cs b/csharp/src/Ice/Patcher.cs
index f709d05194f..947602f247d 100644
--- a/csharp/src/Ice/Patcher.cs
+++ b/csharp/src/Ice/Patcher.cs
@@ -210,42 +210,6 @@ namespace IceInternal
private int _index; // The index at which to patch the array.
}
- public sealed class SequencePatcher<T>
- {
- public SequencePatcher(string type, IceInternal.CollectionBase<T> seq, int index)
- {
- _type = type;
- _seq = seq;
- _index = index;
- }
-
- public void patch(Ice.Object v)
- {
- if(v != null && !typeof(T).IsAssignableFrom(v.GetType()))
- {
- IceInternal.Ex.throwUOE(_type, v.ice_id());
- }
-
- int count = _seq.Count;
- if(_index >= count) // Need to grow the sequence.
- {
- for(int i = count; i < _index; i++)
- {
- _seq.Add(default(T));
- }
- _seq.Add((T)v);
- }
- else
- {
- _seq[_index] = (T)v;
- }
- }
-
- private string _type;
- private IceInternal.CollectionBase<T> _seq;
- private int _index; // The index at which to patch the sequence.
- }
-
public sealed class ListPatcher<T>
{
public ListPatcher(string type, List<T> seq, int index)
diff --git a/csharp/src/Ice/PluginManagerI.cs b/csharp/src/Ice/PluginManagerI.cs
index 3f0009bbaba..692d18ac8da 100644
--- a/csharp/src/Ice/PluginManagerI.cs
+++ b/csharp/src/Ice/PluginManagerI.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-#if !SILVERLIGHT
namespace Ice
{
using System;
@@ -57,15 +56,13 @@ namespace Ice
{
p.plugin.initialize();
}
- catch(PluginInitializationException ex)
+ catch(PluginInitializationException)
{
- throw ex;
+ throw;
}
catch(System.Exception ex)
{
- PluginInitializationException e = new PluginInitializationException(ex);
- e.reason = "plugin `" + p.name + "' initialization failed";
- throw e;
+ throw new PluginInitializationException(String.Format("plugin `{0}' initialization failed", p.name), ex);
}
initializedPlugins.Add(p.plugin);
}
@@ -405,37 +402,6 @@ namespace Ice
}
catch(System.Exception ex)
{
-#if COMPACT
- //
- // IceSSL is not supported with the Compact Framework.
- //
- if(name == "IceSSL")
- {
- if(!_sslWarnOnce)
- {
- _communicator.getLogger().warning(
- "IceSSL plug-in not loaded: IceSSL is not supported with the .NET Compact Framework");
- _sslWarnOnce = true;
- }
- return;
- }
-#else
- //
- // IceSSL is not yet supported with Mono. We avoid throwing an exception in that case,
- // so the same configuration can be used with Mono or Visual C#.
- //
- if(IceInternal.AssemblyUtil.runtime_ == IceInternal.AssemblyUtil.Runtime.Mono && name == "IceSSL")
- {
- if(!_sslWarnOnce)
- {
- _communicator.getLogger().warning(
- "IceSSL plug-in not loaded: IceSSL is not supported with Mono");
- _sslWarnOnce = true;
- }
- return;
- }
-#endif
-
PluginInitializationException e = new PluginInitializationException();
e.reason = err + "unable to load assembly: `" + assemblyName + "': " + ex.ToString();
throw e;
@@ -494,7 +460,7 @@ namespace Ice
catch(PluginInitializationException ex)
{
ex.reason = err + ex.reason;
- throw ex;
+ throw;
}
catch(System.Exception ex)
{
@@ -537,7 +503,5 @@ namespace Ice
private Communicator _communicator;
private ArrayList _plugins;
private bool _initialized;
- private static bool _sslWarnOnce = false;
}
}
-#endif
diff --git a/csharp/src/Ice/PropertiesI.cs b/csharp/src/Ice/PropertiesI.cs
index a7dc668167f..af84ff0c503 100644
--- a/csharp/src/Ice/PropertiesI.cs
+++ b/csharp/src/Ice/PropertiesI.cs
@@ -313,10 +313,6 @@ namespace Ice
public void load(string file)
{
-#if UNITY
- throw new FeatureNotSupportedException("File I/O not supported in UNITY build");
-#else
-# if !SILVERLIGHT
if(IceInternal.AssemblyUtil.platform_ == IceInternal.AssemblyUtil.Platform.Windows &&
(file.StartsWith("HKLM\\", StringComparison.Ordinal)))
{
@@ -339,7 +335,6 @@ namespace Ice
}
else
{
-# endif
try
{
using(System.IO.StreamReader sr = new System.IO.StreamReader(file))
@@ -353,10 +348,7 @@ namespace Ice
fe.path = file;
throw fe;
}
-# if !SILVERLIGHT
}
-# endif
-#endif
}
public Properties ice_clone_()
@@ -662,8 +654,6 @@ namespace Ice
private void loadConfig()
{
string val = getProperty("Ice.Config");
-
-#if !COMPACT && !SILVERLIGHT
if(val.Length == 0 || val.Equals("1"))
{
string s = System.Environment.GetEnvironmentVariable("ICE_CONFIG");
@@ -672,7 +662,6 @@ namespace Ice
val = s;
}
}
-#endif
if(val.Length > 0)
{
diff --git a/csharp/src/Ice/Protocol.cs b/csharp/src/Ice/Protocol.cs
index d8144552b0f..8db65a45542 100644
--- a/csharp/src/Ice/Protocol.cs
+++ b/csharp/src/Ice/Protocol.cs
@@ -9,7 +9,6 @@
namespace IceInternal
{
-
public sealed class Protocol
{
//
diff --git a/csharp/src/Ice/ProtocolInstance.cs b/csharp/src/Ice/ProtocolInstance.cs
index 35ef7cc3909..9552e1e3198 100644
--- a/csharp/src/Ice/ProtocolInstance.cs
+++ b/csharp/src/Ice/ProtocolInstance.cs
@@ -7,11 +7,10 @@
//
// **********************************************************************
+using System.Net;
+
namespace IceInternal
{
- using System.Net;
- using System.Collections.Generic;
-
public class ProtocolInstance
{
public ProtocolInstance(Ice.Communicator communicator, short type, string protocol, bool secure)
@@ -113,13 +112,11 @@ namespace IceInternal
return instance_.messageSizeMax();
}
-#if !SILVERLIGHT
public void resolve(string host, int port, Ice.EndpointSelectionType type, IPEndpointI endpt,
EndpointI_connectors callback)
{
instance_.endpointHostResolver().resolve(host, port, type, endpt, callback);
}
-#endif
public BufSizeWarnInfo getBufSizeWarn(short type)
{
diff --git a/csharp/src/Ice/Proxy.cs b/csharp/src/Ice/Proxy.cs
index 5c509216595..c912662cbdc 100644
--- a/csharp/src/Ice/Proxy.cs
+++ b/csharp/src/Ice/Proxy.cs
@@ -8,11 +8,9 @@
// **********************************************************************
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using IceUtilInternal;
-using Ice.Instrumentation;
namespace Ice
{
diff --git a/csharp/src/Ice/Reference.cs b/csharp/src/Ice/Reference.cs
index 0dd31858f3e..5b827fc0935 100644
--- a/csharp/src/Ice/Reference.cs
+++ b/csharp/src/Ice/Reference.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
diff --git a/csharp/src/Ice/ReferenceFactory.cs b/csharp/src/Ice/ReferenceFactory.cs
index 1a8aad17952..0bbdbc5a23c 100644
--- a/csharp/src/Ice/ReferenceFactory.cs
+++ b/csharp/src/Ice/ReferenceFactory.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
diff --git a/csharp/src/Ice/RequestHandler.cs b/csharp/src/Ice/RequestHandler.cs
index bc2359e7255..37471ceec04 100644
--- a/csharp/src/Ice/RequestHandler.cs
+++ b/csharp/src/Ice/RequestHandler.cs
@@ -7,9 +7,6 @@
//
// **********************************************************************
-using System.Collections.Generic;
-using Ice.Instrumentation;
-
namespace IceInternal
{
public interface CancellationHandler
diff --git a/csharp/src/Ice/RequestHandlerFactory.cs b/csharp/src/Ice/RequestHandlerFactory.cs
index 25c93d35a41..c30707f2492 100644
--- a/csharp/src/Ice/RequestHandlerFactory.cs
+++ b/csharp/src/Ice/RequestHandlerFactory.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System.Collections.Generic;
-using System.Diagnostics;
namespace IceInternal
{
diff --git a/csharp/src/Ice/RouterInfo.cs b/csharp/src/Ice/RouterInfo.cs
index 7a6d0cddffd..cfb7645d598 100644
--- a/csharp/src/Ice/RouterInfo.cs
+++ b/csharp/src/Ice/RouterInfo.cs
@@ -9,8 +9,6 @@
namespace IceInternal
{
-
- using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
diff --git a/csharp/src/Ice/SliceChecksums.cs b/csharp/src/Ice/SliceChecksums.cs
index 6b388683481..2f809f1fd02 100644
--- a/csharp/src/Ice/SliceChecksums.cs
+++ b/csharp/src/Ice/SliceChecksums.cs
@@ -9,7 +9,6 @@
namespace Ice
{
-
using System;
using System.Collections;
using System.Collections.Generic;
@@ -18,8 +17,6 @@ namespace Ice
public sealed class SliceChecksums
{
public static Dictionary<string, string> checksums = new Dictionary<string, string>();
-
-#if !COMPACT && !SILVERLIGHT
static SliceChecksums()
{
Type[] types = IceInternal.AssemblyUtil.findTypesWithPrefix("IceInternal.SliceChecksums");
@@ -33,7 +30,6 @@ namespace Ice
}
}
}
-#endif
}
}
diff --git a/csharp/src/Ice/StreamSocket.cs b/csharp/src/Ice/StreamSocket.cs
index 6801484906d..f5a0663f5c2 100644
--- a/csharp/src/Ice/StreamSocket.cs
+++ b/csharp/src/Ice/StreamSocket.cs
@@ -7,14 +7,6 @@
//
// **********************************************************************
-//
-// .NET and Silverlight use the new socket asynchronous APIs whereas
-// the compact framework and mono still use the old Begin/End APIs.
-//
-#if !COMPACT && !__MonoCS__ && !UNITY
-#define ICE_SOCKET_ASYNC_API
-#endif
-
namespace IceInternal
{
using System;
@@ -45,20 +37,18 @@ namespace IceInternal
{
_desc = IceInternal.Network.fdToString(_fd);
}
- catch(Exception ex)
+ catch(Exception)
{
Network.closeSocketNoThrow(_fd);
- throw ex;
+ throw;
}
init();
}
-#if !SILVERLIGHT
public void setBlock(bool block)
{
Network.setBlock(_fd, block);
}
-#endif
public int connect(Buffer readBuffer, Buffer writeBuffer, ref bool moreData)
{
@@ -69,7 +59,6 @@ namespace IceInternal
}
else if(_state <= StateConnectPending)
{
-#if ICE_SOCKET_ASYNC_API
if(_writeEventArgs.SocketError != SocketError.Success)
{
SocketException ex = new SocketException((int)_writeEventArgs.SocketError);
@@ -82,10 +71,6 @@ namespace IceInternal
throw new Ice.ConnectFailedException(ex);
}
}
-#else
- Network.doFinishConnectAsync(_fd, _writeResult);
- _writeResult = null;
-#endif
_desc = Network.fdToString(_fd, _proxy, _addr);
_state = _proxy != null ? StateProxyWrite : StateConnected;
}
@@ -186,25 +171,15 @@ namespace IceInternal
public bool startRead(Buffer buf, AsyncCallback callback, object state)
{
-#if ICE_SOCKET_ASYNC_API
Debug.Assert(_fd != null && _readEventArgs != null);
-#else
- Debug.Assert(_fd != null && _readResult == null);
-#endif
int packetSize = getRecvPacketSize(buf.b.remaining());
try
{
_readCallback = callback;
-#if ICE_SOCKET_ASYNC_API
_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(SocketException ex)
{
@@ -220,30 +195,19 @@ namespace IceInternal
{
if(_fd == null) // Transceiver was closed
{
-#if !ICE_SOCKET_ASYNC_API
- _readResult = null;
-#endif
return;
}
-#if ICE_SOCKET_ASYNC_API
Debug.Assert(_fd != null && _readEventArgs != null);
-#else
- Debug.Assert(_fd != null && _readResult != null);
-#endif
try
{
-#if ICE_SOCKET_ASYNC_API
if(_readEventArgs.SocketError != SocketError.Success)
{
throw new SocketException((int)_readEventArgs.SocketError);
}
int ret = _readEventArgs.BytesTransferred;
_readEventArgs.SetBuffer(null, 0, 0);
-#else
- int ret = _fd.EndReceive(_readResult);
- _readResult = null;
-#endif
+
if(ret == 0)
{
throw new Ice.ConnectionLostException();
@@ -273,12 +237,7 @@ namespace IceInternal
public bool startWrite(Buffer buf, AsyncCallback callback, object state, out bool completed)
{
-#if ICE_SOCKET_ASYNC_API
Debug.Assert(_fd != null && _writeEventArgs != null);
-#else
- Debug.Assert(_fd != null && _writeResult == null);
-#endif
-
if(_state == StateConnectPending)
{
completed = false;
@@ -286,14 +245,9 @@ namespace IceInternal
try
{
EndPoint addr = _proxy != null ? _proxy.getAddress() : _addr;
-#if ICE_SOCKET_ASYNC_API
_writeEventArgs.RemoteEndPoint = addr;
_writeEventArgs.UserToken = state;
return !_fd.ConnectAsync(_writeEventArgs);
-#else
- _writeResult = Network.doConnectAsync(_fd, addr, _sourceAddr, callback, state);
- return _writeResult.CompletedSynchronously;
-#endif
}
catch(Exception ex)
{
@@ -305,15 +259,9 @@ namespace IceInternal
try
{
_writeCallback = callback;
-#if ICE_SOCKET_ASYNC_API
_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,
- writeCompleted, state);
- bool completedSynchronously = _writeResult.CompletedSynchronously;
-#endif
completed = packetSize == buf.b.remaining();
return completedSynchronously;
}
@@ -339,17 +287,10 @@ namespace IceInternal
{
buf.b.position(buf.b.limit()); // Assume all the data was sent for at-most-once semantics.
}
-#if !ICE_SOCKET_ASYNC_API
- _writeResult = null;
-#endif
return;
}
-#if ICE_SOCKET_ASYNC_API
Debug.Assert(_fd != null && _writeEventArgs != null);
-#else
- Debug.Assert(_fd != null && _writeResult != null);
-#endif
if(_state < StateConnected && _state != StateProxyWrite)
{
@@ -358,17 +299,12 @@ namespace IceInternal
try
{
-#if ICE_SOCKET_ASYNC_API
if(_writeEventArgs.SocketError != SocketError.Success)
{
throw new SocketException((int)_writeEventArgs.SocketError);
}
int ret = _writeEventArgs.BytesTransferred;
_writeEventArgs.SetBuffer(null, 0, 0);
-#else
- int ret = _fd.EndSend(_writeResult);
- _writeResult = null;
-#endif
if(ret == 0)
{
throw new Ice.ConnectionLostException();
@@ -412,11 +348,9 @@ namespace IceInternal
public void destroy()
{
-#if ICE_SOCKET_ASYNC_API
Debug.Assert(_readEventArgs != null && _writeEventArgs != null);
_readEventArgs.Dispose();
_writeEventArgs.Dispose();
-#endif
}
public override string ToString()
@@ -427,16 +361,6 @@ namespace IceInternal
private int read(ByteBuffer buf)
{
Debug.Assert(_fd != null);
-
-#if COMPACT || SILVERLIGHT
- //
- // Silverlight and the Compact .NET Framework don't
- // support the use of synchronous socket operations on a
- // non-blocking socket. Returning 0 here forces the caller
- // to schedule an asynchronous operation.
- //
- return 0;
-#else
int read = 0;
while(buf.hasRemaining())
{
@@ -469,23 +393,12 @@ namespace IceInternal
}
}
return read;
-#endif
}
private int write(ByteBuffer buf)
{
Debug.Assert(_fd != null);
-#if COMPACT || SILVERLIGHT
- //
- // Silverlight and the Compact .NET Frameworks don't
- // support the use of synchronous socket operations on a
- // non-blocking socket. Returning 0 here forces the caller
- // to schedule an asynchronous operation.
- //
- return 0;
-#else
-
int packetSize = buf.remaining();
if(AssemblyUtil.platform_ == AssemblyUtil.Platform.Windows)
{
@@ -529,10 +442,7 @@ namespace IceInternal
}
}
return sent;
-#endif
}
-
-#if ICE_SOCKET_ASYNC_API
private void ioCompleted(object sender, SocketAsyncEventArgs e)
{
switch (e.LastOperation)
@@ -548,50 +458,17 @@ namespace IceInternal
throw new ArgumentException("The last operation completed on the socket was not a receive or send");
}
}
-#else
- private void readCompleted(IAsyncResult result)
- {
- if(!result.CompletedSynchronously)
- {
- _readCallback(result.AsyncState);
- }
- }
-
- private void writeCompleted(IAsyncResult result)
- {
- if(!result.CompletedSynchronously)
- {
- _writeCallback(result.AsyncState);
- }
- }
-#endif
private void init()
{
-#if !SILVERLIGHT
Network.setBlock(_fd, false);
-#endif
Network.setTcpBufSize(_fd, _instance);
-#if ICE_SOCKET_ASYNC_API
_readEventArgs = new SocketAsyncEventArgs();
_readEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
_writeEventArgs = new SocketAsyncEventArgs();
_writeEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
-# if SILVERLIGHT
- String policy = _instance.properties().getProperty("Ice.ClientAccessPolicyProtocol");
- if(policy.Equals("Http"))
- {
- _readEventArgs.SocketClientAccessPolicyProtocol = SocketClientAccessPolicyProtocol.Http;
- _writeEventArgs.SocketClientAccessPolicyProtocol = SocketClientAccessPolicyProtocol.Http;
- }
- else if(!String.IsNullOrEmpty(policy))
- {
- _instance.logger().warning("Ignoring invalid Ice.ClientAccessPolicyProtocol value `" + policy + "'");
- }
-# endif
-#endif
//
// For timeouts to work properly, we need to receive/send
@@ -628,13 +505,8 @@ namespace IceInternal
private int _state;
private string _desc;
-#if ICE_SOCKET_ASYNC_API
private SocketAsyncEventArgs _writeEventArgs;
private SocketAsyncEventArgs _readEventArgs;
-#else
- private IAsyncResult _writeResult;
- private IAsyncResult _readResult;
-#endif
AsyncCallback _writeCallback;
AsyncCallback _readCallback;
diff --git a/csharp/src/Ice/StreamWrapper.cs b/csharp/src/Ice/StreamWrapper.cs
index 5bb5d653de6..983182a9ff6 100644
--- a/csharp/src/Ice/StreamWrapper.cs
+++ b/csharp/src/Ice/StreamWrapper.cs
@@ -10,11 +10,8 @@
namespace IceInternal
{
-
- using System;
using System.Diagnostics;
using System.IO;
- using System.Text;
//
// Classes to provide a System.IO.Stream interface on top of an Ice stream.
diff --git a/csharp/src/Ice/SysLoggerI.cs b/csharp/src/Ice/SysLoggerI.cs
index d1524d4b13e..f4b5650659c 100644
--- a/csharp/src/Ice/SysLoggerI.cs
+++ b/csharp/src/Ice/SysLoggerI.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-#if !SILVERLIGHT
using System.Net.Sockets;
namespace Ice
@@ -231,4 +230,3 @@ namespace Ice
}
}
-#endif
diff --git a/csharp/src/Ice/TcpAcceptor.cs b/csharp/src/Ice/TcpAcceptor.cs
index 26733afcbe0..8bddfc491ea 100644
--- a/csharp/src/Ice/TcpAcceptor.cs
+++ b/csharp/src/Ice/TcpAcceptor.cs
@@ -7,8 +7,6 @@
//
// **********************************************************************
-#if !SILVERLIGHT
-
namespace IceInternal
{
using System;
@@ -136,9 +134,7 @@ namespace IceInternal
_addr = (IPEndPoint)Network.getAddressForServer(host, port, protocol, _instance.preferIPv6());
_fd = Network.createServerSocket(false, _addr.AddressFamily, protocol);
Network.setBlock(_fd, false);
-# if !COMPACT
Network.setTcpBufSize(_fd, _instance);
-# endif
if(AssemblyUtil.platform_ != AssemblyUtil.Platform.Windows)
{
//
@@ -173,4 +169,3 @@ namespace IceInternal
private IAsyncResult _result;
}
}
-#endif
diff --git a/csharp/src/Ice/TcpConnector.cs b/csharp/src/Ice/TcpConnector.cs
index 287b0d97671..a4ca495c2a2 100644
--- a/csharp/src/Ice/TcpConnector.cs
+++ b/csharp/src/Ice/TcpConnector.cs
@@ -9,10 +9,7 @@
namespace IceInternal
{
- using System;
- using System.Diagnostics;
using System.Net;
- using System.Net.Sockets;
sealed class TcpConnector : Connector
{
diff --git a/csharp/src/Ice/TcpEndpointI.cs b/csharp/src/Ice/TcpEndpointI.cs
index 6541470e53b..bb8c0e18638 100644
--- a/csharp/src/Ice/TcpEndpointI.cs
+++ b/csharp/src/Ice/TcpEndpointI.cs
@@ -9,10 +9,8 @@
namespace IceInternal
{
- using System.Diagnostics;
using System.Collections.Generic;
using System.Net;
- using System;
using System.Globalization;
sealed class TcpEndpointI : IPEndpointI, WSEndpointDelegate
@@ -150,20 +148,14 @@ namespace IceInternal
public override Acceptor acceptor(string adapterName)
{
-#if SILVERLIGHT
- throw new Ice.FeatureNotSupportedException("server endpoint not supported for `" + ToString() + "'");
-#else
return new TcpAcceptor(this, instance_, host_, port_);
-#endif
}
-#if !SILVERLIGHT
public TcpEndpointI endpoint(TcpAcceptor acceptor)
{
return new TcpEndpointI(instance_, host_, acceptor.effectivePort(), sourceAddr_, _timeout, connectionId_,
_compress);
}
-#endif
public override string options()
{
diff --git a/csharp/src/Ice/TcpTransceiver.cs b/csharp/src/Ice/TcpTransceiver.cs
index 67e948d764f..42cf3319890 100644
--- a/csharp/src/Ice/TcpTransceiver.cs
+++ b/csharp/src/Ice/TcpTransceiver.cs
@@ -9,8 +9,6 @@
namespace IceInternal
{
- using System;
- using System.ComponentModel;
using System.Diagnostics;
using System.Collections.Generic;
using System.Net;
diff --git a/csharp/src/Ice/ThreadPool.cs b/csharp/src/Ice/ThreadPool.cs
index a4abc6c64a0..d42b087f82b 100644
--- a/csharp/src/Ice/ThreadPool.cs
+++ b/csharp/src/Ice/ThreadPool.cs
@@ -9,8 +9,6 @@
namespace IceInternal
{
-
- using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
@@ -196,8 +194,6 @@ namespace IceInternal
stackSize = 0;
}
_stackSize = stackSize;
-
-#if !SILVERLIGHT
_hasPriority = properties.getProperty(_prefix + ".ThreadPriority").Length > 0;
_priority = IceInternal.Util.stringToThreadPriority(properties.getProperty(_prefix + ".ThreadPriority"));
if(!_hasPriority)
@@ -205,7 +201,6 @@ namespace IceInternal
_hasPriority = properties.getProperty("Ice.ThreadPriority").Length > 0;
_priority = IceInternal.Util.stringToThreadPriority(properties.getProperty("Ice.ThreadPriority"));
}
-#endif
if(_instance.traceLevels().threadPool >= 1)
{
@@ -222,7 +217,6 @@ namespace IceInternal
for(int i = 0; i < _size; ++i)
{
WorkerThread thread = new WorkerThread(this, _threadPrefix + "-" + _threadIndex++);
-#if !SILVERLIGHT
if(_hasPriority)
{
thread.start(_priority);
@@ -231,9 +225,6 @@ namespace IceInternal
{
thread.start(ThreadPriority.Normal);
}
-#else
- thread.start();
-#endif
_threads.Add(thread);
}
}
@@ -351,11 +342,7 @@ namespace IceInternal
}
}
-#if COMPACT
- public void dispatchFromThisThread(Ice.VoidAction call, Ice.Connection con)
-#else
public void dispatchFromThisThread(System.Action call, Ice.Connection con)
-#endif
{
if(_dispatcher != null)
{
@@ -378,11 +365,7 @@ namespace IceInternal
}
}
-#if COMPACT
- public void dispatch(Ice.VoidAction call, Ice.Connection con)
-#else
public void dispatch(System.Action call, Ice.Connection con)
-#endif
{
lock(this)
{
@@ -415,7 +398,6 @@ namespace IceInternal
try
{
WorkerThread t = new WorkerThread(this, _threadPrefix + "-" + _threadIndex++);
-#if !SILVERLIGHT
if(_hasPriority)
{
t.start(_priority);
@@ -424,9 +406,6 @@ namespace IceInternal
{
t.start(ThreadPriority.Normal);
}
-#else
- t.start();
-#endif
_threads.Add(t);
}
catch(System.Exception ex)
@@ -778,7 +757,6 @@ namespace IceInternal
_thread.Join();
}
-#if !SILVERLIGHT
public void start(ThreadPriority priority)
{
if(_threadPool._stackSize == 0)
@@ -794,15 +772,6 @@ 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()
{
@@ -858,10 +827,8 @@ 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/csharp/src/Ice/Time.cs b/csharp/src/Ice/Time.cs
index 4b5f57e29d4..7223291991d 100644
--- a/csharp/src/Ice/Time.cs
+++ b/csharp/src/Ice/Time.cs
@@ -9,7 +9,6 @@
namespace IceInternal
{
-#if !SILVERLIGHT
using System.Diagnostics;
public sealed class Time
@@ -26,78 +25,4 @@ namespace IceInternal
private static Stopwatch _stopwatch = new Stopwatch();
}
-
-#else
-
- public class Stopwatch
- {
- public void Start()
- {
- if(!_running)
- {
- _startTick = System.DateTime.Now.Ticks;
- _running = true;
- }
- }
-
- public void Stop()
- {
- if(_running)
- {
- _elapsedTicks += System.DateTime.Now.Ticks - _startTick;
- _running = false;
- }
-
- }
-
- public void Reset()
- {
- _startTick = 0;
- _elapsedTicks = 0;
- _running = false;
- }
-
- public long ElapsedTicks
- {
- get
- {
- if(!_running)
- {
- return _elapsedTicks;
- }
- else
- {
- return _elapsedTicks + (System.DateTime.Now.Ticks - _startTick);
- }
- }
- }
-
- public long Frequency
- {
- get
- {
- return System.TimeSpan.TicksPerMillisecond * 1000;
- }
- }
-
- private long _startTick = 0;
- private long _elapsedTicks = 0;
- private bool _running = false;
- }
-
- 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/csharp/src/Ice/Timer.cs b/csharp/src/Ice/Timer.cs
index 497b60975c4..266faf90a19 100644
--- a/csharp/src/Ice/Timer.cs
+++ b/csharp/src/Ice/Timer.cs
@@ -15,10 +15,8 @@
namespace IceInternal
{
- using System;
using System.Diagnostics;
using System.Threading;
- using System.Collections;
using System.Collections.Generic;
public interface TimerTask
@@ -61,16 +59,7 @@ 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)
{
@@ -98,16 +87,7 @@ 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)
{
@@ -144,27 +124,17 @@ 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
}
-#if !SILVERLIGHT
internal void init(IceInternal.Instance instance, ThreadPriority priority, bool hasPriority)
-#else
- internal void init(IceInternal.Instance instance)
-#endif
{
_instance = instance;
@@ -177,12 +147,10 @@ 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();
}
@@ -220,16 +188,7 @@ 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
}
}
}
@@ -256,11 +215,7 @@ 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;
@@ -389,13 +344,7 @@ namespace IceInternal
public TimerTask task;
}
-#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
private IDictionary<TimerTask, Token> _tasks = new Dictionary<TimerTask, Token>();
private Instance _instance;
private long _wakeUpTime = System.Int64.MaxValue;
diff --git a/csharp/src/Ice/TraceLevels.cs b/csharp/src/Ice/TraceLevels.cs
index 9d9cce0bb96..185d64151bd 100644
--- a/csharp/src/Ice/TraceLevels.cs
+++ b/csharp/src/Ice/TraceLevels.cs
@@ -9,7 +9,6 @@
namespace IceInternal
{
-
public sealed class TraceLevels
{
internal TraceLevels(Ice.Properties properties)
diff --git a/csharp/src/Ice/TraceUtil.cs b/csharp/src/Ice/TraceUtil.cs
index 1e74629e761..e191dfe7e05 100644
--- a/csharp/src/Ice/TraceUtil.cs
+++ b/csharp/src/Ice/TraceUtil.cs
@@ -9,7 +9,6 @@
namespace IceInternal
{
-
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
diff --git a/csharp/src/Ice/Transceiver.cs b/csharp/src/Ice/Transceiver.cs
index f1f4a512b02..70f5260b65e 100644
--- a/csharp/src/Ice/Transceiver.cs
+++ b/csharp/src/Ice/Transceiver.cs
@@ -9,7 +9,6 @@
namespace IceInternal
{
- using System;
using System.Net.Sockets;
public interface Transceiver
diff --git a/csharp/src/Ice/UdpConnector.cs b/csharp/src/Ice/UdpConnector.cs
index 7de5ab2d217..b9aea3b0a58 100644
--- a/csharp/src/Ice/UdpConnector.cs
+++ b/csharp/src/Ice/UdpConnector.cs
@@ -9,10 +9,7 @@
namespace IceInternal
{
- using System;
- using System.Diagnostics;
using System.Net;
- using System.Net.Sockets;
sealed class UdpConnector : Connector
{
diff --git a/csharp/src/Ice/UdpTransceiver.cs b/csharp/src/Ice/UdpTransceiver.cs
index 612edd6565f..e2ac691bf86 100644
--- a/csharp/src/Ice/UdpTransceiver.cs
+++ b/csharp/src/Ice/UdpTransceiver.cs
@@ -7,14 +7,6 @@
//
// **********************************************************************
-//
-// .NET and Silverlight use the new socket asynchronous APIs whereas
-// the compact framework and mono still use the old Begin/End APIs.
-//
-#if !COMPACT && !__MonoCS__ && !UNITY
-#define ICE_SOCKET_ASYNC_API
-#endif
-
namespace IceInternal
{
using System;
@@ -37,7 +29,6 @@ namespace IceInternal
if(_state == StateNeedConnect)
{
_state = StateConnectPending;
-#if ICE_SOCKET_ASYNC_API && !SILVERLIGHT
try
{
if(_sourceAddr != null)
@@ -58,14 +49,10 @@ namespace IceInternal
{
throw new Ice.ConnectFailedException(ex);
}
-#else
- return SocketOperation.Connect;
-#endif
}
if(_state <= StateConnectPending)
{
-#if !SILVERLIGHT
if(!AssemblyUtil.osx_)
{
//
@@ -82,7 +69,6 @@ namespace IceInternal
}
}
}
-#endif
_state = StateConnected;
}
@@ -115,7 +101,6 @@ namespace IceInternal
public EndpointI bind()
{
-#if !SILVERLIGHT
if(Network.isMulticast((IPEndPoint)_addr))
{
Network.setReuseAddress(_fd, true);
@@ -165,7 +150,6 @@ namespace IceInternal
}
_addr = Network.doBind(_fd, _addr);
}
-#endif
_bound = true;
_endpoint = _endpoint.endpoint(this);
return _endpoint;
@@ -173,10 +157,8 @@ namespace IceInternal
public void destroy()
{
-#if ICE_SOCKET_ASYNC_API
_readEventArgs.Dispose();
_writeEventArgs.Dispose();
-#endif
}
public int write(Buffer buf)
@@ -185,20 +167,7 @@ namespace IceInternal
{
return SocketOperation.None;
}
-#if COMPACT || SILVERLIGHT
-# if !ICE_SOCKET_ASYNC_API
- if(_writeResult != null)
- {
- return SocketOperation.None;
- }
-# endif
- //
- // Silverlight and the Compact .NET Framework don't support the use of synchronous socket
- // operations on a non-blocking socket. Returning SocketOperation.Write here forces the
- // caller to schedule an asynchronous operation.
- //
- return SocketOperation.Write;
-#else
+
Debug.Assert(buf.b.position() == 0);
Debug.Assert(_fd != null && _state >= StateConnected);
@@ -255,7 +224,6 @@ namespace IceInternal
Debug.Assert(ret == buf.b.limit());
buf.b.position(buf.b.limit());
return SocketOperation.None;
-#endif
}
public int read(Buffer buf, ref bool hasMoreData)
@@ -264,14 +232,7 @@ namespace IceInternal
{
return SocketOperation.None;
}
-#if COMPACT || SILVERLIGHT
- //
- // Silverlight and the Compact .NET Framework don't support the use of synchronous socket
- // operations on a non-blocking socket. Returning SocketOperation.Read here forces the
- // caller to schedule an asynchronous operation.
- //
- return SocketOperation.Read;
-#else
+
Debug.Assert(buf.b.position() == 0);
Debug.Assert(_fd != null);
@@ -372,7 +333,6 @@ namespace IceInternal
buf.b.position(ret);
return SocketOperation.None;
-#endif
}
public bool startRead(Buffer buf, AsyncCallback callback, object state)
@@ -388,42 +348,17 @@ namespace IceInternal
if(_state == StateConnected)
{
_readCallback = callback;
-#if ICE_SOCKET_ASYNC_API
_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 ICE_SOCKET_ASYNC_API
_readEventArgs.UserToken = state;
_readEventArgs.SetBuffer(buf.b.rawBytes(), 0, buf.b.limit());
return !_fd.ReceiveFromAsync(_readEventArgs);
-#else
- EndPoint peerAddr = _peerAddr;
- if(peerAddr == null)
- {
- if(_addr.AddressFamily == AddressFamily.InterNetwork)
- {
- peerAddr = new IPEndPoint(IPAddress.Any, 0);
- }
- else
- {
- Debug.Assert(_addr.AddressFamily == AddressFamily.InterNetworkV6);
- peerAddr = new IPEndPoint(IPAddress.IPv6Any, 0);
- }
- }
- _readResult = _fd.BeginReceiveFrom(buf.b.rawBytes(), 0, buf.b.limit(), SocketFlags.None,
- ref peerAddr, readCompleted, state);
- return _readResult.CompletedSynchronously;
-#endif
}
}
catch(SocketException ex)
@@ -457,7 +392,6 @@ namespace IceInternal
int ret;
try
{
-#if ICE_SOCKET_ASYNC_API
if(_readEventArgs.SocketError != SocketError.Success)
{
throw new SocketException((int)_readEventArgs.SocketError);
@@ -467,29 +401,6 @@ namespace IceInternal
{
_peerAddr = _readEventArgs.RemoteEndPoint;
}
-#else
- Debug.Assert(_readResult != null);
- if(_state == StateConnected)
- {
- ret = _fd.EndReceive(_readResult);
- }
- else
- {
- EndPoint peerAddr = _peerAddr;
- if(_addr.AddressFamily == AddressFamily.InterNetwork)
- {
- peerAddr = new IPEndPoint(IPAddress.Any, 0);
- }
- else
- {
- Debug.Assert(_addr.AddressFamily == AddressFamily.InterNetworkV6);
- peerAddr = new IPEndPoint(IPAddress.IPv6Any, 0);
- }
- ret = _fd.EndReceiveFrom(_readResult, ref peerAddr);
- _peerAddr = (IPEndPoint)peerAddr;
- }
- _readResult = null;
-#endif
}
catch(SocketException ex)
{
@@ -533,11 +444,7 @@ namespace IceInternal
// If we must connect, then we connect to the first peer that
// sends us a packet.
//
-#if ICE_SOCKET_ASYNC_API
bool connected = !_fd.ConnectAsync(_readEventArgs);
-#else
- bool connected = Network.doConnect(_fd, _peerAddr, null);
-#endif
Debug.Assert(connected);
_state = StateConnected; // We're connected now
@@ -558,19 +465,12 @@ namespace IceInternal
{
Debug.Assert(_addr != null);
completed = false;
-#if ICE_SOCKET_ASYNC_API
-# if !SILVERLIGHT
if(_sourceAddr != null)
{
_fd.Bind(_sourceAddr);
}
-# endif
_writeEventArgs.UserToken = state;
return !_fd.ConnectAsync(_writeEventArgs);
-#else
- _writeResult = Network.doConnectAsync(_fd, _addr, _sourceAddr, callback, state);
- return _writeResult.CompletedSynchronously;
-#endif
}
Debug.Assert(_fd != null);
@@ -587,15 +487,9 @@ namespace IceInternal
if(_state == StateConnected)
{
-#if ICE_SOCKET_ASYNC_API
_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
{
@@ -603,16 +497,10 @@ namespace IceInternal
{
throw new Ice.SocketException();
}
-#if ICE_SOCKET_ASYNC_API
_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,
- writeCompleted, state);
- completedSynchronously = _writeResult.CompletedSynchronously;
-#endif
}
}
catch(SocketException ex)
@@ -636,17 +524,12 @@ namespace IceInternal
if(_fd == null)
{
buf.b.position(buf.size()); // Assume all the data was sent for at-most-once semantics.
-#if ICE_SOCKET_ASYNC_API
_writeEventArgs = null;
-#else
- _writeResult = null;
-#endif
return;
}
if(!_incoming && _state < StateConnected)
{
-#if ICE_SOCKET_ASYNC_API
if(_writeEventArgs.SocketError != SocketError.Success)
{
SocketException ex = new SocketException((int)_writeEventArgs.SocketError);
@@ -659,34 +542,17 @@ namespace IceInternal
throw new Ice.ConnectFailedException(ex);
}
}
-#else
- Debug.Assert(_writeResult != null);
- Network.doFinishConnectAsync(_fd, _writeResult);
- _writeResult = null;
-#endif
return;
}
int ret;
try
{
-#if ICE_SOCKET_ASYNC_API
if(_writeEventArgs.SocketError != SocketError.Success)
{
throw new SocketException((int)_writeEventArgs.SocketError);
}
ret = _writeEventArgs.BytesTransferred;
-#else
- if (_state == StateConnected)
- {
- ret = _fd.EndSend(_writeResult);
- }
- else
- {
- ret = _fd.EndSendTo(_writeResult);
- }
- _writeResult = null;
-#endif
}
catch(SocketException ex)
{
@@ -745,13 +611,11 @@ namespace IceInternal
info.rcvSize = Network.getRecvBufferSize(_fd);
info.sndSize = Network.getSendBufferSize(_fd);
-#if !SILVERLIGHT
if(_mcastAddr != null)
{
info.mcastAddress = Network.endpointAddressToString(_mcastAddr);
info.mcastPort = Network.endpointPort(_mcastAddr);
}
-#endif
return info;
}
@@ -798,12 +662,10 @@ namespace IceInternal
s = Network.fdToString(_fd);
}
-#if !SILVERLIGHT
if(_mcastAddr != null)
{
s += "\nmulticast address = " + Network.addrToString(_mcastAddr);
}
-#endif
return s;
}
@@ -835,7 +697,6 @@ namespace IceInternal
_addr = addr;
_sourceAddr = sourceAddr;
-#if ICE_SOCKET_ASYNC_API
_readEventArgs = new SocketAsyncEventArgs();
_readEventArgs.RemoteEndPoint = _addr;
_readEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
@@ -843,19 +704,6 @@ namespace IceInternal
_writeEventArgs = new SocketAsyncEventArgs();
_writeEventArgs.RemoteEndPoint = _addr;
_writeEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
-#if SILVERLIGHT
- String policy = instance.properties().getProperty("Ice.ClientAccessPolicyProtocol");
- if(policy.Equals("Http"))
- {
- _readEventArgs.SocketClientAccessPolicyProtocol = SocketClientAccessPolicyProtocol.Http;
- _writeEventArgs.SocketClientAccessPolicyProtocol = SocketClientAccessPolicyProtocol.Http;
- }
- else if(!String.IsNullOrEmpty(policy))
- {
- _instance.logger().warning("Ignoring invalid Ice.ClientAccessPolicyProtocol value `" + policy + "'");
- }
-#endif
-#endif
_mcastInterface = mcastInterface;
_mcastTtl = mcastTtl;
@@ -866,7 +714,6 @@ namespace IceInternal
{
_fd = Network.createSocket(true, _addr.AddressFamily);
setBufSize(-1, -1);
-#if !SILVERLIGHT
Network.setBlock(_fd, false);
if(Network.isMulticast((IPEndPoint)_addr))
{
@@ -888,7 +735,6 @@ namespace IceInternal
}
}
}
-#endif
}
catch(Ice.LocalException)
{
@@ -914,7 +760,6 @@ namespace IceInternal
{
_addr = Network.getAddressForServer(host, port, instance.protocolSupport(), instance.preferIPv6());
-#if ICE_SOCKET_ASYNC_API
_readEventArgs = new SocketAsyncEventArgs();
_readEventArgs.RemoteEndPoint = _addr;
_readEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
@@ -922,17 +767,13 @@ namespace IceInternal
_writeEventArgs = new SocketAsyncEventArgs();
_writeEventArgs.RemoteEndPoint = _addr;
_writeEventArgs.Completed += new EventHandler<SocketAsyncEventArgs>(ioCompleted);
-#endif
_fd = Network.createServerSocket(true, _addr.AddressFamily, instance.protocolSupport());
setBufSize(-1, -1);
-#if !SILVERLIGHT
Network.setBlock(_fd, false);
-#endif
}
catch(Ice.LocalException)
{
-#if ICE_SOCKET_ASYNC_API
if(_readEventArgs != null)
{
_readEventArgs.Dispose();
@@ -941,7 +782,6 @@ namespace IceInternal
{
_writeEventArgs.Dispose();
}
-#endif
_fd = null;
throw;
}
@@ -1042,15 +882,12 @@ namespace IceInternal
}
}
-#if ICE_SOCKET_ASYNC_API
internal void ioCompleted(object sender, SocketAsyncEventArgs e)
{
switch (e.LastOperation)
{
case SocketAsyncOperation.Receive:
-#if !SILVERLIGHT
case SocketAsyncOperation.ReceiveFrom:
-#endif
_readCallback(e.UserToken);
break;
case SocketAsyncOperation.Send:
@@ -1061,23 +898,6 @@ namespace IceInternal
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 UdpEndpointI _endpoint;
private ProtocolInstance _instance;
@@ -1088,9 +908,7 @@ namespace IceInternal
private Socket _fd;
private EndPoint _addr;
private EndPoint _sourceAddr;
-#if !SILVERLIGHT
private IPEndPoint _mcastAddr = null;
-#endif
private EndPoint _peerAddr = null;
private string _mcastInterface = null;
private int _mcastTtl = -1;
@@ -1098,13 +916,8 @@ namespace IceInternal
private int _port = 0;
private bool _bound = false;
-#if ICE_SOCKET_ASYNC_API
private SocketAsyncEventArgs _writeEventArgs;
private SocketAsyncEventArgs _readEventArgs;
-#else
- private IAsyncResult _writeResult;
- private IAsyncResult _readResult;
-#endif
AsyncCallback _writeCallback;
AsyncCallback _readCallback;
diff --git a/csharp/src/Ice/UserExceptionFactory.cs b/csharp/src/Ice/UserExceptionFactory.cs
deleted file mode 100644
index 05df87217cb..00000000000
--- a/csharp/src/Ice/UserExceptionFactory.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// **********************************************************************
-//
-// Copyright (c) 2003-2016 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 IceInternal
-{
-
- public interface UserExceptionFactory
- {
- void createAndThrow(string typeId);
- void destroy();
- }
-
-}
diff --git a/csharp/src/Ice/Util.cs b/csharp/src/Ice/Util.cs
index 2221b360565..5c286fd2712 100644
--- a/csharp/src/Ice/Util.cs
+++ b/csharp/src/Ice/Util.cs
@@ -37,22 +37,11 @@ namespace Ice
void stop();
}
-#if COMPACT
- /// <summary>
- /// A delegate for an action taking no parameters.
- /// </summary>
- public delegate void VoidAction();
-#endif
-
/// <summary>
/// A delegate for the dispatcher. The dispatcher is called by the Ice
/// runtime to dispatch servant calls and AMI callbacks.
/// </summary>
-#if COMPACT
- public delegate void Dispatcher(VoidAction call, Connection con);
-#else
public delegate void Dispatcher(System.Action call, Connection con);
-#endif
/// <summary>
/// Applications that make use of compact type IDs to conserve space
@@ -700,7 +689,6 @@ namespace IceInternal
return new ProtocolPluginFacadeI(communicator);
}
-#if !SILVERLIGHT
public static System.Threading.ThreadPriority stringToThreadPriority(string s)
{
if(String.IsNullOrEmpty(s))
@@ -733,16 +721,5 @@ namespace IceInternal
}
return ThreadPriority.Normal;
}
-#endif
- }
-}
-
-#if SILVERLIGHT
-namespace System
-{
- public interface ICloneable
- {
- Object Clone();
}
}
-#endif
diff --git a/csharp/src/Ice/ValueWriter.cs b/csharp/src/Ice/ValueWriter.cs
index 8adb2142726..9973e8a51d4 100644
--- a/csharp/src/Ice/ValueWriter.cs
+++ b/csharp/src/Ice/ValueWriter.cs
@@ -9,7 +9,6 @@
namespace IceInternal
{
-
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
diff --git a/csharp/src/Ice/WSAcceptor.cs b/csharp/src/Ice/WSAcceptor.cs
index 2fade1c081a..5b0709b3ccf 100644
--- a/csharp/src/Ice/WSAcceptor.cs
+++ b/csharp/src/Ice/WSAcceptor.cs
@@ -9,8 +9,6 @@
namespace IceInternal
{
- using System.Diagnostics;
-
class WSAcceptor : Acceptor
{
public void close()
diff --git a/csharp/src/Ice/WSEndpoint.cs b/csharp/src/Ice/WSEndpoint.cs
index be0e2d9dbb7..affc7d0bdfd 100644
--- a/csharp/src/Ice/WSEndpoint.cs
+++ b/csharp/src/Ice/WSEndpoint.cs
@@ -12,7 +12,6 @@ namespace IceInternal
using System;
using System.Diagnostics;
using System.Collections.Generic;
- using System.Globalization;
//
// Delegate interface implemented by TcpEndpoint or IceSSL.EndpointI or any endpoint that WS can
diff --git a/csharp/src/Ice/WSTransceiver.cs b/csharp/src/Ice/WSTransceiver.cs
index 4c83b0148cb..761cb164264 100644
--- a/csharp/src/Ice/WSTransceiver.cs
+++ b/csharp/src/Ice/WSTransceiver.cs
@@ -875,12 +875,7 @@ namespace IceInternal
//
@out.Append("Sec-WebSocket-Accept: ");
string input = key + _wsUUID;
-#if SILVERLIGHT
- SHA1Managed sha1 = new SHA1Managed();
- byte[] hash = sha1.ComputeHash(_utf8.GetBytes(input));
-#else
byte[] hash = SHA1.Create().ComputeHash(_utf8.GetBytes(input));
-#endif
@out.Append(IceUtilInternal.Base64.encode(hash) + "\r\n" + "\r\n"); // EOM
byte[] bytes = _utf8.GetBytes(@out.ToString());
@@ -982,12 +977,7 @@ namespace IceInternal
}
string input = _key + _wsUUID;
-#if SILVERLIGHT
- SHA1Managed sha1 = new SHA1Managed();
- byte[] hash = sha1.ComputeHash(_utf8.GetBytes(input));
-#else
byte[] hash = SHA1.Create().ComputeHash(_utf8.GetBytes(input));
-#endif
if(!val.Equals(IceUtilInternal.Base64.encode(hash)))
{
throw new WebSocketException("invalid value `" + val + "' for Sec-WebSocket-Accept");
diff --git a/csharp/src/Ice/msbuild/ice.csproj b/csharp/src/Ice/msbuild/ice.csproj
index 4ca19c3b67d..467b0c7c1ed 100644
--- a/csharp/src/Ice/msbuild/ice.csproj
+++ b/csharp/src/Ice/msbuild/ice.csproj
@@ -63,9 +63,6 @@
<Compile Include="..\BZip2.cs">
<Link>BZip2.cs</Link>
</Compile>
- <Compile Include="..\CollectionBase.cs">
- <Link>CollectionBase.cs</Link>
- </Compile>
<Compile Include="..\Collections.cs">
<Link>Collections.cs</Link>
</Compile>
@@ -96,9 +93,6 @@
<Compile Include="..\DefaultsAndOverrides.cs">
<Link>DefaultsAndOverrides.cs</Link>
</Compile>
- <Compile Include="..\DictionaryBase.cs">
- <Link>DictionaryBase.cs</Link>
- </Compile>
<Compile Include="..\DispatchInterceptor.cs">
<Link>DispatchInterceptor.cs</Link>
</Compile>
@@ -123,9 +117,6 @@
<Compile Include="..\FormatType.cs">
<Link>FormatType.cs</Link>
</Compile>
- <Compile Include="..\HashSet.cs">
- <Link>HashSet.cs</Link>
- </Compile>
<Compile Include="..\HttpParser.cs">
<Link>HttpParser.cs</Link>
</Compile>
@@ -342,9 +333,6 @@
<Compile Include="..\UnknownSlicedObject.cs">
<Link>UnknownSlicedObject.cs</Link>
</Compile>
- <Compile Include="..\UserExceptionFactory.cs">
- <Link>UserExceptionFactory.cs</Link>
- </Compile>
<Compile Include="..\Util.cs">
<Link>Util.cs</Link>
</Compile>
@@ -368,40 +356,27 @@
</Compile>
<Compile Include="generated\BuiltinSequences.cs" />
<Compile Include="generated\Communicator.cs" />
- <Compile Include="generated\CommunicatorF.cs" />
<Compile Include="generated\Connection.cs" />
- <Compile Include="generated\ConnectionF.cs" />
<Compile Include="generated\Current.cs" />
<Compile Include="generated\Endpoint.cs" />
- <Compile Include="generated\EndpointF.cs" />
<Compile Include="generated\EndpointTypes.cs" />
<Compile Include="generated\FacetMap.cs" />
<Compile Include="generated\Identity.cs" />
<Compile Include="generated\ImplicitContext.cs" />
- <Compile Include="generated\ImplicitContextF.cs" />
<Compile Include="generated\Instrumentation.cs" />
- <Compile Include="generated\InstrumentationF.cs" />
<Compile Include="generated\LocalException.cs" />
<Compile Include="generated\Locator.cs" />
- <Compile Include="generated\LocatorF.cs" />
<Compile Include="generated\Logger.cs" />
- <Compile Include="generated\LoggerF.cs" />
<Compile Include="generated\Metrics.cs" />
<Compile Include="generated\ObjectAdapter.cs" />
- <Compile Include="generated\ObjectAdapterF.cs" />
<Compile Include="generated\ObjectFactory.cs" />
<Compile Include="generated\Plugin.cs" />
- <Compile Include="generated\PluginF.cs" />
<Compile Include="generated\Process.cs" />
- <Compile Include="generated\ProcessF.cs" />
<Compile Include="generated\Properties.cs" />
<Compile Include="generated\PropertiesAdmin.cs" />
- <Compile Include="generated\PropertiesF.cs" />
<Compile Include="generated\RemoteLogger.cs" />
<Compile Include="generated\Router.cs" />
- <Compile Include="generated\RouterF.cs" />
<Compile Include="generated\ServantLocator.cs" />
- <Compile Include="generated\ServantLocatorF.cs" />
<Compile Include="generated\SliceChecksumDict.cs" />
<Compile Include="generated\ValueFactory.cs" />
<Compile Include="generated\Version.cs" />
@@ -413,24 +388,15 @@
<None Include="..\..\..\..\slice\Ice\Communicator.ice">
<Link>Communicator.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\CommunicatorF.ice">
- <Link>CommunicatorF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\Connection.ice">
<Link>Connection.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\ConnectionF.ice">
- <Link>ConnectionF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\Current.ice">
<Link>Current.ice</Link>
</None>
<None Include="..\..\..\..\slice\Ice\Endpoint.ice">
<Link>Endpoint.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\EndpointF.ice">
- <Link>EndpointF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\EndpointTypes.ice">
<Link>EndpointTypes.ice</Link>
</None>
@@ -443,78 +409,48 @@
<None Include="..\..\..\..\slice\Ice\ImplicitContext.ice">
<Link>ImplicitContext.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\ImplicitContextF.ice">
- <Link>ImplicitContextF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\Instrumentation.ice">
<Link>Instrumentation.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\InstrumentationF.ice">
- <Link>InstrumentationF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\LocalException.ice">
<Link>LocalException.ice</Link>
</None>
<None Include="..\..\..\..\slice\Ice\Locator.ice">
<Link>Locator.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\LocatorF.ice">
- <Link>LocatorF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\Logger.ice">
<Link>Logger.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\LoggerF.ice">
- <Link>LoggerF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\Metrics.ice">
<Link>Metrics.ice</Link>
</None>
<None Include="..\..\..\..\slice\Ice\ObjectAdapter.ice">
<Link>ObjectAdapter.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\ObjectAdapterF.ice">
- <Link>ObjectAdapterF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\ObjectFactory.ice">
<Link>ObjectFactory.ice</Link>
</None>
<None Include="..\..\..\..\slice\Ice\Plugin.ice">
<Link>Plugin.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\PluginF.ice">
- <Link>PluginF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\Process.ice">
<Link>Process.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\ProcessF.ice">
- <Link>ProcessF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\Properties.ice">
<Link>Properties.ice</Link>
</None>
<None Include="..\..\..\..\slice\Ice\PropertiesAdmin.ice">
<Link>PropertiesAdmin.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\PropertiesF.ice">
- <Link>PropertiesF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\RemoteLogger.ice">
<Link>RemoteLogger.ice</Link>
</None>
<None Include="..\..\..\..\slice\Ice\Router.ice">
<Link>Router.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\RouterF.ice">
- <Link>RouterF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\ServantLocator.ice">
<Link>ServantLocator.ice</Link>
</None>
- <None Include="..\..\..\..\slice\Ice\ServantLocatorF.ice">
- <Link>ServantLocatorF.ice</Link>
- </None>
<None Include="..\..\..\..\slice\Ice\SliceChecksumDict.ice">
<Link>SliceChecksumDict.ice</Link>
</None>
diff --git a/csharp/src/IceBox/ServiceManagerI.cs b/csharp/src/IceBox/ServiceManagerI.cs
index 30c6ae3a269..badb590bcce 100644
--- a/csharp/src/IceBox/ServiceManagerI.cs
+++ b/csharp/src/IceBox/ServiceManagerI.cs
@@ -725,14 +725,14 @@ class ServiceManagerI : ServiceManagerDisp_
info.status = ServiceStatus.Started;
_services.Add(info);
}
- catch(System.Exception ex)
+ catch(System.Exception)
{
if(info.communicator != null)
{
destroyServiceCommunicator(service, info.communicator);
}
- throw ex;
+ throw;
}
}
diff --git a/csharp/src/IceSSL/RFC2253.cs b/csharp/src/IceSSL/RFC2253.cs
index c535cd5b34b..1ff869cfe15 100644
--- a/csharp/src/IceSSL/RFC2253.cs
+++ b/csharp/src/IceSSL/RFC2253.cs
@@ -20,7 +20,7 @@ namespace IceSSL
class RFC2253
{
- internal class ParseException : System.Exception
+ internal class ParseException : Exception
{
internal ParseException()
{
diff --git a/csharp/src/IceSSL/SSLEngine.cs b/csharp/src/IceSSL/SSLEngine.cs
index db1a3dfc32c..bd8f527b8e4 100644
--- a/csharp/src/IceSSL/SSLEngine.cs
+++ b/csharp/src/IceSSL/SSLEngine.cs
@@ -31,8 +31,6 @@ namespace IceSSL
_securityTraceCategory = "Security";
_initialized = false;
_trustManager = new TrustManager(_communicator);
-
-#if !UNITY
_tls12Support = false;
try
{
@@ -42,7 +40,6 @@ namespace IceSSL
catch(Exception)
{
}
-#endif
}
internal void initialize()
@@ -78,8 +75,6 @@ namespace IceSSL
storeLocation = StoreLocation.CurrentUser;
}
_useMachineContext = certStoreLocation == "LocalMachine";
-
-#if !UNITY
X509KeyStorageFlags keyStorageFlags;
if(_useMachineContext)
{
@@ -130,7 +125,6 @@ namespace IceSSL
importCertificate(name, val, keyStorageFlags);
}
}
-#endif
//
// Protocols selects which protocols to enable, by default we only enable TLS1.0
@@ -138,12 +132,8 @@ namespace IceSSL
//
_protocols = parseProtocols(
properties.getPropertyAsListWithDefault(prefix + "Protocols",
-#if UNITY
- new string[]{"TLS1_0"}));
-#else
_tls12Support ? new string[]{"TLS1_0", "TLS1_1", "TLS1_2"} :
new string[]{"TLS1_0", "TLS1_1"}));
-#endif
//
// CheckCertName determines whether we compare the name in a peer's
// certificate against its hostname.
@@ -162,7 +152,6 @@ namespace IceSSL
//
_checkCRL = properties.getPropertyAsIntWithDefault(prefix + "CheckCRL", 0);
-#if !UNITY
//
// Check for a certificate verifier.
//
@@ -433,8 +422,6 @@ namespace IceSSL
}
}
}
-#endif
-
_initialized = true;
}
@@ -540,12 +527,10 @@ namespace IceSSL
s.Append("\nencrypted = " + (stream.IsEncrypted ? "yes" : "no"));
s.Append("\nsigned = " + (stream.IsSigned ? "yes" : "no"));
s.Append("\nmutually authenticated = " + (stream.IsMutuallyAuthenticated ? "yes" : "no"));
-#if !UNITY
s.Append("\nhash algorithm = " + stream.HashAlgorithm + "/" + stream.HashStrength);
s.Append("\ncipher algorithm = " + stream.CipherAlgorithm + "/" + stream.CipherStrength);
s.Append("\nkey exchange algorithm = " + stream.KeyExchangeAlgorithm + "/" + stream.KeyExchangeStrength);
s.Append("\nprotocol = " + stream.SslProtocol);
-#endif
_logger.trace(_securityTraceCategory, s.ToString());
}
@@ -888,7 +873,6 @@ namespace IceSSL
return false;
}
-#if !UNITY
private void importCertificate(string propName, string propValue, X509KeyStorageFlags keyStorageFlags)
{
//
@@ -990,7 +974,6 @@ namespace IceSSL
store.Close();
}
}
-#endif
//
// Split strings using a delimiter. Quotes are supported.
@@ -1121,7 +1104,6 @@ namespace IceSSL
return result;
}
-#if !UNITY
private static X509Certificate2Collection findCertificates(string prop, StoreLocation storeLocation,
string name, string value)
{
@@ -1323,7 +1305,6 @@ namespace IceSSL
}
return result;
}
-#endif
private static bool decodeASN1Length(byte[] data, int start, out int len, out int next)
{
@@ -1377,8 +1358,6 @@ namespace IceSSL
private CertificateVerifier _verifier;
private PasswordCallback _passwordCallback;
private TrustManager _trustManager;
-#if !UNITY
private bool _tls12Support;
-#endif
}
}
diff --git a/csharp/src/IceSSL/TransceiverI.cs b/csharp/src/IceSSL/TransceiverI.cs
index c94f659c376..171211fb3b5 100644
--- a/csharp/src/IceSSL/TransceiverI.cs
+++ b/csharp/src/IceSSL/TransceiverI.cs
@@ -10,7 +10,6 @@
namespace IceSSL
{
using System;
- using System.ComponentModel;
using System.Diagnostics;
using System.Collections.Generic;
using System.IO;
@@ -19,7 +18,6 @@ namespace IceSSL
using System.Net.Sockets;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates;
- using System.Threading;
using System.Text;
sealed class TransceiverI : IceInternal.Transceiver, IceInternal.WSTransceiverDelegate
@@ -364,12 +362,10 @@ namespace IceSSL
X509Certificate2Collection caCerts = _instance.engine().caCerts();
if(caCerts != null)
{
-#if !UNITY
//
// We need to set this flag to be able to use a certificate authority from the extra store.
//
_chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllowUnknownCertificateAuthority;
-#endif
foreach(X509Certificate2 cert in caCerts)
{
_chain.ChainPolicy.ExtraStore.Add(cert);
@@ -396,9 +392,6 @@ namespace IceSSL
}
if(_sslStream != null)
{
-#if UNITY
- info.cipher = "";
-#else
info.cipher = _sslStream.CipherAlgorithm.ToString();
if(_chain.ChainElements != null && _chain.ChainElements.Count > 0)
{
@@ -408,10 +401,8 @@ namespace IceSSL
nativeCerts[i] = _chain.ChainElements[i].Certificate;
}
}
-#endif
List<string> certs = new List<string>();
-#if !UNITY
if(nativeCerts != null)
{
foreach(X509Certificate2 cert in nativeCerts)
@@ -423,7 +414,6 @@ namespace IceSSL
certs.Add(s.ToString());
}
}
-#endif
info.certs = certs.ToArray();
info.verified = _verified;
}
@@ -451,9 +441,6 @@ namespace IceSSL
}
else
{
-#if UNITY
- throw new Ice.FeatureNotSupportedException("ssl server socket");
-#else
//
// Server authentication.
//
@@ -472,7 +459,6 @@ namespace IceSSL
_instance.checkCRL() > 0,
writeCompleted,
state);
-#endif
}
}
catch(IOException ex)
@@ -487,14 +473,12 @@ namespace IceSSL
}
throw new Ice.SocketException(ex);
}
-#if !UNITY
catch(AuthenticationException ex)
{
Ice.SecurityException e = new Ice.SecurityException(ex);
e.reason = ex.Message;
throw e;
}
-#endif
catch(Exception ex)
{
throw new Ice.SyscallException(ex);
@@ -531,14 +515,12 @@ namespace IceSSL
}
throw new Ice.SocketException(ex);
}
-#if !UNITY
catch(AuthenticationException ex)
{
Ice.SecurityException e = new Ice.SecurityException(ex);
e.reason = ex.Message;
throw e;
}
-#endif
catch(Exception ex)
{
throw new Ice.SyscallException(ex);
@@ -580,7 +562,6 @@ namespace IceSSL
private bool validationCallback(object sender, X509Certificate certificate, X509Chain chainEngine,
SslPolicyErrors policyErrors)
{
-#if !UNITY
string message = "";
int errors = (int)policyErrors;
if(certificate != null)
@@ -758,7 +739,6 @@ namespace IceSSL
_instance.logger().trace(_instance.securityTraceCategory(),
"SSL certificate validation status:" + message);
}
-#endif
return true;
}
diff --git a/csharp/src/IceSSL/TrustManager.cs b/csharp/src/IceSSL/TrustManager.cs
index 4d31702dbb1..b9cba557a25 100644
--- a/csharp/src/IceSSL/TrustManager.cs
+++ b/csharp/src/IceSSL/TrustManager.cs
@@ -130,9 +130,6 @@ namespace IceSSL
//
if(info.nativeCerts != null && info.nativeCerts.Length > 0)
{
-#if UNITY
- throw new Ice.FeatureNotSupportedException("certificate subjectName not available");
-#else
X500DistinguishedName subjectDN = info.nativeCerts[0].SubjectName;
string subjectName = subjectDN.Name;
Debug.Assert(subjectName != null);
@@ -218,7 +215,6 @@ namespace IceSSL
// At this point we accept the connection if there are no explicit accept rules.
//
return accept.Count == 0;
-#endif
}
return false;
diff --git a/csharp/test/Glacier2/router/Client.cs b/csharp/test/Glacier2/router/Client.cs
index 6f01f768014..064fcdccfb8 100644
--- a/csharp/test/Glacier2/router/Client.cs
+++ b/csharp/test/Glacier2/router/Client.cs
@@ -7,11 +7,9 @@
//
// **********************************************************************
-using Glacier2;
using Test;
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -27,7 +25,6 @@ public class Client
public override int run(string[] args)
{
Ice.ObjectPrx routerBase;
-
{
Console.Out.Write("testing stringToProxy for router... ");
Console.Out.Flush();
@@ -36,7 +33,6 @@ public class Client
}
Glacier2.RouterPrx router;
-
{
Console.Out.Write("testing checked cast for router... ");
Console.Out.Flush();
@@ -451,15 +447,6 @@ public class Client
initData.properties = Ice.Util.createProperties(ref args);
initData.properties.setProperty("Ice.Warn.Connections", "0");
-
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
-
App app = new App();
return app.main(args, initData);
}
diff --git a/csharp/test/Glacier2/router/Server.cs b/csharp/test/Glacier2/router/Server.cs
index b4cf4ba283f..78312e1fbcf 100644
--- a/csharp/test/Glacier2/router/Server.cs
+++ b/csharp/test/Glacier2/router/Server.cs
@@ -43,15 +43,6 @@ public class Server
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
-
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "server");
-#endif
-
App app = new App();
return app.main(args, initData);
}
diff --git a/csharp/test/Glacier2/sessionHelper/CallbackI.cs b/csharp/test/Glacier2/sessionHelper/CallbackI.cs
index 677611398f8..4ce26779ce0 100644
--- a/csharp/test/Glacier2/sessionHelper/CallbackI.cs
+++ b/csharp/test/Glacier2/sessionHelper/CallbackI.cs
@@ -8,14 +8,9 @@
// **********************************************************************
using Test;
-using System.Diagnostics;
public sealed class CallbackI : Test.CallbackDisp_
{
- public CallbackI()
- {
- }
-
public override void
initiateCallback(CallbackReceiverPrx proxy, Ice.Current current)
{
diff --git a/csharp/test/Glacier2/sessionHelper/Client.cs b/csharp/test/Glacier2/sessionHelper/Client.cs
index d793e179abd..9d00931328c 100644
--- a/csharp/test/Glacier2/sessionHelper/Client.cs
+++ b/csharp/test/Glacier2/sessionHelper/Client.cs
@@ -7,11 +7,8 @@
//
// **********************************************************************
-using Glacier2;
using Test;
using System;
-using System.Collections.Generic;
-using System.Diagnostics;
using System.Reflection;
using System.Threading;
@@ -32,11 +29,7 @@ public class Client
_initData = new Ice.InitializationData();
_initData.properties = Ice.Util.createProperties(ref args);
_initData.properties.setProperty("Ice.Default.Router", "Glacier2/router:default -p 12347");
-#if COMPACT
- _initData.dispatcher = delegate(Ice.VoidAction action, Ice.Connection connection)
-#else
- _initData.dispatcher = delegate(System.Action action, Ice.Connection connection)
-#endif
+ _initData.dispatcher = delegate(Action action, Ice.Connection connection)
{
action();
};
@@ -57,7 +50,7 @@ public class Client
}
public void
- connectFailed(Glacier2.SessionHelper session, System.Exception exception)
+ connectFailed(Glacier2.SessionHelper session, Exception exception)
{
try
{
@@ -71,7 +64,7 @@ public class Client
wakeUp();
}
}
- catch(System.Exception)
+ catch(Exception)
{
test(false);
}
@@ -107,7 +100,7 @@ public class Client
}
public void
- connectFailed(Glacier2.SessionHelper session, System.Exception ex)
+ connectFailed(Glacier2.SessionHelper session, Exception ex)
{
Console.Out.WriteLine(ex.ToString());
test(false);
@@ -135,7 +128,7 @@ public class Client
}
public void
- connectFailed(Glacier2.SessionHelper session, System.Exception exception)
+ connectFailed(Glacier2.SessionHelper session, Exception exception)
{
try
{
@@ -149,7 +142,7 @@ public class Client
wakeUp();
}
}
- catch(System.Exception)
+ catch(Exception)
{
test(false);
}
@@ -177,7 +170,7 @@ public class Client
}
public void
- connectFailed(Glacier2.SessionHelper session, System.Exception exception)
+ connectFailed(Glacier2.SessionHelper session, Exception exception)
{
try
{
@@ -191,7 +184,7 @@ public class Client
wakeUp();
}
}
- catch(System.Exception)
+ catch(Exception)
{
test(false);
}
@@ -227,19 +220,14 @@ public class Client
_session = _factory.connect("userid", "xxx");
while(true)
{
-#if COMPACT
- System.Threading.Monitor.Wait(this);
- break;
-#else
try
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
break;
}
catch(ThreadInterruptedException)
{
}
-#endif
}
}
@@ -254,24 +242,19 @@ public class Client
_factory.setProtocol(protocol);
_session = _factory.connect("userid", "abc123");
- System.Threading.Thread.Sleep(100);
+ Thread.Sleep(100);
_session.destroy();
while(true)
{
-#if COMPACT
- System.Threading.Monitor.Wait(this);
- break;
-#else
try
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
break;
}
catch(ThreadInterruptedException)
{
}
-#endif
}
}
@@ -286,19 +269,14 @@ public class Client
_session = _factory.connect("userid", "abc123");
while(true)
{
-#if COMPACT
- System.Threading.Monitor.Wait(this);
- break;
-#else
try
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
break;
}
catch(ThreadInterruptedException)
{
}
-#endif
}
Console.Out.Write("testing SessionHelper isConnected after connect... ");
@@ -354,19 +332,14 @@ public class Client
_session.destroy();
while(true)
{
-#if COMPACT
- System.Threading.Monitor.Wait(this);
- break;
-#else
try
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
break;
}
catch(ThreadInterruptedException)
{
}
-#endif
}
Console.Out.Write("testing SessionHelper isConnected after destroy... ");
@@ -457,19 +430,14 @@ public class Client
_session = _factory.connect("userid", "abc123");
while(true)
{
-#if COMPACT
- System.Threading.Monitor.Wait(this);
- break;
-#else
try
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
break;
}
catch(ThreadInterruptedException)
{
}
-#endif
}
Console.Out.Write("testing SessionHelper isConnect after connect failure... ");
@@ -502,7 +470,7 @@ public class Client
public static void
wakeUp()
{
- System.Threading.Monitor.Pulse(me);
+ Monitor.Pulse(me);
}
private static void
diff --git a/csharp/test/Glacier2/sessionHelper/Server.cs b/csharp/test/Glacier2/sessionHelper/Server.cs
index c1020ae84b8..c35bd550b28 100644
--- a/csharp/test/Glacier2/sessionHelper/Server.cs
+++ b/csharp/test/Glacier2/sessionHelper/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/acm/AllTests.cs b/csharp/test/Ice/acm/AllTests.cs
index 307a211ebe8..4991e562454 100644
--- a/csharp/test/Ice/acm/AllTests.cs
+++ b/csharp/test/Ice/acm/AllTests.cs
@@ -8,22 +8,10 @@
// **********************************************************************
using System;
-using System.Collections;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Threading;
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
+
class LoggerI : Ice.Logger
{
@@ -527,13 +515,7 @@ public class AllTests : TestCommon.TestApp
}
};
-
-#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));
@@ -571,9 +553,9 @@ public class AllTests : TestCommon.TestApp
test.destroy();
}
- System.Console.Out.Write("shutting down... ");
- System.Console.Out.Flush();
+ Console.Out.Write("shutting down... ");
+ Console.Out.Flush();
com.shutdown();
- System.Console.WriteLine("ok");
+ Console.WriteLine("ok");
}
}
diff --git a/csharp/test/Ice/adapterDeactivation/AllTests.cs b/csharp/test/Ice/adapterDeactivation/AllTests.cs
index 0f5dd56dfe2..1236e202fd8 100644
--- a/csharp/test/Ice/adapterDeactivation/AllTests.cs
+++ b/csharp/test/Ice/adapterDeactivation/AllTests.cs
@@ -10,27 +10,9 @@
using System;
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
{
-
-#if SILVERLIGHT
- override
- public void run(Ice.Communicator communicator)
-#else
public static TestIntfPrx allTests(Ice.Communicator communicator)
-#endif
{
Write("testing stringToProxy... ");
Flush();
@@ -46,7 +28,6 @@ public class AllTests : TestCommon.TestApp
test(obj.Equals(@base));
WriteLine("ok");
-#if !SILVERLIGHT
{
Write("creating/destroying/recreating object adapter... ");
Flush();
@@ -69,7 +50,7 @@ public class AllTests : TestCommon.TestApp
adapter.destroy();
Console.Out.WriteLine("ok");
}
-#endif
+
Write("creating/activating/deactivating object adapter in one operation... ");
Flush();
obj.transient();
@@ -107,8 +88,6 @@ public class AllTests : TestCommon.TestApp
WriteLine("ok");
}
-#if !SILVERLIGHT
return obj;
-#endif
}
}
diff --git a/csharp/test/Ice/adapterDeactivation/Collocated.cs b/csharp/test/Ice/adapterDeactivation/Collocated.cs
index 8dcdab50b8c..30a4fa2c598 100644
--- a/csharp/test/Ice/adapterDeactivation/Collocated.cs
+++ b/csharp/test/Ice/adapterDeactivation/Collocated.cs
@@ -7,9 +7,7 @@
//
// **********************************************************************
-using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/adapterDeactivation/ServantLocatorI.cs b/csharp/test/Ice/adapterDeactivation/ServantLocatorI.cs
index e64c45bc3cc..b4bc9cb27b9 100644
--- a/csharp/test/Ice/adapterDeactivation/ServantLocatorI.cs
+++ b/csharp/test/Ice/adapterDeactivation/ServantLocatorI.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-using System;
using Test;
public sealed class ServantLocatorI : Ice.ServantLocator
diff --git a/csharp/test/Ice/adapterDeactivation/Server.cs b/csharp/test/Ice/adapterDeactivation/Server.cs
index 5dfff289960..a7cc8b99fc9 100644
--- a/csharp/test/Ice/adapterDeactivation/Server.cs
+++ b/csharp/test/Ice/adapterDeactivation/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/admin/AllTests.cs b/csharp/test/Ice/admin/AllTests.cs
index d21191c2f93..6e1efb732eb 100644
--- a/csharp/test/Ice/admin/AllTests.cs
+++ b/csharp/test/Ice/admin/AllTests.cs
@@ -9,14 +9,9 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using System.Linq;
using System.Threading;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
using Test;
public class AllTests : TestCommon.TestApp
@@ -97,12 +92,7 @@ public class AllTests : TestCommon.TestApp
}
}
-#if SILVERLIGHT
- override
- public void run(Ice.Communicator communicator)
-#else
public static void allTests(Ice.Communicator communicator)
-#endif
{
Write("testing communicator operations... ");
Flush();
diff --git a/csharp/test/Ice/admin/Client.cs b/csharp/test/Ice/admin/Client.cs
index ef157470e0a..0c8c690e755 100644
--- a/csharp/test/Ice/admin/Client.cs
+++ b/csharp/test/Ice/admin/Client.cs
@@ -30,9 +30,7 @@ public class Client
int status = 0;
Ice.Communicator communicator = null;
-#if !COMPACT && !UNITY
Debug.Listeners.Add(new ConsoleTraceListener());
-#endif
try
{
diff --git a/csharp/test/Ice/admin/Server.cs b/csharp/test/Ice/admin/Server.cs
index b5f9d08892c..43680df866e 100644
--- a/csharp/test/Ice/admin/Server.cs
+++ b/csharp/test/Ice/admin/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/ami/AllTests.cs b/csharp/test/Ice/ami/AllTests.cs
index 7bb88d55cfd..ea53fe5db98 100644
--- a/csharp/test/Ice/ami/AllTests.cs
+++ b/csharp/test/Ice/ami/AllTests.cs
@@ -8,24 +8,11 @@
// **********************************************************************
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
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 class Cookie
@@ -649,25 +636,8 @@ public class AllTests : TestCommon.TestApp
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, bool collocated)
-#endif
{
-#if SILVERLIGHT
- bool collocated = false;
-#endif
string sref = "test:default -p 12010";
Ice.ObjectPrx obj = communicator.stringToProxy(sref);
test(obj != null);
diff --git a/csharp/test/Ice/ami/Client.cs b/csharp/test/Ice/ami/Client.cs
index 246f5b6eb05..6a6e407ea27 100644
--- a/csharp/test/Ice/ami/Client.cs
+++ b/csharp/test/Ice/ami/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -35,13 +34,6 @@ public class Client
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
initData.properties.setProperty("Ice.Warn.AMICallback", "0");
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
//
// Limit the send buffer size, this test relies on the socket
// send() blocking after sending a given amount of data.
diff --git a/csharp/test/Ice/ami/Collocated.cs b/csharp/test/Ice/ami/Collocated.cs
index f06511fa0a0..580ed4c1c09 100644
--- a/csharp/test/Ice/ami/Collocated.cs
+++ b/csharp/test/Ice/ami/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -47,13 +46,6 @@ public class Collocated
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
initData.properties.setProperty("Ice.Warn.AMICallback", "0");
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "collocated");
-#endif
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
diff --git a/csharp/test/Ice/ami/Server.cs b/csharp/test/Ice/ami/Server.cs
index bc5fffdd700..7c29d688946 100644
--- a/csharp/test/Ice/ami/Server.cs
+++ b/csharp/test/Ice/ami/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -55,9 +54,9 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -69,7 +68,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/ami/TestI.cs b/csharp/test/Ice/ami/TestI.cs
index 01f368d4887..ae87613fbe8 100644
--- a/csharp/test/Ice/ami/TestI.cs
+++ b/csharp/test/Ice/ami/TestI.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using Test;
-using System.Threading;
public class TestI : TestIntfDisp_
{
diff --git a/csharp/test/Ice/application/Client.cs b/csharp/test/Ice/application/Client.cs
index e24bd08bb33..d6bc0d7f869 100644
--- a/csharp/test/Ice/application/Client.cs
+++ b/csharp/test/Ice/application/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/background/Acceptor.cs b/csharp/test/Ice/background/Acceptor.cs
index b8a822ba85a..1114ab4f3b8 100644
--- a/csharp/test/Ice/background/Acceptor.cs
+++ b/csharp/test/Ice/background/Acceptor.cs
@@ -7,10 +7,6 @@
//
// **********************************************************************
-using System;
-using System.Diagnostics;
-using System.Net.Sockets;
-
internal class Acceptor : IceInternal.Acceptor
{
public void close()
diff --git a/csharp/test/Ice/background/BackgroundControllerI.cs b/csharp/test/Ice/background/BackgroundControllerI.cs
index e856cd59141..e5f205fe289 100644
--- a/csharp/test/Ice/background/BackgroundControllerI.cs
+++ b/csharp/test/Ice/background/BackgroundControllerI.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using Test;
-using System.Threading;
using System.Collections.Generic;
internal class BackgroundControllerI : BackgroundControllerDisp_
@@ -89,10 +88,6 @@ internal class BackgroundControllerI : BackgroundControllerDisp_
}
private Ice.ObjectAdapter _adapter;
-#if COMPACT
- private IceInternal.HashSet<string> _pausedCalls = new IceInternal.HashSet<string>();
-#else
private HashSet<string> _pausedCalls = new HashSet<string>();
-#endif
private Configuration _configuration;
}
diff --git a/csharp/test/Ice/background/Client.cs b/csharp/test/Ice/background/Client.cs
index f57e59d4857..da54678ded4 100644
--- a/csharp/test/Ice/background/Client.cs
+++ b/csharp/test/Ice/background/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -65,7 +64,7 @@ public class Client
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/background/Connector.cs b/csharp/test/Ice/background/Connector.cs
index a72482b34c5..6824589c750 100644
--- a/csharp/test/Ice/background/Connector.cs
+++ b/csharp/test/Ice/background/Connector.cs
@@ -7,9 +7,6 @@
//
// **********************************************************************
-using System.Diagnostics;
-using System.Net.Sockets;
-
internal class Connector : IceInternal.Connector
{
public IceInternal.Transceiver connect()
diff --git a/csharp/test/Ice/background/Server.cs b/csharp/test/Ice/background/Server.cs
index f01edd4113f..26cccb4eae9 100644
--- a/csharp/test/Ice/background/Server.cs
+++ b/csharp/test/Ice/background/Server.cs
@@ -9,7 +9,6 @@
using System;
using System.IO;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/binding/AllTests.cs b/csharp/test/Ice/binding/AllTests.cs
index 3c23c895927..4343b13e510 100644
--- a/csharp/test/Ice/binding/AllTests.cs
+++ b/csharp/test/Ice/binding/AllTests.cs
@@ -8,24 +8,10 @@
// **********************************************************************
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Threading;
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 string getAdapterNameWithAMI(TestIntfPrx testIntf)
@@ -103,12 +89,7 @@ public class AllTests : TestCommon.TestApp
}
};
-#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));
@@ -749,7 +730,6 @@ public class AllTests : TestCommon.TestApp
}
WriteLine("ok");
-#if !SILVERLIGHT
Write("testing endpoint mode filtering... ");
Flush();
{
@@ -771,7 +751,6 @@ public class AllTests : TestCommon.TestApp
}
}
WriteLine("ok");
-#endif
if(communicator.getProperties().getProperty("Ice.Plugin.IceSSL").Length > 0)
{
Write("testing unsecure vs. secure endpoints... ");
@@ -828,7 +807,6 @@ public class AllTests : TestCommon.TestApp
WriteLine("ok");
}
-#if !SILVERLIGHT && !COMPACT && !UNITY && !DOTNET3_5
{
Write("testing ipv4 & ipv6 connections... ");
Flush();
@@ -967,8 +945,6 @@ public class AllTests : TestCommon.TestApp
WriteLine("ok");
}
-#endif
-
com.shutdown();
}
diff --git a/csharp/test/Ice/binding/Client.cs b/csharp/test/Ice/binding/Client.cs
index bac714d96fe..7c7b51e3b37 100644
--- a/csharp/test/Ice/binding/Client.cs
+++ b/csharp/test/Ice/binding/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/binding/RemoteObjectAdapterI.cs b/csharp/test/Ice/binding/RemoteObjectAdapterI.cs
index 8b1b41cf37b..3b7b500422d 100644
--- a/csharp/test/Ice/binding/RemoteObjectAdapterI.cs
+++ b/csharp/test/Ice/binding/RemoteObjectAdapterI.cs
@@ -15,7 +15,7 @@ public class RemoteObjectAdapterI : RemoteObjectAdapterDisp_
{
_adapter = adapter;
_testIntf = TestIntfPrxHelper.uncheckedCast(_adapter.add(new TestI(),
- _adapter.getCommunicator().stringToIdentity("test")));
+ _adapter.getCommunicator().stringToIdentity("test")));
_adapter.activate();
}
diff --git a/csharp/test/Ice/binding/Server.cs b/csharp/test/Ice/binding/Server.cs
index a0cff27f76e..d1d5df94367 100644
--- a/csharp/test/Ice/binding/Server.cs
+++ b/csharp/test/Ice/binding/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -44,7 +43,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
System.Console.Error.WriteLine(ex);
status = 1;
@@ -58,7 +57,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/checksum/server/Server.cs b/csharp/test/Ice/checksum/server/Server.cs
index cdd4e1d970e..a06e801cb97 100644
--- a/csharp/test/Ice/checksum/server/Server.cs
+++ b/csharp/test/Ice/checksum/server/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
public class Server
{
diff --git a/csharp/test/Ice/defaultServant/AllTests.cs b/csharp/test/Ice/defaultServant/AllTests.cs
index 72130d77d64..b966da4da25 100644
--- a/csharp/test/Ice/defaultServant/AllTests.cs
+++ b/csharp/test/Ice/defaultServant/AllTests.cs
@@ -15,7 +15,7 @@ public class AllTests
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
diff --git a/csharp/test/Ice/defaultServant/Client.cs b/csharp/test/Ice/defaultServant/Client.cs
index 83a466285fe..00d9b182597 100644
--- a/csharp/test/Ice/defaultServant/Client.cs
+++ b/csharp/test/Ice/defaultServant/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -36,7 +35,7 @@ public class Client
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/defaultServant/MyObjectI.cs b/csharp/test/Ice/defaultServant/MyObjectI.cs
index bd829113d96..5c33482e40b 100644
--- a/csharp/test/Ice/defaultServant/MyObjectI.cs
+++ b/csharp/test/Ice/defaultServant/MyObjectI.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-
public sealed class MyObjectI : Test.MyObjectDisp_
{
public override void
diff --git a/csharp/test/Ice/defaultValue/AllTests.cs b/csharp/test/Ice/defaultValue/AllTests.cs
index 48fb194a04c..d637192a5c9 100644
--- a/csharp/test/Ice/defaultValue/AllTests.cs
+++ b/csharp/test/Ice/defaultValue/AllTests.cs
@@ -7,28 +7,9 @@
//
// **********************************************************************
-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 : TestCommon.TestApp
{
-#if SILVERLIGHT
- override
- public void run(Ice.Communicator communicator)
-#else
public static void allTests()
-#endif
{
Write("testing default values... ");
Flush();
diff --git a/csharp/test/Ice/defaultValue/Client.cs b/csharp/test/Ice/defaultValue/Client.cs
index 44ebe14ff1d..8896ff77f82 100644
--- a/csharp/test/Ice/defaultValue/Client.cs
+++ b/csharp/test/Ice/defaultValue/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/dictMapping/AllTests.cs b/csharp/test/Ice/dictMapping/AllTests.cs
index 7d6499fbea1..cabf73185b6 100644
--- a/csharp/test/Ice/dictMapping/AllTests.cs
+++ b/csharp/test/Ice/dictMapping/AllTests.cs
@@ -7,32 +7,10 @@
//
// **********************************************************************
-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 : TestCommon.TestApp
{
-#if SILVERLIGHT
- override
- public void run(Ice.Communicator communicator)
-#else
public static Test.MyClassPrx allTests(Ice.Communicator communicator, bool collocated)
-#endif
{
-#if SILVERLIGHT
- bool collocated = false;
-#endif
Flush();
string rf = "test:default -p 12010";
Ice.ObjectPrx baseProxy = communicator.stringToProxy(rf);
@@ -50,10 +28,6 @@ public class AllTests : TestCommon.TestApp
TwowaysAMI.twowaysAMI(communicator, cl);
WriteLine("ok");
}
-#if SILVERLIGHT
- cl.shutdown();
-#else
return cl;
-#endif
}
}
diff --git a/csharp/test/Ice/dictMapping/Collocated.cs b/csharp/test/Ice/dictMapping/Collocated.cs
index 9b3cd44a719..a6b640699b3 100644
--- a/csharp/test/Ice/dictMapping/Collocated.cs
+++ b/csharp/test/Ice/dictMapping/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/dictMapping/MyClassAMDI.cs b/csharp/test/Ice/dictMapping/MyClassAMDI.cs
index cd400690521..af7b5bde825 100644
--- a/csharp/test/Ice/dictMapping/MyClassAMDI.cs
+++ b/csharp/test/Ice/dictMapping/MyClassAMDI.cs
@@ -41,56 +41,11 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opOV_async(AMD_MyClass_opOV cb, OV i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opOR_async(AMD_MyClass_opOR cb, OR i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opODV_async(AMD_MyClass_opODV cb, ODV i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opODR_async(AMD_MyClass_opODR cb, ODR i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opNODV_async(AMD_MyClass_opNODV cb, Dictionary<string, ODV> i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opNODR_async(AMD_MyClass_opNODR cb, Dictionary<string, ODR> i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opONDV_async(AMD_MyClass_opONDV cb, ONDV i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opONDR_async(AMD_MyClass_opONDR cb, ONDR i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opNDAIS_async(AMD_MyClass_opNDAIS cb, Dictionary<string, int[]> i, Ice.Current current)
{
cb.ice_response(i, i);
}
- public override void opNDCIS_async(AMD_MyClass_opNDCIS cb, Dictionary<string, CIS> i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opNDGIS_async(AMD_MyClass_opNDGIS cb, Dictionary<string, List<int>> i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -101,43 +56,8 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opNDCSS_async(AMD_MyClass_opNDCSS cb, Dictionary<string, CSS> i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opNDGSS_async(AMD_MyClass_opNDGSS cb, Dictionary<string, List<string>> i, Ice.Current current)
{
cb.ice_response(i, i);
}
-
- public override void opODAIS_async(AMD_MyClass_opODAIS cb, ODAIS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opODCIS_async(AMD_MyClass_opODCIS cb, ODCIS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opODGIS_async(AMD_MyClass_opODGIS cb, ODGIS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opODASS_async(AMD_MyClass_opODASS cb, ODASS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opODCSS_async(AMD_MyClass_opODCSS cb, ODCSS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
- public override void opODGSS_async(AMD_MyClass_opODGSS cb, ODGSS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
}
diff --git a/csharp/test/Ice/dictMapping/MyClassI.cs b/csharp/test/Ice/dictMapping/MyClassI.cs
index d61576bbe85..ad4fb4bfce3 100644
--- a/csharp/test/Ice/dictMapping/MyClassI.cs
+++ b/csharp/test/Ice/dictMapping/MyClassI.cs
@@ -49,56 +49,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override OV opOV(OV i, out OV o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override OR opOR(OR i, out OR o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ODV opODV(ODV i, out ODV o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ODR opODR(ODR i, out ODR o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override Dictionary<string, ODV> opNODV(Dictionary<string, ODV> i, out Dictionary<string, ODV> o,
- Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override Dictionary<string, ODR> opNODR(Dictionary<string, ODR> i, out Dictionary<string, ODR> o,
- Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ONDV opONDV(ONDV i, out ONDV o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ONDR opONDR(ONDR i, out ONDR o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override Dictionary<string, int[]> opNDAIS(Dictionary<string, int[]> i,
out Dictionary<string, int[]> o,
Ice.Current current)
@@ -107,14 +57,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override Dictionary<string, CIS> opNDCIS(Dictionary<string, CIS> i,
- out Dictionary<string, CIS> o,
- Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override Dictionary<string, List<int>> opNDGIS(Dictionary<string, List<int>> i,
out Dictionary<string, List<int>> o,
Ice.Current current)
@@ -131,14 +73,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override Dictionary<string, CSS> opNDCSS(Dictionary<string, CSS> i,
- out Dictionary<string, CSS> o,
- Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override Dictionary<string, List<string>> opNDGSS(Dictionary<string, List<string>> i,
out Dictionary<string, List<string>> o,
Ice.Current current)
@@ -146,40 +80,4 @@ public sealed class MyClassI : Test.MyClass
o = i;
return i;
}
-
- public override ODAIS opODAIS(ODAIS i, out ODAIS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ODCIS opODCIS(ODCIS i, out ODCIS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ODGIS opODGIS(ODGIS i, out ODGIS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ODASS opODASS(ODASS i, out ODASS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ODCSS opODCSS(ODCSS i, out ODCSS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
- public override ODGSS opODGSS(ODGSS i, out ODGSS o, Ice.Current current)
- {
- o = i;
- return i;
- }
}
diff --git a/csharp/test/Ice/dictMapping/Server.cs b/csharp/test/Ice/dictMapping/Server.cs
index 5ebdb9f0c3a..c43e83854d8 100644
--- a/csharp/test/Ice/dictMapping/Server.cs
+++ b/csharp/test/Ice/dictMapping/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -40,7 +39,7 @@ public class Server
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/dictMapping/Test.ice b/csharp/test/Ice/dictMapping/Test.ice
index d4717f84ecd..d9d11203b70 100644
--- a/csharp/test/Ice/dictMapping/Test.ice
+++ b/csharp/test/Ice/dictMapping/Test.ice
@@ -23,41 +23,18 @@ struct TEstNv
IntSeq s;
};
-["clr:collection"] dictionary<int, int> OV;
-["clr:collection"] dictionary<string, string> OR;
-["clr:collection"] dictionary<string, OV> ODV;
-["clr:collection"] dictionary<string, OR> ODR;
-
-dictionary<string, ODV> NODV;
-dictionary<string, ODR> NODR;
-
-["clr:collection"] dictionary<string, NDV> ONDV;
-["clr:collection"] dictionary<string, NDR> ONDR;
-
sequence<int> AIS;
-["clr:collection"] sequence<int> CIS;
["clr:generic:List"] sequence<int> GIS;
sequence<string> ASS;
-["clr:collection"] sequence<string> CSS;
["clr:generic:List"] sequence<string> GSS;
dictionary<string, AIS> NDAIS;
-dictionary<string, CIS> NDCIS;
dictionary<string, GIS> NDGIS;
dictionary<string, ASS> NDASS;
-dictionary<string, CSS> NDCSS;
dictionary<string, GSS> NDGSS;
-["clr:collection"] dictionary<string, AIS> ODAIS;
-["clr:collection"] dictionary<string, CIS> ODCIS;
-["clr:collection"] dictionary<string, GIS> ODGIS;
-
-["clr:collection"] dictionary<string, ASS> ODASS;
-["clr:collection"] dictionary<string, CSS> ODCSS;
-["clr:collection"] dictionary<string, GSS> ODGSS;
-
class MyClass
{
void shutdown();
@@ -67,32 +44,11 @@ class MyClass
NDV opNDV(NDV i, out NDV o);
NDR opNDR(NDR i, out NDR o);
- OV opOV(OV i, out OV o);
- OR opOR(OR i, out OR o);
- ODV opODV(ODV i, out ODV o);
- ODR opODR(ODR i, out ODR o);
-
- NODV opNODV(NODV i, out NODV o);
- NODR opNODR(NODR i, out NODR o);
-
- ONDV opONDV(ONDV i, out ONDV o);
- ONDR opONDR(ONDR i, out ONDR o);
-
NDAIS opNDAIS(NDAIS i, out NDAIS o);
- NDCIS opNDCIS(NDCIS i, out NDCIS o);
NDGIS opNDGIS(NDGIS i, out NDGIS o);
NDASS opNDASS(NDASS i, out NDASS o);
- NDCSS opNDCSS(NDCSS i, out NDCSS o);
NDGSS opNDGSS(NDGSS i, out NDGSS o);
-
- ODAIS opODAIS(ODAIS i, out ODAIS o);
- ODCIS opODCIS(ODCIS i, out ODCIS o);
- ODGIS opODGIS(ODGIS i, out ODGIS o);
-
- ODASS opODASS(ODASS i, out ODASS o);
- ODCSS opODCSS(ODCSS i, out ODCSS o);
- ODGSS opODGSS(ODGSS i, out ODGSS o);
};
};
diff --git a/csharp/test/Ice/dictMapping/TestAMD.ice b/csharp/test/Ice/dictMapping/TestAMD.ice
index 4d5319e7e38..fa7501c366d 100644
--- a/csharp/test/Ice/dictMapping/TestAMD.ice
+++ b/csharp/test/Ice/dictMapping/TestAMD.ice
@@ -17,41 +17,18 @@ dictionary<string, string> NR;
dictionary<string, NV> NDV;
dictionary<string, NR> NDR;
-["clr:collection"] dictionary<int, int> OV;
-["clr:collection"] dictionary<string, string> OR;
-["clr:collection"] dictionary<string, OV> ODV;
-["clr:collection"] dictionary<string, OR> ODR;
-
-dictionary<string, ODV> NODV;
-dictionary<string, ODR> NODR;
-
-["clr:collection"] dictionary<string, NDV> ONDV;
-["clr:collection"] dictionary<string, NDR> ONDR;
-
sequence<int> AIS;
-["clr:collection"] sequence<int> CIS;
["clr:generic:List"] sequence<int> GIS;
sequence<string> ASS;
-["clr:collection"] sequence<string> CSS;
["clr:generic:List"] sequence<string> GSS;
dictionary<string, AIS> NDAIS;
-dictionary<string, CIS> NDCIS;
dictionary<string, GIS> NDGIS;
dictionary<string, ASS> NDASS;
-dictionary<string, CSS> NDCSS;
dictionary<string, GSS> NDGSS;
-["clr:collection"] dictionary<string, AIS> ODAIS;
-["clr:collection"] dictionary<string, CIS> ODCIS;
-["clr:collection"] dictionary<string, GIS> ODGIS;
-
-["clr:collection"] dictionary<string, ASS> ODASS;
-["clr:collection"] dictionary<string, CSS> ODCSS;
-["clr:collection"] dictionary<string, GSS> ODGSS;
-
["amd"] class MyClass
{
void shutdown();
@@ -61,32 +38,11 @@ dictionary<string, GSS> NDGSS;
NDV opNDV(NDV i, out NDV o);
NDR opNDR(NDR i, out NDR o);
- OV opOV(OV i, out OV o);
- OR opOR(OR i, out OR o);
- ODV opODV(ODV i, out ODV o);
- ODR opODR(ODR i, out ODR o);
-
- NODV opNODV(NODV i, out NODV o);
- NODR opNODR(NODR i, out NODR o);
-
- ONDV opONDV(ONDV i, out ONDV o);
- ONDR opONDR(ONDR i, out ONDR o);
-
NDAIS opNDAIS(NDAIS i, out NDAIS o);
- NDCIS opNDCIS(NDCIS i, out NDCIS o);
NDGIS opNDGIS(NDGIS i, out NDGIS o);
NDASS opNDASS(NDASS i, out NDASS o);
- NDCSS opNDCSS(NDCSS i, out NDCSS o);
NDGSS opNDGSS(NDGSS i, out NDGSS o);
-
- ODAIS opODAIS(ODAIS i, out ODAIS o);
- ODCIS opODCIS(ODCIS i, out ODCIS o);
- ODGIS opODGIS(ODGIS i, out ODGIS o);
-
- ODASS opODASS(ODASS i, out ODASS o);
- ODCSS opODCSS(ODCSS i, out ODCSS o);
- ODGSS opODGSS(ODGSS i, out ODGSS o);
};
};
diff --git a/csharp/test/Ice/dictMapping/Twoways.cs b/csharp/test/Ice/dictMapping/Twoways.cs
index e96508ca990..bc174084a46 100644
--- a/csharp/test/Ice/dictMapping/Twoways.cs
+++ b/csharp/test/Ice/dictMapping/Twoways.cs
@@ -87,154 +87,6 @@ class Twoways
}
{
- OV i = new OV();
- i[0] = 1;
- i[1] = 0;
-
- OV o;
- OV r;
- r = p.opOV(i, out o);
-
- test(OV.Equals(i, o));
- test(OV.Equals(i, r));
- }
-
- {
- OR i = new OR();
- i["a"] = "b";
- i["b"] = "a";
-
- OR o;
- OR r;
- r = p.opOR(i, out o);
-
- test(OR.Equals(i, o));
- test(OR.Equals(i, r));
- }
-
- {
- ODV i = new ODV();
- OV id = new OV();
- id[0] = 1;
- id[1] = 0;
- i["a"] = id;
- i["b"] = id;
-
- ODV o;
- ODV r;
- r = p.opODV(i, out o);
-
- test(ODV.Equals(i, o));
- test(ODV.Equals(i, r));
- }
-
- {
- ODR i = new ODR();
- OR id = new OR();
- id["a"] = "b";
- id["b"] = "a";
- i["a"] = id;
- i["b"] = id;
-
- ODR o;
- ODR r;
- r = p.opODR(i, out o);
-
- test(ODR.Equals(i, o));
- test(ODR.Equals(i, r));
- }
-
- {
- Dictionary<string, ODV> i = new Dictionary<string, ODV>();
- OV iid = new OV();
- iid[0] = 1;
- iid[1] = 0;
- ODV id = new ODV();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Dictionary<string, ODV> o;
- Dictionary<string, ODV> r;
- r = p.opNODV(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
- Dictionary<string, ODR> i = new Dictionary<string, ODR>();
- OR iid = new OR();
- iid["a"] = "b";
- iid["a"] = "b";
- ODR id = new ODR();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Dictionary<string, ODR> o;
- Dictionary<string, ODR> r;
- r = p.opNODR(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
- ONDV i = new ONDV();
- Dictionary<int, int> iid = new Dictionary<int, int>();
- iid[0] = 1;
- iid[1] = 0;
- Dictionary<string, Dictionary<int, int>> id
- = new Dictionary<string, Dictionary<int, int>>();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- ONDV o;
- ONDV r;
- r = p.opONDV(i, out o);
-
- foreach(string key in i.Keys)
- {
- foreach(string s in i[key].Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key][s], o[key][s]));
- test(Ice.CollectionComparer.Equals(i[key][s], r[key][s]));
- }
- }
- }
-
- {
- ONDR i = new ONDR();
- Dictionary<string, string> iid = new Dictionary<string, string>();
- iid["a"] = "b";
- iid["b"] = "a";
- Dictionary<string, Dictionary<string, string>> id
- = new Dictionary<string, Dictionary<string, string>>();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- ONDR o;
- ONDR r;
- r = p.opONDR(i, out o);
-
- foreach(string key in i.Keys)
- {
- foreach(string s in i[key].Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key][s], o[key][s]));
- test(Ice.CollectionComparer.Equals(i[key][s], r[key][s]));
- }
- }
- }
-
- {
int[] ii = new int[] { 1, 2 };
Dictionary<string, int[]> i = new Dictionary<string, int[]>();
i["a"] = ii;
@@ -252,22 +104,6 @@ class Twoways
}
{
- CIS ii = new CIS();
- ii.Add(1);
- ii.Add(2);
- Dictionary<string, CIS> i = new Dictionary<string, CIS>();
- i["a"] = ii;
- i["b"] = ii;
-
- Dictionary<string, CIS> o;
- Dictionary<string, CIS> r;
- r = p.opNDCIS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
List<int> ii = new List<int>();
ii.Add(1);
ii.Add(2);
@@ -304,22 +140,6 @@ class Twoways
}
{
- CSS ii = new CSS();
- ii.Add("a");
- ii.Add("b");
- Dictionary<string, CSS> i = new Dictionary<string, CSS>();
- i["a"] = ii;
- i["b"] = ii;
-
- Dictionary<string, CSS> o;
- Dictionary<string, CSS> r;
- r = p.opNDCSS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
List<string> ii = new List<string>();
ii.Add("a");
ii.Add("b");
@@ -337,115 +157,5 @@ class Twoways
test(Ice.CollectionComparer.Equals(i[key], r[key]));
}
}
-
- {
- int[] ii = new int[] { 1, 2 };
- ODAIS i = new ODAIS();
- i["a"] = ii;
- i["b"] = ii;
-
- ODAIS o;
- ODAIS r;
- r = p.opODAIS(i, out o);
-
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- }
-
- {
- CIS ii = new CIS();
- ii.Add(1);
- ii.Add(2);
- ODCIS i = new ODCIS();
- i["a"] = ii;
- i["b"] = ii;
-
- ODCIS o;
- ODCIS r;
- r = p.opODCIS(i, out o);
-
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- }
-
- {
- List<int> ii = new List<int>();
- ii.Add(1);
- ii.Add(2);
- ODGIS i = new ODGIS();
- i["a"] = ii;
- i["b"] = ii;
-
- ODGIS o;
- ODGIS r;
- r = p.opODGIS(i, out o);
-
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- }
-
- {
- string[] ii = new string[] { "a", "b" };
- ODASS i = new ODASS();
- i["a"] = ii;
- i["b"] = ii;
-
- ODASS o;
- ODASS r;
- r = p.opODASS(i, out o);
-
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- }
-
- {
- CSS ii = new CSS();
- ii.Add("a");
- ii.Add("b");
- ODCSS i = new ODCSS();
- i["a"] = ii;
- i["b"] = ii;
-
- ODCSS o;
- ODCSS r;
- r = p.opODCSS(i, out o);
-
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- }
-
- {
- List<string> ii = new List<string>();
- ii.Add("a");
- ii.Add("b");
- ODGSS i = new ODGSS();
- i["a"] = ii;
- i["b"] = ii;
-
- ODGSS o;
- ODGSS r;
- r = p.opODGSS(i, out o);
-
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- }
}
}
diff --git a/csharp/test/Ice/dictMapping/TwowaysAMI.cs b/csharp/test/Ice/dictMapping/TwowaysAMI.cs
index 62cc81aa369..f0c0173b5b0 100644
--- a/csharp/test/Ice/dictMapping/TwowaysAMI.cs
+++ b/csharp/test/Ice/dictMapping/TwowaysAMI.cs
@@ -107,98 +107,6 @@ public class TwowaysAMI
callback.called();
}
- public void opOVI(Ice.AsyncResult result)
- {
- OV i = (OV)result.AsyncState;
- OV o;
- OV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opOV(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opORI(Ice.AsyncResult result)
- {
- OR i = (OR)result.AsyncState;
- OR o;
- OR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opOR(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opODVI(Ice.AsyncResult result)
- {
- ODV i = (ODV)result.AsyncState;
- ODV o;
- ODV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODV(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opODRI(Ice.AsyncResult result)
- {
- ODR i = (ODR)result.AsyncState;
- ODR o;
- ODR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODR(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opNODVI(Ice.AsyncResult result)
- {
- Dictionary<string, ODV> i = (Dictionary<string, ODV>)result.AsyncState;
- Dictionary<string, ODV> o;
- Dictionary<string, ODV> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNODV(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opNODRI(Ice.AsyncResult result)
- {
- Dictionary<string, ODR> i = (Dictionary<string, ODR>)result.AsyncState;
- Dictionary<string, ODR> o;
- Dictionary<string, ODR> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNODR(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
- public void opONDVI(Ice.AsyncResult result)
- {
- ONDV i = (ONDV)result.AsyncState;
- ONDV o;
- ONDV r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opONDV(out o, result);
- foreach(string key in i.Keys)
- {
- foreach(string s in i[key].Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key][s], o[key][s]));
- test(Ice.CollectionComparer.Equals(i[key][s], r[key][s]));
- }
- }
- callback.called();
- }
-
- public void opONDRI(Ice.AsyncResult result)
- {
- ONDR i = (ONDR)result.AsyncState;
- ONDR o;
- ONDR r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opONDR(out o, result);
- foreach(string key in i.Keys)
- {
- foreach(string s in i[key].Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key][s], o[key][s]));
- test(Ice.CollectionComparer.Equals(i[key][s], r[key][s]));
- }
- }
- callback.called();
- }
-
public void opNDAISI(Ice.AsyncResult result)
{
Dictionary<string, int[]> i = (Dictionary<string, int[]>)result.AsyncState;
@@ -212,19 +120,6 @@ public class TwowaysAMI
callback.called();
}
- public void opNDCISI(Ice.AsyncResult result)
- {
- Dictionary<string, CIS> i = (Dictionary<string, CIS>)result.AsyncState;
- Dictionary<string, CIS> o;
- Dictionary<string, CIS> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDCIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
public void opNDGISI(Ice.AsyncResult result)
{
Dictionary<string, List<int>> i = (Dictionary<string, List<int>>)result.AsyncState;
@@ -253,19 +148,6 @@ public class TwowaysAMI
callback.called();
}
- public void opNDCSSI(Ice.AsyncResult result)
- {
- Dictionary<string, CSS> i = (Dictionary<string,CSS>)result.AsyncState;
- Dictionary<string, CSS> o;
- Dictionary<string, CSS> r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opNDCSS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
public void opNDGSSI(Ice.AsyncResult result)
{
Dictionary<string, List<string>> i = (Dictionary<string,List<string>>)result.AsyncState;
@@ -280,84 +162,6 @@ public class TwowaysAMI
callback.called();
}
- public void opODAISI(Ice.AsyncResult result)
- {
- ODAIS i = (ODAIS)result.AsyncState;
- ODAIS o;
- ODAIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODAIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODCISI(Ice.AsyncResult result)
- {
- ODCIS i = (ODCIS)result.AsyncState;
- ODCIS o;
- ODCIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODCIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODGISI(Ice.AsyncResult result)
- {
- ODGIS i = (ODGIS)result.AsyncState;
- ODGIS o;
- ODGIS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODGIS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODASSI(Ice.AsyncResult result)
- {
- ODASS i = (ODASS)result.AsyncState;
- ODASS o;
- ODASS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODASS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODCSSI(Ice.AsyncResult result)
- {
- ODCSS i = (ODCSS)result.AsyncState;
- ODCSS o;
- ODCSS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODCSS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
- public void opODGSSI(Ice.AsyncResult result)
- {
- ODGSS i = (ODGSS)result.AsyncState;
- ODGSS o;
- ODGSS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opODGSS(out o, result);
- foreach(string key in i.Keys)
- {
- test(Ice.CollectionComparer.Equals(i[key], o[key]));
- test(Ice.CollectionComparer.Equals(i[key], r[key]));
- }
- callback.called();
- }
-
public virtual void check()
{
callback.check();
@@ -415,118 +219,6 @@ public class TwowaysAMI
}
{
- OV i = new OV();
- i[0] = 1;
- i[1] = 0;
-
- Callback cb = new Callback();
- p.begin_opOV(i, null, cb.opOVI, i);
- cb.check();
- }
-
- {
- OR i = new OR();
- i["a"] = "b";
- i["b"] = "a";
-
- Callback cb = new Callback();
- p.begin_opOR(i, null, cb.opORI, i);
- cb.check();
- }
-
- {
- ODV i = new ODV();
- OV id = new OV();
- id[0] = 1;
- id[1] = 0;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opODV(i, null, cb.opODVI, i);
- cb.check();
- }
-
- {
- ODR i = new ODR();
- OR id = new OR();
- id["a"] = "b";
- id["b"] = "a";
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opODR(i, null, cb.opODRI, i);
- cb.check();
- }
-
- {
- Dictionary<string, ODV> i = new Dictionary<string, ODV>();
- OV iid = new OV();
- iid[0] = 1;
- iid[1] = 0;
- ODV id = new ODV();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opNODV(i, null, cb.opNODVI, i);
- cb.check();
- }
-
- {
- Dictionary<string, ODR> i = new Dictionary<string, ODR>();
- OR iid = new OR();
- iid["a"] = "b";
- iid["b"] = "a";
- ODR id = new ODR();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opNODR(i, null, cb.opNODRI, i);
- cb.check();
- }
-
- {
- ONDV i = new ONDV();
- Dictionary<int, int> iid = new Dictionary<int, int>();
- iid[0] = 1;
- iid[1] = 0;
- Dictionary<string, Dictionary<int, int>> id
- = new Dictionary<string, Dictionary<int, int>>();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opONDV(i, null, cb.opONDVI, i);
- cb.check();
- }
-
- {
- ONDR i = new ONDR();
- Dictionary<string, string> iid = new Dictionary<string, string>();
- iid["a"] = "b";
- iid["b"] = "a";
- Dictionary<string, Dictionary<string, string>> id
- = new Dictionary<string, Dictionary<string, string>>();
- id["a"] = iid;
- id["b"] = iid;
- i["a"] = id;
- i["b"] = id;
-
- Callback cb = new Callback();
- p.begin_opONDR(i, null, cb.opONDRI, i);
- cb.check();
- }
-
- {
int[] ii = new int[] { 1, 2 };
Dictionary<string, int[]> i = new Dictionary<string, int[]>();
i["a"] = ii;
@@ -538,19 +230,6 @@ public class TwowaysAMI
}
{
- CIS ii = new CIS();
- ii.Add(1);
- ii.Add(2);
- Dictionary<string, CIS> i = new Dictionary<string, CIS>();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opNDCIS(i, null, cb.opNDCISI, i);
- cb.check();
- }
-
- {
List<int> ii = new List<int>();
ii.Add(1);
ii.Add(2);
@@ -575,19 +254,6 @@ public class TwowaysAMI
}
{
- CSS ii = new CSS();
- ii.Add("a");
- ii.Add("b");
- Dictionary<string, CSS> i = new Dictionary<string, CSS>();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opNDCSS(i, null, cb.opNDCSSI, i);
- cb.check();
- }
-
- {
List<string> ii = new List<string>();
ii.Add("a");
ii.Add("b");
@@ -599,79 +265,5 @@ public class TwowaysAMI
p.begin_opNDGSS(i, null, cb.opNDGSSI, i);
cb.check();
}
-
- {
- int[] ii = new int[] { 1, 2 };
- ODAIS i = new ODAIS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODAIS(i, null, cb.opODAISI, i);
- cb.check();
- }
-
- {
- CIS ii = new CIS();
- ii.Add(1);
- ii.Add(2);
- ODCIS i = new ODCIS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODCIS(i, null, cb.opODCISI, i);
- cb.check();
- }
-
- {
- List<int> ii = new List<int>();
- ii.Add(1);
- ii.Add(2);
- ODGIS i = new ODGIS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODGIS(i, null, cb.opODGISI, i);
- cb.check();
- }
-
- {
- string[] ii = new string[] { "a", "b" };
- ODASS i = new ODASS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODASS(i, null, cb.opODASSI, i);
- cb.check();
- }
-
- {
- CSS ii = new CSS();
- ii.Add("a");
- ii.Add("b");
- ODCSS i = new ODCSS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODCSS(i, null, cb.opODCSSI, i);
- cb.check();
- }
-
- {
- List<string> ii = new List<string>();
- ii.Add("a");
- ii.Add("b");
- ODGSS i = new ODGSS();
- i["a"] = ii;
- i["b"] = ii;
-
- Callback cb = new Callback();
- p.begin_opODGSS(i, null, cb.opODGSSI, i);
- cb.check();
- }
}
}
diff --git a/csharp/test/Ice/dispatcher/AllTests.cs b/csharp/test/Ice/dispatcher/AllTests.cs
index b509bd043bb..61e7413236a 100644
--- a/csharp/test/Ice/dispatcher/AllTests.cs
+++ b/csharp/test/Ice/dispatcher/AllTests.cs
@@ -8,24 +8,9 @@
// **********************************************************************
-using System;
-using System.Collections;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.Threading;
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
{
@@ -90,21 +75,7 @@ public class AllTests : TestCommon.TestApp
private bool _called;
}
-#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);
diff --git a/csharp/test/Ice/dispatcher/Client.cs b/csharp/test/Ice/dispatcher/Client.cs
index 7c4e7368e77..e7a69b700be 100644
--- a/csharp/test/Ice/dispatcher/Client.cs
+++ b/csharp/test/Ice/dispatcher/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -44,9 +43,9 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
diff --git a/csharp/test/Ice/dispatcher/Collocated.cs b/csharp/test/Ice/dispatcher/Collocated.cs
index b15880f4ac2..583795d3367 100644
--- a/csharp/test/Ice/dispatcher/Collocated.cs
+++ b/csharp/test/Ice/dispatcher/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -51,9 +50,9 @@ public class Collocated
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -65,7 +64,7 @@ public class Collocated
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/dispatcher/Dispatcher.cs b/csharp/test/Ice/dispatcher/Dispatcher.cs
index a5caa9eca24..4bd201c88df 100644
--- a/csharp/test/Ice/dispatcher/Dispatcher.cs
+++ b/csharp/test/Ice/dispatcher/Dispatcher.cs
@@ -7,9 +7,7 @@
//
// **********************************************************************
-using System;
using System.Diagnostics;
-using System.Reflection;
using System.Collections.Generic;
using System.Threading;
@@ -35,16 +33,12 @@ public class Dispatcher
{
while(true)
{
-#if COMPACT
- Ice.VoidAction call = null;
-#else
System.Action call = null;
-#endif
lock(_m)
{
if(!_terminated && _calls.Count == 0)
{
- System.Threading.Monitor.Wait(_m);
+ Monitor.Wait(_m);
}
if(_calls.Count > 0)
@@ -73,18 +67,14 @@ public class Dispatcher
}
}
-#if COMPACT
- public void dispatch(Ice.VoidAction call, Ice.Connection con)
-#else
public void dispatch(System.Action call, Ice.Connection con)
-#endif
{
lock(_m)
{
_calls.Enqueue(call);
if(_calls.Count == 1)
{
- System.Threading.Monitor.Pulse(_m);
+ Monitor.Pulse(_m);
}
}
}
@@ -94,7 +84,7 @@ public class Dispatcher
lock(_m)
{
_instance._terminated = true;
- System.Threading.Monitor.Pulse(_m);
+ Monitor.Pulse(_m);
}
_instance._thread.Join();
@@ -107,11 +97,7 @@ public class Dispatcher
static Dispatcher _instance;
-#if COMPACT
- private Queue<Ice.VoidAction> _calls = new Queue<Ice.VoidAction>();
-#else
private Queue<System.Action> _calls = new Queue<System.Action>();
-#endif
Thread _thread;
bool _terminated = false;
private static readonly object _m = new object();
diff --git a/csharp/test/Ice/dispatcher/Server.cs b/csharp/test/Ice/dispatcher/Server.cs
index 117c31b9fe9..82ceaa711c6 100644
--- a/csharp/test/Ice/dispatcher/Server.cs
+++ b/csharp/test/Ice/dispatcher/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/echo/BlobjectI.cs b/csharp/test/Ice/echo/BlobjectI.cs
index fa807a4058f..003107de3b9 100644
--- a/csharp/test/Ice/echo/BlobjectI.cs
+++ b/csharp/test/Ice/echo/BlobjectI.cs
@@ -7,11 +7,7 @@
//
// **********************************************************************
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.Threading;
-using Test;
public class BlobjectI : Ice.BlobjectAsync
{
diff --git a/csharp/test/Ice/echo/Server.cs b/csharp/test/Ice/echo/Server.cs
index b71b58bedd4..3d717db85b9 100644
--- a/csharp/test/Ice/echo/Server.cs
+++ b/csharp/test/Ice/echo/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -69,7 +68,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/enums/AllTests.cs b/csharp/test/Ice/enums/AllTests.cs
index 2cc4ac8a522..2204b4cbf23 100644
--- a/csharp/test/Ice/enums/AllTests.cs
+++ b/csharp/test/Ice/enums/AllTests.cs
@@ -8,25 +8,11 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using Test;
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", "optional,version=1.0.0.0");
- return initData;
- }
-
- override
- public void run(Ice.Communicator communicator)
-#else
public static TestIntfPrx allTests(Ice.Communicator communicator)
-#endif
{
string sref = "test:default -p 12010";
Ice.ObjectPrx obj = communicator.stringToProxy(sref);
@@ -205,10 +191,6 @@ public class AllTests : TestCommon.TestApp
}
Console.Out.WriteLine("ok");
-#if SILVERLIGHT
- proxy.shutdown();
-#else
return proxy;
-#endif
}
}
diff --git a/csharp/test/Ice/enums/Client.cs b/csharp/test/Ice/enums/Client.cs
index 0f55d9f44cf..1585a8ba793 100644
--- a/csharp/test/Ice/enums/Client.cs
+++ b/csharp/test/Ice/enums/Client.cs
@@ -30,11 +30,7 @@ public class Client
{
int status = 0;
Ice.Communicator communicator = null;
-
-#if !COMPACT && !UNITY
Debug.Listeners.Add(new ConsoleTraceListener());
-#endif
-
try
{
Ice.InitializationData initData = new Ice.InitializationData();
diff --git a/csharp/test/Ice/enums/Server.cs b/csharp/test/Ice/enums/Server.cs
index 752c68ae649..1612c8c6814 100644
--- a/csharp/test/Ice/enums/Server.cs
+++ b/csharp/test/Ice/enums/Server.cs
@@ -37,9 +37,7 @@ public class Server
int status = 0;
Ice.Communicator communicator = null;
-#if !COMPACT && !UNITY
Debug.Listeners.Add(new ConsoleTraceListener());
-#endif
try
{
@@ -49,9 +47,9 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -63,7 +61,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/exceptions/AllTests.cs b/csharp/test/Ice/exceptions/AllTests.cs
index 23042584a90..1f87fbdf86d 100644
--- a/csharp/test/Ice/exceptions/AllTests.cs
+++ b/csharp/test/Ice/exceptions/AllTests.cs
@@ -12,18 +12,6 @@ using System.Diagnostics;
using System.Threading;
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 class Callback
@@ -39,7 +27,7 @@ public class AllTests : TestCommon.TestApp
{
while(!_called)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
_called = false;
@@ -52,36 +40,16 @@ public class AllTests : TestCommon.TestApp
{
Debug.Assert(!_called);
_called = true;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
private bool _called;
}
-#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");
- initData.properties.setProperty("Ice.MessageSizeMax", "10");
- initData.properties.setProperty("Ice.Warn.Connections", "0");
- return initData;
- }
- override
- public void run(Ice.Communicator communicator)
-#else
public static ThrowerPrx allTests(Ice.Communicator communicator)
-#endif
{
-#if SILVERLIGHT
- WriteLine("Ice.FactoryAssemblies: " + communicator.getProperties().getProperty("Ice.FactoryAssemblies"));
-#endif
-
-#if !SILVERLIGHT
{
Write("testing object adapter registration exceptions... ");
Ice.ObjectAdapter first;
@@ -190,7 +158,7 @@ public class AllTests : TestCommon.TestApp
adapter.deactivate();
WriteLine("ok");
}
-#endif
+
{
Write("testing object factory registration exception... ");
communicator.getValueFactoryManager().add( _ => { return null; }, "::x");
@@ -1395,10 +1363,6 @@ public class AllTests : TestCommon.TestApp
}
WriteLine("ok");
-#if SILVERLIGHT
- thrower.shutdown();
-#else
return thrower;
-#endif
}
}
diff --git a/csharp/test/Ice/exceptions/Client.cs b/csharp/test/Ice/exceptions/Client.cs
index fc46b2ae0d7..5974abde6e0 100644
--- a/csharp/test/Ice/exceptions/Client.cs
+++ b/csharp/test/Ice/exceptions/Client.cs
@@ -9,7 +9,6 @@
using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -36,22 +35,15 @@ public class Client
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
initData.properties.setProperty("Ice.Warn.Connections", "0");
initData.properties.setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
initData.properties.setProperty("Ice.MessageSizeMax", "10"); // 10KB max
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.WriteLine(ex);
+ Console.WriteLine(ex);
status = 1;
}
@@ -63,7 +55,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.WriteLine(ex);
+ Console.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/exceptions/Collocated.cs b/csharp/test/Ice/exceptions/Collocated.cs
index b04bc7fe605..9a391f35513 100644
--- a/csharp/test/Ice/exceptions/Collocated.cs
+++ b/csharp/test/Ice/exceptions/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -38,22 +37,14 @@ public class Collocated
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "collocated");
-#endif
-
initData.properties.setProperty("Ice.Warn.Dispatch", "0");
initData.properties.setProperty("Ice.MessageSizeMax", "10"); // 10KB max
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.WriteLine(ex);
+ Console.WriteLine(ex);
status = 1;
}
@@ -65,7 +56,7 @@ public class Collocated
}
catch(Ice.LocalException ex)
{
- System.Console.WriteLine(ex);
+ Console.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/exceptions/Server.cs b/csharp/test/Ice/exceptions/Server.cs
index 0a8f72e242f..0b8885256a4 100644
--- a/csharp/test/Ice/exceptions/Server.cs
+++ b/csharp/test/Ice/exceptions/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/exceptions/ThrowerAMDI.cs b/csharp/test/Ice/exceptions/ThrowerAMDI.cs
index 76efec13f53..e8fda6b79ad 100644
--- a/csharp/test/Ice/exceptions/ThrowerAMDI.cs
+++ b/csharp/test/Ice/exceptions/ThrowerAMDI.cs
@@ -7,6 +7,7 @@
//
// **********************************************************************
+using System;
using System.Diagnostics;
using Test;
@@ -131,7 +132,7 @@ public class ThrowerI : ThrowerDisp_
public override void throwNonIceException_async(AMD_Thrower_throwNonIceException cb, Ice.Current current)
{
- throw new System.Exception();
+ throw new Exception();
}
public override void throwAssertException_async(AMD_Thrower_throwAssertException cb, Ice.Current current)
@@ -155,13 +156,13 @@ public class ThrowerI : ThrowerDisp_
{
cb.ice_response();
- throw new System.Exception();
+ throw new Exception();
}
public override void throwAfterException_async(AMD_Thrower_throwAfterException cb, Ice.Current current)
{
cb.ice_exception(new A());
- throw new System.Exception();
+ throw new Exception();
}
}
diff --git a/csharp/test/Ice/exceptions/ThrowerI.cs b/csharp/test/Ice/exceptions/ThrowerI.cs
index 53c03f7663e..3b609377f8d 100644
--- a/csharp/test/Ice/exceptions/ThrowerI.cs
+++ b/csharp/test/Ice/exceptions/ThrowerI.cs
@@ -94,7 +94,7 @@ public sealed class ThrowerI : ThrowerDisp_
public override void throwNonIceException(Ice.Current current)
{
- throw new System.Exception();
+ throw new Exception();
}
public override void throwAssertException(Ice.Current current)
diff --git a/csharp/test/Ice/facets/AllTests.cs b/csharp/test/Ice/facets/AllTests.cs
index a6325a760f8..d32bd75bd47 100644
--- a/csharp/test/Ice/facets/AllTests.cs
+++ b/csharp/test/Ice/facets/AllTests.cs
@@ -11,26 +11,10 @@ using System;
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 : TestCommon.TestApp
-{
-#if SILVERLIGHT
- override
- public void run(Ice.Communicator communicator)
-#else
+{
public static GPrx allTests(Ice.Communicator communicator)
-#endif
{
Write("testing Ice.Admin.Facets property... ");
@@ -54,7 +38,6 @@ public class AllTests : TestCommon.TestApp
communicator.getProperties().setProperty("Ice.Admin.Facets", "");
WriteLine("ok");
-#if !SILVERLIGHT
Write("testing facet registration exceptions... ");
communicator.getProperties().setProperty("FacetExceptionTestAdapter.Endpoints", "default");
Ice.ObjectAdapter adapter = communicator.createObjectAdapter("FacetExceptionTestAdapter");
@@ -110,7 +93,7 @@ public class AllTests : TestCommon.TestApp
WriteLine("ok");
adapter.deactivate();
-#endif
+
Write("testing stringToProxy... ");
Flush();
string @ref = "d:default -p 12010";
@@ -201,11 +184,6 @@ public class AllTests : TestCommon.TestApp
test(hf.callG().Equals("G"));
test(hf.callH().Equals("H"));
WriteLine("ok");
-
-#if SILVERLIGHT
- gf.shutdown();
-#else
return gf;
-#endif
}
}
diff --git a/csharp/test/Ice/facets/Client.cs b/csharp/test/Ice/facets/Client.cs
index 8a57fd4c4f0..e080de59e8e 100644
--- a/csharp/test/Ice/facets/Client.cs
+++ b/csharp/test/Ice/facets/Client.cs
@@ -9,7 +9,6 @@
using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -37,9 +36,9 @@ public class Client
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.WriteLine(ex);
+ Console.WriteLine(ex);
status = 1;
}
@@ -51,7 +50,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.WriteLine(ex);
+ Console.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/facets/Collocated.cs b/csharp/test/Ice/facets/Collocated.cs
index 096bbb31afe..8cdd1772075 100644
--- a/csharp/test/Ice/facets/Collocated.cs
+++ b/csharp/test/Ice/facets/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/facets/Server.cs b/csharp/test/Ice/facets/Server.cs
index 02ad23f9e5f..74fe1ad5ece 100644
--- a/csharp/test/Ice/facets/Server.cs
+++ b/csharp/test/Ice/facets/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/faultTolerance/AllTests.cs b/csharp/test/Ice/faultTolerance/AllTests.cs
index f439173202e..7d47a3edf96 100644
--- a/csharp/test/Ice/faultTolerance/AllTests.cs
+++ b/csharp/test/Ice/faultTolerance/AllTests.cs
@@ -9,22 +9,9 @@
using System;
using System.Diagnostics;
-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 : TestCommon.TestApp
{
private class Callback
@@ -60,7 +47,8 @@ public class AllTests : TestCommon.TestApp
private bool _called;
}
- private static void exceptAbortI(Ice.Exception ex) {
+ private static void exceptAbortI(Ice.Exception ex)
+ {
try
{
throw ex;
@@ -81,30 +69,8 @@ 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.Warn.Connections", "0");
- return initData;
- }
- override
- public void run(Ice.Communicator communicator)
-#else
public static void allTests(Ice.Communicator communicator, List<int> ports)
-#endif
{
-#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";
diff --git a/csharp/test/Ice/faultTolerance/Client.cs b/csharp/test/Ice/faultTolerance/Client.cs
index 5c0ca67a402..fdb28f904f6 100644
--- a/csharp/test/Ice/faultTolerance/Client.cs
+++ b/csharp/test/Ice/faultTolerance/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -21,7 +20,7 @@ public class Client
{
private static void usage()
{
- System.Console.Error.WriteLine("Usage: client port...");
+ Console.Error.WriteLine("Usage: client port...");
}
private static int run(string[] args, Ice.Communicator communicator)
@@ -32,11 +31,11 @@ public class Client
int port = 0;
try
{
- port = System.Int32.Parse(args[i]);
+ port = Int32.Parse(args[i]);
}
- catch(System.FormatException ex)
+ catch(FormatException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
return 1;
}
ports.Add(port);
@@ -44,7 +43,7 @@ public class Client
if(ports.Count == 0)
{
- System.Console.Error.WriteLine("Client: no ports specified");
+ Console.Error.WriteLine("Client: no ports specified");
usage();
return 1;
}
@@ -70,9 +69,9 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -84,7 +83,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/faultTolerance/Server.cs b/csharp/test/Ice/faultTolerance/Server.cs
index 2df6d5133a2..97f0e735174 100644
--- a/csharp/test/Ice/faultTolerance/Server.cs
+++ b/csharp/test/Ice/faultTolerance/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -21,7 +20,7 @@ public class Server
{
private static void usage()
{
- System.Console.Error.WriteLine("Usage: Server port");
+ Console.Error.WriteLine("Usage: Server port");
}
private static int run(string[] args, Ice.Communicator communicator)
@@ -31,25 +30,25 @@ public class Server
{
if(args[i][0] == '-')
{
- System.Console.Error.WriteLine("Server: unknown option `" + args[i] + "'");
+ Console.Error.WriteLine("Server: unknown option `" + args[i] + "'");
usage();
return 1;
}
if(port != 0)
{
- System.Console.Error.WriteLine("Server: only one port can be specified");
+ Console.Error.WriteLine("Server: only one port can be specified");
usage();
return 1;
}
try
{
- port = System.Int32.Parse(args[i]);
+ port = int.Parse(args[i]);
}
- catch(System.FormatException)
+ catch(FormatException)
{
- System.Console.Error.WriteLine("Server: invalid port");
+ Console.Error.WriteLine("Server: invalid port");
usage();
return 1;
}
@@ -57,7 +56,7 @@ public class Server
if(port <= 0)
{
- System.Console.Error.WriteLine("Server: no port specified");
+ Console.Error.WriteLine("Server: no port specified");
usage();
return 1;
}
@@ -90,9 +89,9 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -104,7 +103,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/faultTolerance/TestI.cs b/csharp/test/Ice/faultTolerance/TestI.cs
index ce35ae896a3..349c598a195 100644
--- a/csharp/test/Ice/faultTolerance/TestI.cs
+++ b/csharp/test/Ice/faultTolerance/TestI.cs
@@ -7,10 +7,8 @@
//
// **********************************************************************
-using System;
using System.Diagnostics;
using System.Threading;
-using IceInternal;
using Test;
public sealed class TestI : TestIntfDisp_
@@ -26,9 +24,7 @@ public sealed class TestI : TestIntfDisp_
private void commitSuicide()
{
-#if !UNITY
_p.Kill();
-#endif
Thread.Sleep(5000); // Give other threads time to die.
}
diff --git a/csharp/test/Ice/hash/Client.cs b/csharp/test/Ice/hash/Client.cs
index 2f14c62dde1..489c800dc9a 100644
--- a/csharp/test/Ice/hash/Client.cs
+++ b/csharp/test/Ice/hash/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
using System.Collections.Generic;
@@ -24,7 +23,7 @@ public class Client
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
@@ -35,8 +34,8 @@ public class Client
try
{
- System.Console.Error.Write("testing proxy & endpoint hash algorithm collisions... ");
- System.Console.Error.Flush();
+ Console.Error.Write("testing proxy & endpoint hash algorithm collisions... ");
+ Console.Error.Flush();
Dictionary<int, Ice.ObjectPrx> seenProxy = new Dictionary<int, Ice.ObjectPrx>();
Dictionary<int, Ice.Endpoint> seenEndpoint = new Dictionary<int, Ice.Endpoint>();
int proxyCollisions = 0;
@@ -50,7 +49,7 @@ public class Client
//initData.properties.setProperty("Ice.Plugin.IceSSL", "IceSSL:IceSSL.PluginFactory");
communicator = Ice.Util.initialize(ref args, initData);
{
- System.Random rand = new System.Random();
+ Random rand = new Random();
for(i = 0; proxyCollisions < maxCollisions &&
endpointCollisions < maxCollisions &&
i < maxIterations; ++i)
@@ -146,7 +145,7 @@ public class Client
}
{
- System.Random rand = new System.Random();
+ Random rand = new Random();
Ice.ProxyIdentityFacetKey comparer = new Ice.ProxyIdentityFacetKey();
proxyCollisions = 0;
seenProxy = new Dictionary<int, Ice.ObjectPrx>();
@@ -236,13 +235,13 @@ public class Client
test(iComparer.GetHashCode(prx9) == iComparer.GetHashCode(prx9));
test(ifComparer.GetHashCode(prx9) == ifComparer.GetHashCode(prx9));
- System.Console.Error.WriteLine("ok");
+ Console.Error.WriteLine("ok");
- System.Console.Error.Write("testing exceptions hash algorithm collisions... ");
+ Console.Error.Write("testing exceptions hash algorithm collisions... ");
{
Dictionary<int,Test.OtherException> seenException = new Dictionary<int, Test.OtherException>();
- System.Random rand = new System.Random();
+ Random rand = new Random();
int exceptionCollisions = 0;
for(i = 0; i < maxIterations &&
@@ -274,7 +273,7 @@ public class Client
//
{
Dictionary<int,Test.OtherException> seenException = new Dictionary<int, Test.OtherException>();
- System.Random rand = new System.Random();
+ Random rand = new Random();
int exceptionCollisions = 0;
for(i = 0; i < maxIterations &&
@@ -303,7 +302,7 @@ public class Client
{
Dictionary<int,Test.BaseException> seenException = new Dictionary<int, Test.BaseException>();
- System.Random rand = new System.Random();
+ Random rand = new Random();
int exceptionCollisions = 0;
for(i = 0; i < maxIterations &&
@@ -350,12 +349,12 @@ public class Client
}
test(exceptionCollisions < maxCollisions);
}
- System.Console.Error.WriteLine("ok");
+ Console.Error.WriteLine("ok");
- System.Console.Error.Write("testing struct hash algorithm collisions... ");
+ Console.Error.Write("testing struct hash algorithm collisions... ");
{
Dictionary<int,Test.PointF> seenPointF = new Dictionary<int, Test.PointF>();
- System.Random rand = new System.Random();
+ Random rand = new Random();
int structCollisions = 0;
for(i = 0; i < maxIterations && structCollisions < maxCollisions; ++i)
{
@@ -520,7 +519,7 @@ public class Client
}
test(structCollisions < maxCollisions);
}
- System.Console.Error.WriteLine("ok");
+ Console.Error.WriteLine("ok");
if(communicator != null)
{
@@ -530,7 +529,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/hold/AllTests.cs b/csharp/test/Ice/hold/AllTests.cs
index e26cce8aa0e..813f1e3a59a 100644
--- a/csharp/test/Ice/hold/AllTests.cs
+++ b/csharp/test/Ice/hold/AllTests.cs
@@ -10,18 +10,6 @@
using System;
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 class Condition
@@ -79,12 +67,7 @@ public class AllTests : TestCommon.TestApp
private int _expected;
}
-#if SILVERLIGHT
- override
- public void run(Ice.Communicator communicator)
-#else
public static void allTests(Ice.Communicator communicator)
-#endif
{
Write("testing stringToProxy... ");
Flush();
diff --git a/csharp/test/Ice/hold/Client.cs b/csharp/test/Ice/hold/Client.cs
index b7e848e940f..d0f293fe44e 100644
--- a/csharp/test/Ice/hold/Client.cs
+++ b/csharp/test/Ice/hold/Client.cs
@@ -7,9 +7,7 @@
//
// **********************************************************************
-using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -36,9 +34,9 @@ public class Client
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -50,7 +48,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/hold/HoldI.cs b/csharp/test/Ice/hold/HoldI.cs
index fb3c68f677b..c51f93f6cbb 100644
--- a/csharp/test/Ice/hold/HoldI.cs
+++ b/csharp/test/Ice/hold/HoldI.cs
@@ -7,8 +7,6 @@
//
// **********************************************************************
-using System;
-using System.Diagnostics;
using Test;
public sealed class HoldI : HoldDisp_
diff --git a/csharp/test/Ice/hold/Server.cs b/csharp/test/Ice/hold/Server.cs
index 98f7ace2c4c..495ad52658a 100644
--- a/csharp/test/Ice/hold/Server.cs
+++ b/csharp/test/Ice/hold/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -60,9 +59,9 @@ public class Server
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -74,7 +73,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/hold/Timer.cs b/csharp/test/Ice/hold/Timer.cs
index 2bc1aadbc9e..1c15e5f427a 100644
--- a/csharp/test/Ice/hold/Timer.cs
+++ b/csharp/test/Ice/hold/Timer.cs
@@ -43,7 +43,7 @@ public class Timer
public Timer()
{
- _t = new System.Threading.Thread(new System.Threading.ThreadStart(run));
+ _t = new Thread(new ThreadStart(run));
_t.Start();
}
@@ -56,7 +56,7 @@ public class Timer
e.when = currentMonotonicTimeMillis() + milliseconds;
_tasks.Add(e);
_tasks.Sort();
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
@@ -69,7 +69,7 @@ public class Timer
e.when = 0;
_tasks.Add(e);
_tasks.Sort();
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
@@ -89,7 +89,7 @@ public class Timer
{
while(_tasks.Count == 0)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
e = _tasks[0];
@@ -103,7 +103,7 @@ public class Timer
_tasks.RemoveAt(0);
break;
}
- System.Threading.Monitor.Wait(this, (int)(e.when - now));
+ Monitor.Wait(this, (int)(e.when - now));
}
}
e.task();
@@ -111,20 +111,12 @@ public class Timer
}
-#if SILVERLIGHT
- private long currentMonotonicTimeMillis()
- {
- return (System.DateTime.Now.Ticks - _begin) / 10000;
- }
- private long _begin = System.DateTime.Now.Ticks;
-#else
private long currentMonotonicTimeMillis()
{
return _sw.ElapsedMilliseconds;
}
private Stopwatch _sw = Stopwatch.StartNew();
-#endif
- private System.Threading.Thread _t;
+ private Thread _t;
private List<Entry> _tasks = new List<Entry>();
}
diff --git a/csharp/test/Ice/info/AllTests.cs b/csharp/test/Ice/info/AllTests.cs
index 81e577e5a66..1c1b34e30cb 100644
--- a/csharp/test/Ice/info/AllTests.cs
+++ b/csharp/test/Ice/info/AllTests.cs
@@ -7,32 +7,13 @@
//
// **********************************************************************
-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
{
-#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
{
Write("testing proxy endpoint information... ");
Flush();
@@ -53,15 +34,7 @@ public class AllTests : TestCommon.TestApp
test(ipEndpoint.compress);
test(!ipEndpoint.datagram());
-#if __MonoCS__
- test(ipEndpoint.type() == Ice.TCPEndpointType.value && !ipEndpoint.secure() ||
- ipEndpoint.type() == Ice.WSEndpointType.value && !ipEndpoint.secure());
- test(ipEndpoint.type() == Ice.TCPEndpointType.value && ipEndpoint is Ice.TCPEndpointInfo ||
- ipEndpoint.type() == Ice.WSEndpointType.value && ipEndpoint is Ice.WSEndpointInfo);
-#elif COMPACT || SILVERLIGHT
- test(ipEndpoint.type() == Ice.TCPEndpointType.value && !ipEndpoint.secure());
- test(ipEndpoint.type() == Ice.TCPEndpointType.value && ipEndpoint is Ice.TCPEndpointInfo);
-#else
+
test(ipEndpoint.type() == Ice.TCPEndpointType.value && !ipEndpoint.secure() ||
ipEndpoint.type() == IceSSL.EndpointType.value && ipEndpoint.secure() ||
ipEndpoint.type() == Ice.WSEndpointType.value && !ipEndpoint.secure() ||
@@ -70,7 +43,6 @@ public class AllTests : TestCommon.TestApp
ipEndpoint.type() == IceSSL.EndpointType.value && ipEndpoint is IceSSL.EndpointInfo ||
ipEndpoint.type() == Ice.WSEndpointType.value && ipEndpoint is Ice.WSEndpointInfo ||
ipEndpoint.type() == Ice.WSSEndpointType.value && ipEndpoint is IceSSL.WSSEndpointInfo);
-#endif
Ice.UDPEndpointInfo udpEndpoint = (Ice.UDPEndpointInfo)endps[1].getInfo();
test(udpEndpoint.host.Equals("udphost"));
@@ -91,7 +63,6 @@ public class AllTests : TestCommon.TestApp
WriteLine("ok");
string defaultHost = communicator.getProperties().getProperty("Ice.Default.Host");
-#if !SILVERLIGHT
Ice.ObjectAdapter adapter;
Write("test object adapter endpoint information... ");
Flush();
@@ -105,14 +76,9 @@ public class AllTests : TestCommon.TestApp
test(IceUtilInternal.Arrays.Equals(endpoints, publishedEndpoints));
Ice.IPEndpointInfo ipEndpoint = (Ice.IPEndpointInfo)endpoints[0].getInfo();
-# if __MonoCS__
- test(ipEndpoint.type() == Ice.TCPEndpointType.value || ipEndpoint.type() == Ice.WSEndpointType.value);
-# elif COMPACT
- test(ipEndpoint.type() == Ice.TCPEndpointType.value);
-# else
test(ipEndpoint.type() == Ice.TCPEndpointType.value || ipEndpoint.type() == IceSSL.EndpointType.value ||
ipEndpoint.type() == Ice.WSEndpointType.value || ipEndpoint.type() == Ice.WSSEndpointType.value);
-# endif
+
test(ipEndpoint.host.Equals(defaultHost));
test(ipEndpoint.port > 0);
test(ipEndpoint.timeout == 15000);
@@ -146,7 +112,6 @@ public class AllTests : TestCommon.TestApp
adapter.destroy();
}
WriteLine("ok");
-#endif
Ice.ObjectPrx @base = communicator.stringToProxy("test:default -p 12010:udp -p 12010");
TestIntfPrx testIntf = TestIntfPrxHelper.checkedCast(@base);
@@ -166,12 +131,10 @@ public class AllTests : TestCommon.TestApp
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
}
WriteLine("ok");
@@ -185,14 +148,10 @@ public class AllTests : TestCommon.TestApp
test(!info.incoming);
test(info.adapterName.Length == 0);
test(info.remotePort == 12010);
-#if !SILVERLIGHT
test(info.localPort > 0);
-#endif
if(defaultHost.Equals("127.0.0.1"))
{
-#if !SILVERLIGHT
test(info.localAddress.Equals(defaultHost));
-#endif
test(info.remoteAddress.Equals(defaultHost));
}
test(info.rcvSize >= 1024);
@@ -201,7 +160,6 @@ public class AllTests : TestCommon.TestApp
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()));
@@ -237,14 +195,12 @@ public class AllTests : TestCommon.TestApp
test(!info.incoming);
test(info.adapterName.Length == 0);
test(info.localPort > 0);
-#endif
test(info.remotePort == 12010);
+
if(defaultHost.Equals("127.0.0.1"))
{
test(info.remoteAddress.Equals(defaultHost));
-#if !SILVERLIGHT
test(info.localAddress.Equals(defaultHost));
-#endif
}
test(info.rcvSize >= 2048);
test(info.sndSize >= 1024);
diff --git a/csharp/test/Ice/info/Client.cs b/csharp/test/Ice/info/Client.cs
index fd16d0e2545..d0f293fe44e 100644
--- a/csharp/test/Ice/info/Client.cs
+++ b/csharp/test/Ice/info/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -35,9 +34,9 @@ public class Client
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -49,7 +48,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/info/Server.cs b/csharp/test/Ice/info/Server.cs
index 3e236b8d522..fc3fb6f7116 100644
--- a/csharp/test/Ice/info/Server.cs
+++ b/csharp/test/Ice/info/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -42,7 +41,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/inheritance/AllTests.cs b/csharp/test/Ice/inheritance/AllTests.cs
index 4c385f7d4b8..a3e48def188 100644
--- a/csharp/test/Ice/inheritance/AllTests.cs
+++ b/csharp/test/Ice/inheritance/AllTests.cs
@@ -7,30 +7,11 @@
//
// **********************************************************************
-using System;
using Test;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
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
-
{
Write("testing stringToProxy... ");
Flush();
@@ -238,11 +219,6 @@ public class AllTests : TestCommon.TestApp
ib2o = cd.cdop(cd);
test(ib2o.Equals(cd));
WriteLine("ok");
-
-#if SILVERLIGHT
- initial.shutdown();
-#else
return initial;
-#endif
}
}
diff --git a/csharp/test/Ice/inheritance/Client.cs b/csharp/test/Ice/inheritance/Client.cs
index 6251c9ec06c..805670012c6 100644
--- a/csharp/test/Ice/inheritance/Client.cs
+++ b/csharp/test/Ice/inheritance/Client.cs
@@ -9,7 +9,6 @@
using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -35,20 +34,12 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -60,7 +51,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/inheritance/Server.cs b/csharp/test/Ice/inheritance/Server.cs
index 114d047a55a..17129734766 100644
--- a/csharp/test/Ice/inheritance/Server.cs
+++ b/csharp/test/Ice/inheritance/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -40,9 +39,9 @@ public class Server
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -54,7 +53,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/interceptor/AMDInterceptorI.cs b/csharp/test/Ice/interceptor/AMDInterceptorI.cs
index 7643d8849f5..1b5283026b0 100644
--- a/csharp/test/Ice/interceptor/AMDInterceptorI.cs
+++ b/csharp/test/Ice/interceptor/AMDInterceptorI.cs
@@ -65,7 +65,7 @@ class AMDInterceptorI : InterceptorI, Ice.DispatchInterceptorAsyncCallback
return true;
}
- public bool exception(System.Exception ex)
+ public bool exception(Exception ex)
{
setActualStatus(ex);
return true;
@@ -93,7 +93,7 @@ class AMDInterceptorI : InterceptorI, Ice.DispatchInterceptorAsyncCallback
}
internal void
- setActualStatus(System.Exception ex)
+ setActualStatus(Exception ex)
{
lock(this)
{
@@ -111,7 +111,7 @@ class AMDInterceptorI : InterceptorI, Ice.DispatchInterceptorAsyncCallback
}
}
- internal System.Exception
+ internal Exception
getException()
{
lock(this)
@@ -121,5 +121,5 @@ class AMDInterceptorI : InterceptorI, Ice.DispatchInterceptorAsyncCallback
}
private Ice.DispatchStatus actualStatus_;
- private System.Exception exception_;
+ private Exception exception_;
}
diff --git a/csharp/test/Ice/interceptor/Client.cs b/csharp/test/Ice/interceptor/Client.cs
index 0dcaca2bcfb..14fc4d47a50 100644
--- a/csharp/test/Ice/interceptor/Client.cs
+++ b/csharp/test/Ice/interceptor/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -251,14 +250,6 @@ public class Client
{
App app = new App();
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
return app.main(args, data);
}
}
diff --git a/csharp/test/Ice/interceptor/InterceptorI.cs b/csharp/test/Ice/interceptor/InterceptorI.cs
index cd51609bfe1..c25f7896248 100644
--- a/csharp/test/Ice/interceptor/InterceptorI.cs
+++ b/csharp/test/Ice/interceptor/InterceptorI.cs
@@ -8,8 +8,6 @@
// **********************************************************************
using System;
-using System.Collections;
-using System.Diagnostics;
class InterceptorI : Ice.DispatchInterceptor
{
diff --git a/csharp/test/Ice/interceptor/MyObjectI.cs b/csharp/test/Ice/interceptor/MyObjectI.cs
index 6c4327ef6eb..fa40bb98307 100644
--- a/csharp/test/Ice/interceptor/MyObjectI.cs
+++ b/csharp/test/Ice/interceptor/MyObjectI.cs
@@ -76,7 +76,6 @@ class MyObjectI : Test.MyObjectDisp_
//
// AMD
//
-
public override void
amdAdd_async(Test.AMD_MyObject_amdAdd cb, int x, int y, Ice.Current current)
{
diff --git a/csharp/test/Ice/invoke/AllTests.cs b/csharp/test/Ice/invoke/AllTests.cs
index fd1cc0f1e3e..a675caab7c2 100644
--- a/csharp/test/Ice/invoke/AllTests.cs
+++ b/csharp/test/Ice/invoke/AllTests.cs
@@ -7,13 +7,10 @@
//
// **********************************************************************
+
using System;
using System.Diagnostics;
-using System.Threading;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
public class AllTests : TestCommon.TestApp
{
@@ -140,7 +137,7 @@ public class AllTests : TestCommon.TestApp
inS.endEncapsulation();
callback.called();
}
- catch(System.Exception)
+ catch(Exception)
{
test(false);
}
@@ -166,7 +163,7 @@ public class AllTests : TestCommon.TestApp
inS.endEncapsulation();
callback.called();
}
- catch(System.Exception)
+ catch(Exception)
{
test(false);
}
@@ -183,20 +180,8 @@ public class AllTests : TestCommon.TestApp
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);
@@ -259,7 +244,7 @@ public class AllTests : TestCommon.TestApp
{
inS.endEncapsulation();
}
- catch(System.Exception)
+ catch(Exception)
{
test(false);
}
@@ -338,7 +323,7 @@ public class AllTests : TestCommon.TestApp
{
inS.endEncapsulation();
}
- catch(System.Exception)
+ catch(Exception)
{
test(false);
}
@@ -361,11 +346,6 @@ public class AllTests : TestCommon.TestApp
}
WriteLine("ok");
-
-#if SILVERLIGHT
- cl.shutdown();
-#else
return cl;
-#endif
}
}
diff --git a/csharp/test/Ice/invoke/Client.cs b/csharp/test/Ice/invoke/Client.cs
index 90cff8879f7..2d8eedad21a 100644
--- a/csharp/test/Ice/invoke/Client.cs
+++ b/csharp/test/Ice/invoke/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -35,17 +34,10 @@ public class Client
{
Ice.InitializationData initData = new Ice.InitializationData();
initData.properties = Ice.Util.createProperties(ref args);
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/invoke/Server.cs b/csharp/test/Ice/invoke/Server.cs
index 732e64d3a67..7a86cd8bab7 100644
--- a/csharp/test/Ice/invoke/Server.cs
+++ b/csharp/test/Ice/invoke/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -85,7 +84,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/location/AllTests.cs b/csharp/test/Ice/location/AllTests.cs
index 6d042d9742a..129737c3073 100644
--- a/csharp/test/Ice/location/AllTests.cs
+++ b/csharp/test/Ice/location/AllTests.cs
@@ -10,26 +10,10 @@
using System;
using Test;
using System.Collections.Generic;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
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"));
@@ -600,8 +584,7 @@ public class AllTests : TestCommon.TestApp
{
}
WriteLine("ok");
-
-#if !SILVERLIGHT
+
Write("testing indirect proxies to collocated objects... ");
Flush();
@@ -630,8 +613,5 @@ public class AllTests : TestCommon.TestApp
Flush();
manager.shutdown();
WriteLine("ok");
-#else
- manager.shutdown();
-#endif
}
}
diff --git a/csharp/test/Ice/location/Client.cs b/csharp/test/Ice/location/Client.cs
index 09001120600..fc333cef871 100644
--- a/csharp/test/Ice/location/Client.cs
+++ b/csharp/test/Ice/location/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -38,9 +37,9 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -52,7 +51,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/location/Server.cs b/csharp/test/Ice/location/Server.cs
index cdc3d5ed036..279acfb5192 100644
--- a/csharp/test/Ice/location/Server.cs
+++ b/csharp/test/Ice/location/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -66,9 +65,9 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator, initData);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -80,7 +79,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/metrics/AllTests.cs b/csharp/test/Ice/metrics/AllTests.cs
index 7d4a233726e..edd3e6a09d2 100644
--- a/csharp/test/Ice/metrics/AllTests.cs
+++ b/csharp/test/Ice/metrics/AllTests.cs
@@ -7,14 +7,10 @@
//
// **********************************************************************
-using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
using Test;
public class AllTests : TestCommon.TestApp
@@ -34,7 +30,7 @@ public class AllTests : TestCommon.TestApp
// to get an accurate sentBytes metric. The sentBytes metric is updated before the response
// to the operation is sent and getMetricsView can be dispatched before the metric is really
// updated.
- System.Threading.Thread.Sleep(100);
+ Thread.Sleep(100);
s = (IceMX.ConnectionMetrics)metrics.getMetricsView("View", out timestamp)["Connection"][0];
}
return s;
@@ -58,7 +54,7 @@ public class AllTests : TestCommon.TestApp
lock(this)
{
_wait = false;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
@@ -73,7 +69,7 @@ public class AllTests : TestCommon.TestApp
{
while(_wait)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
_wait = true;
}
@@ -142,7 +138,7 @@ public class AllTests : TestCommon.TestApp
{
while(!_updated)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
}
@@ -164,7 +160,7 @@ public class AllTests : TestCommon.TestApp
lock(this)
{
_updated = true;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
@@ -193,7 +189,7 @@ public class AllTests : TestCommon.TestApp
{
break;
}
- System.Threading.Thread.Sleep(50);
+ Thread.Sleep(50);
}
}
@@ -204,11 +200,7 @@ public class AllTests : TestCommon.TestApp
string map,
string attr,
string value,
-#if COMPACT
- Ice.VoidAction func)
-#else
System.Action func)
-#endif
{
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("IceMX.Metrics.View.Map." + map + ".GroupBy", attr);
@@ -375,11 +367,7 @@ public class AllTests : TestCommon.TestApp
return m;
}
-#if SILVERLIGHT
- override public void run(Ice.Communicator communicator, CommunicatorObserverI obsv)
-#else
public static MetricsPrx allTests(Ice.Communicator communicator, CommunicatorObserverI obsv)
-#endif
{
MetricsPrx metrics = MetricsPrxHelper.checkedCast(communicator.stringToProxy("metrics:default -p 12010"));
bool collocated = metrics.ice_getConnection() == null;
@@ -598,7 +586,7 @@ public class AllTests : TestCommon.TestApp
{
break;
}
- System.Threading.Thread.Sleep(10);
+ Thread.Sleep(10);
}
test(cm1.failures == 2 && sm1.failures >= 2);
@@ -673,11 +661,7 @@ public class AllTests : TestCommon.TestApp
checkFailure(clientMetrics, "ConnectionEstablishment", m1.id, "::Ice::ConnectTimeoutException", 2);
-#if COMPACT
- Ice.VoidAction c = () => { connect(metrics); };
-#else
System.Action c = () => { connect(metrics); };
-#endif
testAttribute(clientMetrics, clientProps, update, "ConnectionEstablishment", "parent", "Communicator", c);
testAttribute(clientMetrics, clientProps, update, "ConnectionEstablishment", "id", "127.0.0.1:12010", c);
testAttribute(clientMetrics, clientProps, update, "ConnectionEstablishment", "endpoint",
@@ -837,12 +821,7 @@ public class AllTests : TestCommon.TestApp
checkFailure(serverMetrics, "Dispatch", dm1.id, "System.ArgumentOutOfRangeException", 1);
test(dm1.size == 41 && dm1.replySize > 7); // Reply contains the exception stack depending on the OS.
-#if COMPACT
- Ice.VoidAction op = () => { invokeOp(metrics); };
-#else
System.Action op = () => { invokeOp(metrics); };
-#endif
-
testAttribute(serverMetrics, serverProps, update, "Dispatch", "parent", "TestAdapter", op);
testAttribute(serverMetrics, serverProps, update, "Dispatch", "id", "metrics [op]", op);
@@ -1225,11 +1204,6 @@ public class AllTests : TestCommon.TestApp
test(obsv.invocationObserver.userExceptionCount > 0);
WriteLine("ok");
-
-#if SILVERLIGHT
- metrics.shutdown();
-#else
return metrics;
-#endif
}
}
diff --git a/csharp/test/Ice/metrics/Client.cs b/csharp/test/Ice/metrics/Client.cs
index 47f84a300e9..eed092ffb08 100644
--- a/csharp/test/Ice/metrics/Client.cs
+++ b/csharp/test/Ice/metrics/Client.cs
@@ -30,11 +30,7 @@ public class Client
{
int status = 0;
Ice.Communicator communicator = null;
-
-#if !COMPACT && !UNITY
Debug.Listeners.Add(new ConsoleTraceListener());
-#endif
-
try
{
Ice.InitializationData initData = new Ice.InitializationData();
@@ -46,18 +42,12 @@ public class Client
initData.properties.setProperty("Ice.Warn.Connections", "0");
initData.properties.setProperty("Ice.MessageSizeMax", "50000");
initData.properties.setProperty("Ice.Default.Host", "127.0.0.1");
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
+
initData.observer = _observer;
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/metrics/Collocated.cs b/csharp/test/Ice/metrics/Collocated.cs
index d7ea036c054..a89d462bf07 100644
--- a/csharp/test/Ice/metrics/Collocated.cs
+++ b/csharp/test/Ice/metrics/Collocated.cs
@@ -39,11 +39,7 @@ public class Collocated
{
int status = 0;
Ice.Communicator communicator = null;
-
-#if !COMPACT && !UNITY
Debug.Listeners.Add(new ConsoleTraceListener());
-#endif
-
try
{
Ice.InitializationData initData = new Ice.InitializationData();
@@ -57,18 +53,11 @@ public class Collocated
initData.properties.setProperty("Ice.Warn.Dispatch", "0");
initData.properties.setProperty("Ice.MessageSizeMax", "50000");
initData.properties.setProperty("Ice.Default.Host", "127.0.0.1");
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- initData.properties.setProperty("Ice.FactoryAssemblies", "collocated");
-#endif
initData.observer = _observer;
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/metrics/InstrumentationI.cs b/csharp/test/Ice/metrics/InstrumentationI.cs
index 41d4c855ea2..9f75658de6b 100644
--- a/csharp/test/Ice/metrics/InstrumentationI.cs
+++ b/csharp/test/Ice/metrics/InstrumentationI.cs
@@ -11,8 +11,6 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
-using Test;
-
public class ObserverI : Ice.Instrumentation.Observer
{
virtual public void
diff --git a/csharp/test/Ice/metrics/MetricsAMDI.cs b/csharp/test/Ice/metrics/MetricsAMDI.cs
index 0ab9d15336b..368e3fc7b4b 100644
--- a/csharp/test/Ice/metrics/MetricsAMDI.cs
+++ b/csharp/test/Ice/metrics/MetricsAMDI.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Collections.Generic;
using Test;
public sealed class ControllerI : ControllerDisp_
diff --git a/csharp/test/Ice/metrics/Server.cs b/csharp/test/Ice/metrics/Server.cs
index c6535448e92..e969f4b8cfa 100644
--- a/csharp/test/Ice/metrics/Server.cs
+++ b/csharp/test/Ice/metrics/Server.cs
@@ -38,11 +38,7 @@ public class Server
{
int status = 0;
Ice.Communicator communicator = null;
-
-#if !COMPACT && !UNITY
Debug.Listeners.Add(new ConsoleTraceListener());
-#endif
-
try
{
Ice.InitializationData initData = new Ice.InitializationData();
@@ -58,7 +54,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/networkProxy/AllTests.cs b/csharp/test/Ice/networkProxy/AllTests.cs
index b840aab1ed6..16f79c7e9b2 100644
--- a/csharp/test/Ice/networkProxy/AllTests.cs
+++ b/csharp/test/Ice/networkProxy/AllTests.cs
@@ -7,29 +7,9 @@
//
// **********************************************************************
-using System;
-using System.Diagnostics;
-using System.Threading;
-
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
public class AllTests : TestCommon.TestApp
{
-#if SILVERLIGHT
- public override Ice.InitializationData initData()
- {
- Ice.InitializationData initData = new Ice.InitializationData();
- initData.properties = Ice.Util.createProperties();
- 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);
diff --git a/csharp/test/Ice/networkProxy/Client.cs b/csharp/test/Ice/networkProxy/Client.cs
index 186dd0bbe3d..b5404ab14b8 100644
--- a/csharp/test/Ice/networkProxy/Client.cs
+++ b/csharp/test/Ice/networkProxy/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -37,7 +36,7 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/networkProxy/Server.cs b/csharp/test/Ice/networkProxy/Server.cs
index f4d03f05490..ca2511d8e43 100644
--- a/csharp/test/Ice/networkProxy/Server.cs
+++ b/csharp/test/Ice/networkProxy/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -50,7 +49,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/objects/AllTests.cs b/csharp/test/Ice/objects/AllTests.cs
index 343d94d9a9e..60202d33e9b 100644
--- a/csharp/test/Ice/objects/AllTests.cs
+++ b/csharp/test/Ice/objects/AllTests.cs
@@ -11,10 +11,6 @@ using System;
using System.Diagnostics;
using Test;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
public class AllTests : TestCommon.TestApp
{
public static Ice.Object MyValueFactory(string type)
@@ -81,20 +77,7 @@ public class AllTests : TestCommon.TestApp
private bool _destroyed;
}
-#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)
-#endif
{
communicator.getValueFactoryManager().add(MyValueFactory, "::Test::B");
communicator.getValueFactoryManager().add(MyValueFactory, "::Test::C");
@@ -339,10 +322,6 @@ public class AllTests : TestCommon.TestApp
WriteLine("ok");
#pragma warning restore 612, 618
-#if SILVERLIGHT
- initial.shutdown();
-#else
return initial;
-#endif
}
}
diff --git a/csharp/test/Ice/objects/Client.cs b/csharp/test/Ice/objects/Client.cs
index 6251c9ec06c..805670012c6 100644
--- a/csharp/test/Ice/objects/Client.cs
+++ b/csharp/test/Ice/objects/Client.cs
@@ -9,7 +9,6 @@
using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -35,20 +34,12 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -60,7 +51,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/objects/Collocated.cs b/csharp/test/Ice/objects/Collocated.cs
index 82bc3dc8064..d401a85e47f 100644
--- a/csharp/test/Ice/objects/Collocated.cs
+++ b/csharp/test/Ice/objects/Collocated.cs
@@ -9,7 +9,6 @@
using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -42,21 +41,12 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "collocated");
-#endif
-
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.WriteLine(ex);
+ Console.WriteLine(ex);
status = 1;
}
@@ -68,7 +58,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.WriteLine(ex);
+ Console.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/objects/Server.cs b/csharp/test/Ice/objects/Server.cs
index 0376c3eb848..494f9c300d1 100644
--- a/csharp/test/Ice/objects/Server.cs
+++ b/csharp/test/Ice/objects/Server.cs
@@ -62,20 +62,12 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "server");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -87,7 +79,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/operations/AllTests.cs b/csharp/test/Ice/operations/AllTests.cs
index f43085870f8..4854f467da5 100644
--- a/csharp/test/Ice/operations/AllTests.cs
+++ b/csharp/test/Ice/operations/AllTests.cs
@@ -7,35 +7,9 @@
//
// **********************************************************************
-using System;
-
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
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");
-
- initData.properties.setProperty("Ice.BatchAutoFlushSize", "100");
- return initData;
- }
-
- override
- public void run(Ice.Communicator communicator)
-#else
public static Test.MyClassPrx allTests(Ice.Communicator communicator)
-#endif
{
Flush();
string rf = "test:default -p 12010";
@@ -77,10 +51,6 @@ public class AllTests : TestCommon.TestApp
BatchOnewaysAMI.batchOneways(cl);
BatchOnewaysAMI.batchOneways(derivedProxy);
WriteLine("ok");
-#if SILVERLIGHT
- cl.shutdown();
-#else
return cl;
-#endif
}
}
diff --git a/csharp/test/Ice/operations/BatchOneways.cs b/csharp/test/Ice/operations/BatchOneways.cs
index 42cf39425db..aae9fedbe09 100644
--- a/csharp/test/Ice/operations/BatchOneways.cs
+++ b/csharp/test/Ice/operations/BatchOneways.cs
@@ -15,7 +15,7 @@ class BatchOneways
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
diff --git a/csharp/test/Ice/operations/BatchOnewaysAMI.cs b/csharp/test/Ice/operations/BatchOnewaysAMI.cs
index 4e8204827de..87615c540ae 100644
--- a/csharp/test/Ice/operations/BatchOnewaysAMI.cs
+++ b/csharp/test/Ice/operations/BatchOnewaysAMI.cs
@@ -16,7 +16,7 @@ class BatchOnewaysAMI
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
diff --git a/csharp/test/Ice/operations/Client.cs b/csharp/test/Ice/operations/Client.cs
index 85dc1cae354..8fd188fbefe 100644
--- a/csharp/test/Ice/operations/Client.cs
+++ b/csharp/test/Ice/operations/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -59,7 +58,7 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/operations/Collocated.cs b/csharp/test/Ice/operations/Collocated.cs
index 3482118f8da..d4c195517b4 100644
--- a/csharp/test/Ice/operations/Collocated.cs
+++ b/csharp/test/Ice/operations/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -29,7 +28,7 @@ public class Collocated
if(prx.ice_getConnection() != null)
{
- throw new System.Exception();
+ throw new Exception();
}
AllTests.allTests(communicator);
@@ -60,7 +59,7 @@ public class Collocated
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/operations/MyDerivedClassAMDI.cs b/csharp/test/Ice/operations/MyDerivedClassAMDI.cs
index d25fe1a15e6..299385cadaf 100644
--- a/csharp/test/Ice/operations/MyDerivedClassAMDI.cs
+++ b/csharp/test/Ice/operations/MyDerivedClassAMDI.cs
@@ -57,7 +57,6 @@ public sealed class MyDerivedClassI : Test.MyDerivedClass
//
// Override the Object "pseudo" operations to verify the operation mode.
//
-
public override bool ice_isA(String id, Ice.Current current)
{
test(current.mode == Ice.OperationMode.Nonmutating);
@@ -96,7 +95,7 @@ public sealed class MyDerivedClassI : Test.MyDerivedClass
public override void delay_async(Test.AMD_MyClass_delay cb, int ms, Ice.Current current)
{
- System.Threading.Thread.Sleep(ms);
+ Thread.Sleep(ms);
cb.ice_response();
}
diff --git a/csharp/test/Ice/operations/MyDerivedClassAMDTieI.cs b/csharp/test/Ice/operations/MyDerivedClassAMDTieI.cs
index b1efecbbc2b..28fde5adf6e 100644
--- a/csharp/test/Ice/operations/MyDerivedClassAMDTieI.cs
+++ b/csharp/test/Ice/operations/MyDerivedClassAMDTieI.cs
@@ -75,7 +75,7 @@ public sealed class MyDerivedClassTieI : Test.MyDerivedClassOperations_
public void delay_async(Test.AMD_MyClass_delay cb, int ms, Ice.Current current)
{
- System.Threading.Thread.Sleep(ms);
+ Thread.Sleep(ms);
cb.ice_response();
}
diff --git a/csharp/test/Ice/operations/OnewaysAMI.cs b/csharp/test/Ice/operations/OnewaysAMI.cs
index 0f40db4649f..d5ad3ecc1fa 100644
--- a/csharp/test/Ice/operations/OnewaysAMI.cs
+++ b/csharp/test/Ice/operations/OnewaysAMI.cs
@@ -10,7 +10,6 @@
using System;
using System.Diagnostics;
using System.Threading;
-using System.Collections.Generic;
public class OnewaysAMI
{
@@ -18,7 +17,7 @@ public class OnewaysAMI
{
if(!b)
{
- throw new System.SystemException();
+ throw new SystemException();
}
}
@@ -35,7 +34,7 @@ public class OnewaysAMI
{
while(!_called)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
_called = false;
}
@@ -47,7 +46,7 @@ public class OnewaysAMI
{
Debug.Assert(!_called);
_called = true;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
@@ -103,7 +102,7 @@ public class OnewaysAMI
p.begin_ice_isA("::Test::MyClass");
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
}
@@ -114,7 +113,7 @@ public class OnewaysAMI
p.begin_ice_id();
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
}
@@ -125,7 +124,7 @@ public class OnewaysAMI
p.begin_ice_ids();
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
}
@@ -199,7 +198,7 @@ public class OnewaysAMI
p.begin_opByte((byte)0xff, (byte)0x0f);
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
}
diff --git a/csharp/test/Ice/operations/Server.cs b/csharp/test/Ice/operations/Server.cs
index 34127bf1415..b59c2a4f9e2 100644
--- a/csharp/test/Ice/operations/Server.cs
+++ b/csharp/test/Ice/operations/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -53,7 +52,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/operations/Twoways.cs b/csharp/test/Ice/operations/Twoways.cs
index 25324cd2ca7..968fc07a835 100644
--- a/csharp/test/Ice/operations/Twoways.cs
+++ b/csharp/test/Ice/operations/Twoways.cs
@@ -17,7 +17,7 @@ class Twoways
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
@@ -1478,7 +1478,7 @@ class Twoways
{
combined.Add(e.Key, e.Value);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
// Ignore.
}
diff --git a/csharp/test/Ice/operations/TwowaysAMI.cs b/csharp/test/Ice/operations/TwowaysAMI.cs
index 3623b00c1ac..22a0016d001 100644
--- a/csharp/test/Ice/operations/TwowaysAMI.cs
+++ b/csharp/test/Ice/operations/TwowaysAMI.cs
@@ -18,7 +18,7 @@ public class TwowaysAMI
{
if(!b)
{
- throw new System.SystemException();
+ throw new SystemException();
}
}
@@ -35,7 +35,7 @@ public class TwowaysAMI
{
while(!_called)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
_called = false;
}
@@ -47,7 +47,7 @@ public class TwowaysAMI
{
Debug.Assert(!_called);
_called = true;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
diff --git a/csharp/test/Ice/optional/AllTests.cs b/csharp/test/Ice/optional/AllTests.cs
index aaedca479e9..a12ee7a7f37 100644
--- a/csharp/test/Ice/optional/AllTests.cs
+++ b/csharp/test/Ice/optional/AllTests.cs
@@ -10,26 +10,9 @@
using System;
using System.Collections.Generic;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
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", "optional,version=1.0.0.0");
- return initData;
- }
-
- override
- public void run(Ice.Communicator communicator)
-#else
public static Test.InitialPrx allTests(Ice.Communicator communicator)
-#endif
{
FactoryI factory = new FactoryI();
communicator.getValueFactoryManager().add(factory.create, "");
@@ -105,10 +88,7 @@ public class AllTests : TestCommon.TestApp
mo1.ioopd.Value.Add(5, Test.OneOptionalPrxHelper.uncheckedCast(communicator.stringToProxy("test")));
mo1.bos = new bool[] { false, true, false };
-
-#if !COMPACT && !SILVERLIGHT
mo1.ser = new Test.SerializableClass(56);
-#endif
test(mo1.a.Value == (byte)15);
test(mo1.b.Value);
@@ -142,10 +122,7 @@ public class AllTests : TestCommon.TestApp
test(mo1.ioopd.Value[5].Equals(Test.OneOptionalPrxHelper.uncheckedCast(communicator.stringToProxy("test"))));
test(ArraysEqual(mo1.bos.Value, new bool[] { false, true, false }));
-
-#if !COMPACT && !SILVERLIGHT
test(mo1.ser.Value.Equals(new Test.SerializableClass(56)));
-#endif
WriteLine("ok");
@@ -192,7 +169,6 @@ public class AllTests : TestCommon.TestApp
test(!mo4.bos.HasValue);
-#if !SILVERLIGHT
test(!mo4.ser.HasValue);
bool supportsCsharpSerializable = initial.supportsCsharpSerializable();
@@ -200,7 +176,6 @@ public class AllTests : TestCommon.TestApp
{
mo1.ser = Ice.Util.None;
}
-#endif
Test.MultiOptional mo5 = (Test.MultiOptional)initial.pingPong(mo1);
test(mo5.a.Value == mo1.a.Value);
@@ -234,13 +209,10 @@ public class AllTests : TestCommon.TestApp
test(mo5.ioopd.Value[5].Equals(Test.OneOptionalPrxHelper.uncheckedCast(communicator.stringToProxy("test"))));
test(ArraysEqual(mo5.bos.Value, new bool[] { false, true, false }));
-
-#if !COMPACT && !SILVERLIGHT
if(supportsCsharpSerializable)
{
test(mo5.ser.Value.Equals(new Test.SerializableClass(56)));
}
-#endif
// Clear the first half of the optional members
Test.MultiOptional mo6 = new Test.MultiOptional();
@@ -292,10 +264,7 @@ public class AllTests : TestCommon.TestApp
test(!mo7.ioopd.HasValue);
test(ArraysEqual(mo7.bos.Value, new bool[] { false, true, false }));
-
-#if !SILVERLIGHT
test(!mo7.ser.HasValue);
-#endif
// Clear the second half of the optional members
Test.MultiOptional mo8 = new Test.MultiOptional();
@@ -316,13 +285,10 @@ public class AllTests : TestCommon.TestApp
mo8.ied = mo5.ied;
mo8.ivsd = mo5.ivsd;
mo8.ioopd = mo5.ioopd;
-
-#if !COMPACT && !SILVERLIGHT
if(supportsCsharpSerializable)
{
mo8.ser = new Test.SerializableClass(56);
}
-#endif
Test.MultiOptional mo9 = (Test.MultiOptional)initial.pingPong(mo8);
test(mo9.a.Equals(mo1.a));
@@ -357,13 +323,10 @@ public class AllTests : TestCommon.TestApp
test(mo9.ioopd.Value[5].Equals(Test.OneOptionalPrxHelper.uncheckedCast(communicator.stringToProxy("test"))));
test(!mo9.bos.HasValue);
-
-#if !COMPACT && !SILVERLIGHT
if(supportsCsharpSerializable)
{
test(mo9.ser.Value.Equals(new Test.SerializableClass(56)));
}
-#endif
{
Test.OptionalWithCustom owc1 = new Test.OptionalWithCustom();
@@ -1950,7 +1913,6 @@ public class AllTests : TestCommon.TestApp
@in.endEncapsulation();
}
-#if !COMPACT && !SILVERLIGHT
if(supportsCsharpSerializable)
{
Ice.Optional<Test.SerializableClass> p1 = new Ice.Optional<Test.SerializableClass>();
@@ -1996,7 +1958,6 @@ public class AllTests : TestCommon.TestApp
@in.startEncapsulation();
@in.endEncapsulation();
}
-#endif
{
Ice.Optional<Dictionary<int, int>> p1 = new Ice.Optional<Dictionary<int, int>>();
@@ -2240,12 +2201,7 @@ public class AllTests : TestCommon.TestApp
}
}
WriteLine("ok");
-
-#if SILVERLIGHT
- initial.shutdown();
-#else
return initial;
-#endif
}
internal static bool ArraysEqual<T>(T[] a1, T[] a2)
diff --git a/csharp/test/Ice/optional/Client.cs b/csharp/test/Ice/optional/Client.cs
index 9fa2fd09390..dbf94133fb2 100644
--- a/csharp/test/Ice/optional/Client.cs
+++ b/csharp/test/Ice/optional/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -36,14 +35,6 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
diff --git a/csharp/test/Ice/optional/SerializableClass.cs b/csharp/test/Ice/optional/SerializableClass.cs
index f8b2bae65df..541030b4a00 100644
--- a/csharp/test/Ice/optional/SerializableClass.cs
+++ b/csharp/test/Ice/optional/SerializableClass.cs
@@ -7,8 +7,6 @@
//
// **********************************************************************
-#if !SILVERLIGHT
-
using System;
[assembly: CLSCompliant(true)]
@@ -43,5 +41,3 @@ public class SerializableClass
}
}
-
-#endif
diff --git a/csharp/test/Ice/optional/Server.cs b/csharp/test/Ice/optional/Server.cs
index e8ddcd05f75..b4900b7e07a 100644
--- a/csharp/test/Ice/optional/Server.cs
+++ b/csharp/test/Ice/optional/Server.cs
@@ -38,18 +38,10 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "server");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/optional/ServerAMD.cs b/csharp/test/Ice/optional/ServerAMD.cs
index 7fddcf2a226..d23b4060462 100644
--- a/csharp/test/Ice/optional/ServerAMD.cs
+++ b/csharp/test/Ice/optional/ServerAMD.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -38,18 +37,10 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "serveramd");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/optional/TestAMDI.cs b/csharp/test/Ice/optional/TestAMDI.cs
index 05475175e1e..ee4d1711bd5 100644
--- a/csharp/test/Ice/optional/TestAMDI.cs
+++ b/csharp/test/Ice/optional/TestAMDI.cs
@@ -208,21 +208,12 @@ public class InitialI : Test.Initial
cb.ice_response(p1, p1);
}
-#if COMPACT || SILVERLIGHT
- public override void opSerializable_async(Test.AMD_Initial_opSerializable cb,
- Ice.Optional<byte[]> p1,
- Ice.Current current)
- {
- cb.ice_response(p1, p1);
- }
-#else
public override void opSerializable_async(Test.AMD_Initial_opSerializable cb,
Ice.Optional<Test.SerializableClass> p1,
Ice.Current current)
{
cb.ice_response(p1, p1);
}
-#endif
public override void opIntIntDict_async(Test.AMD_Initial_opIntIntDict cb, Ice.Optional<Dictionary<int, int>> p1,
Ice.Current current)
@@ -279,11 +270,7 @@ public class InitialI : Test.Initial
public override void supportsCsharpSerializable_async(Test.AMD_Initial_supportsCsharpSerializable cb,
Ice.Current current)
{
-#if COMPACT || SILVERLIGHT
- cb.ice_response(false);
-#else
cb.ice_response(true);
-#endif
}
public override void supportsCppStringView_async(Test.AMD_Initial_supportsCppStringView cb,
diff --git a/csharp/test/Ice/optional/TestI.cs b/csharp/test/Ice/optional/TestI.cs
index 13b3d59e8e1..f78033db60a 100644
--- a/csharp/test/Ice/optional/TestI.cs
+++ b/csharp/test/Ice/optional/TestI.cs
@@ -246,14 +246,6 @@ public class InitialI : Test.Initial
return p1;
}
-#if COMPACT || SILVERLIGHT
- public override Ice.Optional<byte[]> opSerializable(Ice.Optional<byte[]> p1, out Ice.Optional<byte[]> p3,
- Ice.Current current)
- {
- p3 = p1;
- return p1;
- }
-#else
public override Ice.Optional<Test.SerializableClass> opSerializable(Ice.Optional<Test.SerializableClass> p1,
out Ice.Optional<Test.SerializableClass> p3,
Ice.Current current)
@@ -261,7 +253,6 @@ public class InitialI : Test.Initial
p3 = p1;
return p1;
}
-#endif
public override Ice.Optional<Dictionary<int, int>> opIntIntDict(Ice.Optional<Dictionary<int, int>> p1,
out Ice.Optional<Dictionary<int, int>> p3,
@@ -313,11 +304,7 @@ public class InitialI : Test.Initial
public override bool supportsCsharpSerializable(Ice.Current current)
{
-#if COMPACT || SILVERLIGHT
- return false;
-#else
return true;
-#endif
}
public override bool supportsCppStringView(Ice.Current current)
diff --git a/csharp/test/Ice/plugin/BasePlugin.cs b/csharp/test/Ice/plugin/BasePlugin.cs
index 9ce2ee90f34..08c20561d14 100644
--- a/csharp/test/Ice/plugin/BasePlugin.cs
+++ b/csharp/test/Ice/plugin/BasePlugin.cs
@@ -7,8 +7,6 @@
//
// **********************************************************************
-using Ice;
-
public abstract class BasePlugin : Ice.Plugin
{
public BasePlugin(Ice.Communicator communicator)
diff --git a/csharp/test/Ice/plugin/BasePluginFail.cs b/csharp/test/Ice/plugin/BasePluginFail.cs
index 68cd830ca25..9406a6ea870 100644
--- a/csharp/test/Ice/plugin/BasePluginFail.cs
+++ b/csharp/test/Ice/plugin/BasePluginFail.cs
@@ -7,8 +7,6 @@
//
// **********************************************************************
-using Ice;
-
public abstract class BasePluginFail : Ice.Plugin
{
public BasePluginFail(Ice.Communicator communicator)
diff --git a/csharp/test/Ice/plugin/Client.cs b/csharp/test/Ice/plugin/Client.cs
index 0f58da23789..7e281d967bb 100644
--- a/csharp/test/Ice/plugin/Client.cs
+++ b/csharp/test/Ice/plugin/Client.cs
@@ -8,9 +8,7 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
-using Ice;
[assembly: CLSCompliant(true)]
@@ -24,7 +22,7 @@ public class Client
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
diff --git a/csharp/test/Ice/properties/Client.cs b/csharp/test/Ice/properties/Client.cs
index 6c99535b9f4..1ec20a77e75 100644
--- a/csharp/test/Ice/properties/Client.cs
+++ b/csharp/test/Ice/properties/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -23,7 +22,7 @@ public class Client
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
@@ -62,9 +61,9 @@ public class Client
c.main(args, "./config/中国_client.config");
Console.Out.WriteLine("ok");
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -82,9 +81,9 @@ public class Client
test(properties.getProperty("Config3").Equals("Config3"));
Console.Out.WriteLine("ok");
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -124,9 +123,9 @@ public class Client
}
Console.Out.WriteLine("ok");
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
diff --git a/csharp/test/Ice/proxy/AllTests.cs b/csharp/test/Ice/proxy/AllTests.cs
index 5179773cb04..0c4764650bd 100644
--- a/csharp/test/Ice/proxy/AllTests.cs
+++ b/csharp/test/Ice/proxy/AllTests.cs
@@ -9,20 +9,10 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
-
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
public class AllTests : TestCommon.TestApp
{
-#if SILVERLIGHT
- override
- public void run(Ice.Communicator communicator)
-#else
public static Test.MyClassPrx allTests(Ice.Communicator communicator)
-#endif
{
Write("testing stringToProxy... ");
Flush();
@@ -295,7 +285,7 @@ public class AllTests : TestCommon.TestApp
}
catch(Exception ex)
{
- System.Console.WriteLine(ex.ToString());
+ Console.WriteLine(ex.ToString());
}
property = propertyPrefix + ".LocatorCacheTimeout";
test(b1.ice_getLocatorCacheTimeout() == -1);
@@ -481,7 +471,7 @@ public class AllTests : TestCommon.TestApp
baseProxy.ice_timeout(0);
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
@@ -489,7 +479,7 @@ public class AllTests : TestCommon.TestApp
{
baseProxy.ice_timeout(-1);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
test(false);
}
@@ -499,7 +489,7 @@ public class AllTests : TestCommon.TestApp
baseProxy.ice_timeout(-2);
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
@@ -508,7 +498,7 @@ public class AllTests : TestCommon.TestApp
baseProxy.ice_invocationTimeout(0);
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
@@ -517,7 +507,7 @@ public class AllTests : TestCommon.TestApp
baseProxy.ice_invocationTimeout(-1);
baseProxy.ice_invocationTimeout(-2);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
test(false);
}
@@ -527,7 +517,7 @@ public class AllTests : TestCommon.TestApp
baseProxy.ice_invocationTimeout(-3);
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
@@ -535,7 +525,7 @@ public class AllTests : TestCommon.TestApp
{
baseProxy.ice_locatorCacheTimeout(0);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
test(false);
}
@@ -544,7 +534,7 @@ public class AllTests : TestCommon.TestApp
{
baseProxy.ice_locatorCacheTimeout(-1);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
test(false);
}
@@ -554,7 +544,7 @@ public class AllTests : TestCommon.TestApp
baseProxy.ice_locatorCacheTimeout(-2);
test(false);
}
- catch(System.ArgumentException)
+ catch(ArgumentException)
{
}
@@ -931,10 +921,6 @@ public class AllTests : TestCommon.TestApp
}
WriteLine("ok");
-#if SILVERLIGHT
- cl.shutdown();
-#else
return cl;
-#endif
}
}
diff --git a/csharp/test/Ice/proxy/Client.cs b/csharp/test/Ice/proxy/Client.cs
index 185315c1b5a..187f95e9c4f 100644
--- a/csharp/test/Ice/proxy/Client.cs
+++ b/csharp/test/Ice/proxy/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -22,9 +21,7 @@ public class Client
private static int run(String[] args, Ice.Communicator communicator)
{
Test.MyClassPrx myClass = AllTests.allTests(communicator);
-
myClass.shutdown();
-
return 0;
}
@@ -41,7 +38,7 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/proxy/Collocated.cs b/csharp/test/Ice/proxy/Collocated.cs
index 4903db6532d..c161aa41a24 100644
--- a/csharp/test/Ice/proxy/Collocated.cs
+++ b/csharp/test/Ice/proxy/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -47,7 +46,7 @@ public class Collocated
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/proxy/MyDerivedClassAMDI.cs b/csharp/test/Ice/proxy/MyDerivedClassAMDI.cs
index c9c76203089..db1eece2fd0 100644
--- a/csharp/test/Ice/proxy/MyDerivedClassAMDI.cs
+++ b/csharp/test/Ice/proxy/MyDerivedClassAMDI.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-using System;
using System.Collections.Generic;
public sealed class MyDerivedClassI : Test.MyDerivedClass
diff --git a/csharp/test/Ice/proxy/MyDerivedClassI.cs b/csharp/test/Ice/proxy/MyDerivedClassI.cs
index 395c0065e98..7a5a3fc5c6f 100644
--- a/csharp/test/Ice/proxy/MyDerivedClassI.cs
+++ b/csharp/test/Ice/proxy/MyDerivedClassI.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-using System;
using System.Collections.Generic;
public sealed class MyDerivedClassI : Test.MyDerivedClass
diff --git a/csharp/test/Ice/proxy/Server.cs b/csharp/test/Ice/proxy/Server.cs
index c67d61b117a..7015c9de392 100644
--- a/csharp/test/Ice/proxy/Server.cs
+++ b/csharp/test/Ice/proxy/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -48,7 +47,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/retry/AllTests.cs b/csharp/test/Ice/retry/AllTests.cs
index 8f0b43ed9c5..bc356c6c843 100644
--- a/csharp/test/Ice/retry/AllTests.cs
+++ b/csharp/test/Ice/retry/AllTests.cs
@@ -11,10 +11,6 @@ using System;
using System.Diagnostics;
using System.Threading;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
public class AllTests : TestCommon.TestApp
{
private class Callback
@@ -30,7 +26,7 @@ public class AllTests : TestCommon.TestApp
{
while(!_called)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
_called = false;
@@ -43,54 +39,14 @@ public class AllTests : TestCommon.TestApp
{
Debug.Assert(!_called);
_called = true;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
private bool _called;
}
-#if SILVERLIGHT
- public override Ice.InitializationData initData()
- {
- Ice.InitializationData initData = new Ice.InitializationData();
- initData.properties = Ice.Util.createProperties();
- initData.observer = Instrumentation.getObserver();
-
- initData.properties.setProperty("Ice.RetryIntervals", "0 1 10 1");
-
- //
- // This test kills connections, so we don't want warnings.
- //
- initData.properties.setProperty("Ice.Warn.Connections", "0");
- return initData;
- }
-
- public override void run(Ice.Communicator communicator)
- {
- //
- // Configure a second communicator for the invocation timeout
- // + retry test, we need to configure a large retry interval
- // to avoid time-sensitive failures.
- //
- Ice.InitializationData initData2 = new Ice.InitializationData();
- initData2.properties = communicator.getProperties().ice_clone_();
- initData2.properties.setProperty("Ice.RetryIntervals", "0 1 10000");
- initData2.observer = Instrumentation.getObserver();
- Ice.Communicator communicator2 = Ice.Util.initialize(initData2);
- try
- {
- allTests(communicator, communicator2, "retry:default -p 12010");
- }
- finally
- {
- communicator2.destroy();
- }
- }
- public void
-#else
static public Test.RetryPrx
-#endif
allTests(Ice.Communicator communicator, Ice.Communicator communicator2, string rf)
{
Write("testing stringToProxy... ");
@@ -292,11 +248,6 @@ public class AllTests : TestCommon.TestApp
Instrumentation.testRetryCount(-1);
}
WriteLine("ok");
-
-#if SILVERLIGHT
- retry1.shutdown();
-#else
return retry1;
-#endif
}
}
diff --git a/csharp/test/Ice/retry/Client.cs b/csharp/test/Ice/retry/Client.cs
index a3420fb4f64..db792e0c336 100644
--- a/csharp/test/Ice/retry/Client.cs
+++ b/csharp/test/Ice/retry/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -60,7 +59,7 @@ public class Client
status = run(args, communicator, communicator2);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/retry/Collocated.cs b/csharp/test/Ice/retry/Collocated.cs
index 34400d16aab..6791089ceef 100644
--- a/csharp/test/Ice/retry/Collocated.cs
+++ b/csharp/test/Ice/retry/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -70,7 +69,7 @@ public class Collocated
status = run(args, communicator, communicator2);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/retry/RetryI.cs b/csharp/test/Ice/retry/RetryI.cs
index f4d87288dc9..d7370c7edaa 100644
--- a/csharp/test/Ice/retry/RetryI.cs
+++ b/csharp/test/Ice/retry/RetryI.cs
@@ -7,8 +7,6 @@
//
// **********************************************************************
-using System;
-
public sealed class RetryI : Test.RetryDisp_
{
public RetryI()
diff --git a/csharp/test/Ice/retry/Server.cs b/csharp/test/Ice/retry/Server.cs
index be9abcb05e6..5e2ef77792f 100644
--- a/csharp/test/Ice/retry/Server.cs
+++ b/csharp/test/Ice/retry/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -43,7 +42,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/retry/SystemFailure.cs b/csharp/test/Ice/retry/SystemFailure.cs
index e9503e98028..4893b7f4f66 100644
--- a/csharp/test/Ice/retry/SystemFailure.cs
+++ b/csharp/test/Ice/retry/SystemFailure.cs
@@ -7,8 +7,7 @@
//
// **********************************************************************
-using System;
-
+[System.Serializable]
public class SystemFailure : Ice.SystemException
{
public override string
diff --git a/csharp/test/Ice/seqMapping/AllTests.cs b/csharp/test/Ice/seqMapping/AllTests.cs
index 34f5960cbcd..cabf73185b6 100644
--- a/csharp/test/Ice/seqMapping/AllTests.cs
+++ b/csharp/test/Ice/seqMapping/AllTests.cs
@@ -7,32 +7,10 @@
//
// **********************************************************************
-using System;
-
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
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
{
-#if SILVERLIGHT
- bool collocated = false;
-#endif
Flush();
string rf = "test:default -p 12010";
Ice.ObjectPrx baseProxy = communicator.stringToProxy(rf);
@@ -50,10 +28,6 @@ public class AllTests : TestCommon.TestApp
TwowaysAMI.twowaysAMI(communicator, cl);
WriteLine("ok");
}
-#if SILVERLIGHT
- cl.shutdown();
-#else
return cl;
-#endif
}
}
diff --git a/csharp/test/Ice/seqMapping/Client.cs b/csharp/test/Ice/seqMapping/Client.cs
index d11950a3ce2..2b99829d7eb 100644
--- a/csharp/test/Ice/seqMapping/Client.cs
+++ b/csharp/test/Ice/seqMapping/Client.cs
@@ -38,18 +38,10 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
@@ -67,7 +59,6 @@ public class Client
status = 1;
}
}
-
return status;
}
}
diff --git a/csharp/test/Ice/seqMapping/Collocated.cs b/csharp/test/Ice/seqMapping/Collocated.cs
index c1aec283894..383d149ece2 100644
--- a/csharp/test/Ice/seqMapping/Collocated.cs
+++ b/csharp/test/Ice/seqMapping/Collocated.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -39,18 +38,10 @@ public class Collocated
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "collocated");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/seqMapping/Custom.cs b/csharp/test/Ice/seqMapping/Custom.cs
index aeb7e40042a..10428afb08e 100644
--- a/csharp/test/Ice/seqMapping/Custom.cs
+++ b/csharp/test/Ice/seqMapping/Custom.cs
@@ -9,7 +9,6 @@
using System;
using System.Collections.Generic;
-using Test;
public class Custom<T> : IEnumerable<T>
{
@@ -79,7 +78,7 @@ public class Custom<T> : IEnumerable<T>
}
return true;
}
- catch(System.Exception)
+ catch(Exception)
{
return false;
}
diff --git a/csharp/test/Ice/seqMapping/MyClassAMDI.cs b/csharp/test/Ice/seqMapping/MyClassAMDI.cs
index aaafa5a2603..3c6d1f4c0ac 100644
--- a/csharp/test/Ice/seqMapping/MyClassAMDI.cs
+++ b/csharp/test/Ice/seqMapping/MyClassAMDI.cs
@@ -44,11 +44,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCByteS_async(AMD_MyClass_opCByteS cb, CByteS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opABoolS_async(AMD_MyClass_opABoolS cb, bool[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -74,11 +69,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCBoolS_async(AMD_MyClass_opCBoolS cb, CBoolS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAShortS_async(AMD_MyClass_opAShortS cb, short[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -104,11 +94,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCShortS_async(AMD_MyClass_opCShortS cb, CShortS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAIntS_async(AMD_MyClass_opAIntS cb, int[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -134,11 +119,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCIntS_async(AMD_MyClass_opCIntS cb, CIntS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opALongS_async(AMD_MyClass_opALongS cb, long[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -164,11 +144,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCLongS_async(AMD_MyClass_opCLongS cb, CLongS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAFloatS_async(AMD_MyClass_opAFloatS cb, float[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -194,11 +169,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCFloatS_async(AMD_MyClass_opCFloatS cb, CFloatS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opADoubleS_async(AMD_MyClass_opADoubleS cb, double[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -224,11 +194,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCDoubleS_async(AMD_MyClass_opCDoubleS cb, CDoubleS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAStringS_async(AMD_MyClass_opAStringS cb, string[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -254,11 +219,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCStringS_async(AMD_MyClass_opCStringS cb, CStringS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAObjectS_async(AMD_MyClass_opAObjectS cb, Ice.Object[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -269,11 +229,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCObjectS_async(AMD_MyClass_opCObjectS cb, CObjectS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAObjectPrxS_async(AMD_MyClass_opAObjectPrxS cb, Ice.ObjectPrx[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -299,11 +254,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCObjectPrxS_async(AMD_MyClass_opCObjectPrxS cb, CObjectPrxS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAStructS_async(AMD_MyClass_opAStructS cb, S[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -329,11 +279,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCStructS_async(AMD_MyClass_opCStructS cb, CStructS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAStructSD_async(AMD_MyClass_opAStructSD cb, SD[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -359,11 +304,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCStructSD_async(AMD_MyClass_opCStructSD cb, CStructSD i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opACVS_async(AMD_MyClass_opACVS cb, CV[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -374,11 +314,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCCVS_async(AMD_MyClass_opCCVS cb, CCVS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opACVPrxS_async(AMD_MyClass_opACVPrxS cb, CVPrx[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -404,11 +339,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCCVPrxS_async(AMD_MyClass_opCCVPrxS cb, CCVPrxS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opACRS_async(AMD_MyClass_opACRS cb, CR[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -419,11 +349,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCCRS_async(AMD_MyClass_opCCRS cb, CCRS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opAEnS_async(AMD_MyClass_opAEnS cb, En[] i, Ice.Current current)
{
cb.ice_response(i, i);
@@ -449,11 +374,6 @@ public sealed class MyClassI : MyClass
cb.ice_response(i, i);
}
- public override void opCEnS_async(AMD_MyClass_opCEnS cb, CEnS i, Ice.Current current)
- {
- cb.ice_response(i, i);
- }
-
public override void opCustomIntS_async(AMD_MyClass_opCustomIntS cb, Custom<int> i, Ice.Current current)
{
cb.ice_response(i, i);
diff --git a/csharp/test/Ice/seqMapping/MyClassI.cs b/csharp/test/Ice/seqMapping/MyClassI.cs
index d5003b24f93..37ef1b94732 100644
--- a/csharp/test/Ice/seqMapping/MyClassI.cs
+++ b/csharp/test/Ice/seqMapping/MyClassI.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-using System;
using System.Collections.Generic;
using Test;
@@ -48,12 +47,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CByteS opCByteS(CByteS i, out CByteS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override bool[] opABoolS(bool[] i, out bool[] o, Ice.Current current)
{
o = i;
@@ -84,12 +77,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CBoolS opCBoolS(CBoolS i, out CBoolS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override short[] opAShortS(short[] i, out short[] o, Ice.Current current)
{
o = i;
@@ -120,12 +107,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CShortS opCShortS(CShortS i, out CShortS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override int[] opAIntS(int[] i, out int[] o, Ice.Current current)
{
o = i;
@@ -156,12 +137,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CIntS opCIntS(CIntS i, out CIntS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override long[] opALongS(long[] i, out long[] o, Ice.Current current)
{
o = i;
@@ -192,12 +167,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CLongS opCLongS(CLongS i, out CLongS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override float[] opAFloatS(float[] i, out float[] o, Ice.Current current)
{
o = i;
@@ -228,12 +197,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CFloatS opCFloatS(CFloatS i, out CFloatS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override double[] opADoubleS(double[] i, out double[] o, Ice.Current current)
{
o = i;
@@ -264,12 +227,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CDoubleS opCDoubleS(CDoubleS i, out CDoubleS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override string[] opAStringS(string[] i, out string[] o, Ice.Current current)
{
o = i;
@@ -300,12 +257,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CStringS opCStringS(CStringS i, out CStringS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override Ice.Object[] opAObjectS(Ice.Object[] i, out Ice.Object[] o, Ice.Current current)
{
o = i;
@@ -318,12 +269,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CObjectS opCObjectS(CObjectS i, out CObjectS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override Ice.ObjectPrx[] opAObjectPrxS(Ice.ObjectPrx[] i, out Ice.ObjectPrx[] o, Ice.Current current)
{
o = i;
@@ -354,12 +299,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CObjectPrxS opCObjectPrxS(CObjectPrxS i, out CObjectPrxS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override S[] opAStructS(S[] i, out S[] o, Ice.Current current)
{
o = i;
@@ -390,12 +329,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CStructS opCStructS(CStructS i, out CStructS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override SD[] opAStructSD(SD[] i, out SD[] o, Ice.Current current)
{
o = i;
@@ -426,12 +359,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CStructSD opCStructSD(CStructSD i, out CStructSD o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override CV[] opACVS(CV[] i, out CV[] o, Ice.Current current)
{
o = i;
@@ -444,12 +371,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CCVS opCCVS(CCVS i, out CCVS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override CR[] opACRS(CR[] i, out CR[] o, Ice.Current current)
{
o = i;
@@ -462,12 +383,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CCRS opCCRS(CCRS i, out CCRS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override En[] opAEnS(En[] i, out En[] o, Ice.Current current)
{
o = i;
@@ -498,12 +413,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CEnS opCEnS(CEnS i, out CEnS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override CVPrx[] opACVPrxS(CVPrx[] i, out CVPrx[] o, Ice.Current current)
{
o = i;
@@ -534,12 +443,6 @@ public sealed class MyClassI : Test.MyClass
return i;
}
- public override CCVPrxS opCCVPrxS(CCVPrxS i, out CCVPrxS o, Ice.Current current)
- {
- o = i;
- return i;
- }
-
public override Custom<int> opCustomIntS(Custom<int> i, out Custom<int> o, Ice.Current current)
{
o = i;
diff --git a/csharp/test/Ice/seqMapping/Serializable.cs b/csharp/test/Ice/seqMapping/Serializable.cs
index 2164e365287..81b18727017 100644
--- a/csharp/test/Ice/seqMapping/Serializable.cs
+++ b/csharp/test/Ice/seqMapping/Serializable.cs
@@ -6,7 +6,7 @@
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************
-#if !SILVERLIGHT
+
using System;
[assembly: CLSCompliant(true)]
@@ -45,4 +45,3 @@ public class Struct // Used to test that null members marshal correctly.
}
}
-#endif
diff --git a/csharp/test/Ice/seqMapping/Server.cs b/csharp/test/Ice/seqMapping/Server.cs
index cee2c54bffe..cae559bf0c9 100644
--- a/csharp/test/Ice/seqMapping/Server.cs
+++ b/csharp/test/Ice/seqMapping/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -38,18 +37,10 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "server");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/seqMapping/ServerAMD.cs b/csharp/test/Ice/seqMapping/ServerAMD.cs
index d6f37723d75..cae559bf0c9 100644
--- a/csharp/test/Ice/seqMapping/ServerAMD.cs
+++ b/csharp/test/Ice/seqMapping/ServerAMD.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -38,18 +37,10 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "serveramd");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/seqMapping/Test.ice b/csharp/test/Ice/seqMapping/Test.ice
index 019f67c9078..0846e0b6093 100644
--- a/csharp/test/Ice/seqMapping/Test.ice
+++ b/csharp/test/Ice/seqMapping/Test.ice
@@ -17,67 +17,57 @@ sequence<byte> AByteS;
["clr:generic:LinkedList"] sequence<byte> KByteS;
["clr:generic:Queue"] sequence<byte> QByteS;
["clr:generic:Stack"] sequence<byte> SByteS;
-["clr:collection"] sequence<byte> CByteS;
sequence<bool> ABoolS;
["clr:generic:List"] sequence<bool> LBoolS;
["clr:generic:LinkedList"] sequence<bool> KBoolS;
["clr:generic:Queue"] sequence<bool> QBoolS;
["clr:generic:Stack"] sequence<bool> SBoolS;
-["clr:collection"] sequence<bool> CBoolS;
sequence<short> AShortS;
["clr:generic:List"] sequence<short> LShortS;
["clr:generic:LinkedList"] sequence<short> KShortS;
["clr:generic:Queue"] sequence<short> QShortS;
["clr:generic:Stack"] sequence<short> SShortS;
-["clr:collection"] sequence<short> CShortS;
sequence<int> AIntS;
["clr:generic:List"] sequence<int> LIntS;
["clr:generic:LinkedList"] sequence<int> KIntS;
["clr:generic:Queue"] sequence<int> QIntS;
["clr:generic:Stack"] sequence<int> SIntS;
-["clr:collection"] sequence<int> CIntS;
sequence<long> ALongS;
["clr:generic:List"] sequence<long> LLongS;
["clr:generic:LinkedList"] sequence<long> KLongS;
["clr:generic:Queue"] sequence<long> QLongS;
["clr:generic:Stack"] sequence<long> SLongS;
-["clr:collection"] sequence<long> CLongS;
sequence<float> AFloatS;
["clr:generic:List"] sequence<float> LFloatS;
["clr:generic:LinkedList"] sequence<float> KFloatS;
["clr:generic:Queue"] sequence<float> QFloatS;
["clr:generic:Stack"] sequence<float> SFloatS;
-["clr:collection"] sequence<float> CFloatS;
sequence<double> ADoubleS;
["clr:generic:List"] sequence<double> LDoubleS;
["clr:generic:LinkedList"] sequence<double> KDoubleS;
["clr:generic:Queue"] sequence<double> QDoubleS;
["clr:generic:Stack"] sequence<double> SDoubleS;
-["clr:collection"] sequence<double> CDoubleS;
sequence<string> AStringS;
["clr:generic:List"] sequence<string> LStringS;
["clr:generic:LinkedList"] sequence<string> KStringS;
["clr:generic:Queue"] sequence<string> QStringS;
["clr:generic:Stack"] sequence<string> SStringS;
-["clr:collection"] sequence<string> CStringS;
sequence<Object> AObjectS;
["clr:generic:List"] sequence<Object> LObjectS;
-["clr:collection"] sequence<Object> CObjectS;
sequence<Object*> AObjectPrxS;
["clr:generic:List"] sequence<Object*> LObjectPrxS;
["clr:generic:LinkedList"] sequence<Object*> KObjectPrxS;
["clr:generic:Queue"] sequence<Object*> QObjectPrxS;
["clr:generic:Stack"] sequence<Object*> SObjectPrxS;
-["clr:collection"] sequence<Object*> CObjectPrxS;
struct S
{
@@ -89,7 +79,6 @@ sequence<S> AStructS;
["clr:generic:LinkedList"] sequence<S> KStructS;
["clr:generic:Queue"] sequence<S> QStructS;
["clr:generic:Stack"] sequence<S> SStructS;
-["clr:collection"] sequence<S> CStructS;
struct SD
{
@@ -101,7 +90,6 @@ sequence<SD> AStructSD;
["clr:generic:LinkedList"] sequence<SD> KStructSD;
["clr:generic:Queue"] sequence<SD> QStructSD;
["clr:generic:Stack"] sequence<SD> SStructSD;
-["clr:collection"] sequence<SD> CStructSD;
class CV
{
@@ -110,14 +98,12 @@ class CV
sequence<CV> ACVS;
["clr:generic:List"] sequence<CV> LCVS;
-["clr:collection"] sequence<CV> CCVS;
sequence<CV*> ACVPrxS;
["clr:generic:List"] sequence<CV*> LCVPrxS;
["clr:generic:LinkedList"] sequence<CV*> KCVPrxS;
["clr:generic:Queue"] sequence<CV*> QCVPrxS;
["clr:generic:Stack"] sequence<CV*> SCVPrxS;
-["clr:collection"] sequence<CV*> CCVPrxS;
class CR
{
@@ -126,7 +112,6 @@ class CR
sequence<CR> ACRS;
["clr:generic:List"] sequence<CR> LCRS;
-["clr:collection"] sequence<CR> CCRS;
enum En { A, B, C };
@@ -135,7 +120,6 @@ sequence<En> AEnS;
["clr:generic:LinkedList"] sequence<En> KEnS;
["clr:generic:Queue"] sequence<En> QEnS;
["clr:generic:Stack"] sequence<En> SEnS;
-["clr:collection"] sequence<En> CEnS;
["clr:generic:Custom"] sequence<int> CustomIntS;
["clr:generic:Custom"] sequence<CV> CustomCVS;
@@ -143,11 +127,9 @@ 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
class MyClass
{
@@ -158,120 +140,100 @@ class MyClass
KByteS opKByteS(KByteS i, out KByteS o);
QByteS opQByteS(QByteS i, out QByteS o);
SByteS opSByteS(SByteS i, out SByteS o);
- CByteS opCByteS(CByteS i, out CByteS o);
ABoolS opABoolS(ABoolS i, out ABoolS o);
LBoolS opLBoolS(LBoolS i, out LBoolS o);
KBoolS opKBoolS(KBoolS i, out KBoolS o);
QBoolS opQBoolS(QBoolS i, out QBoolS o);
SBoolS opSBoolS(SBoolS i, out SBoolS o);
- CBoolS opCBoolS(CBoolS i, out CBoolS o);
AShortS opAShortS(AShortS i, out AShortS o);
LShortS opLShortS(LShortS i, out LShortS o);
KShortS opKShortS(KShortS i, out KShortS o);
QShortS opQShortS(QShortS i, out QShortS o);
SShortS opSShortS(SShortS i, out SShortS o);
- CShortS opCShortS(CShortS i, out CShortS o);
AIntS opAIntS(AIntS i, out AIntS o);
LIntS opLIntS(LIntS i, out LIntS o);
KIntS opKIntS(KIntS i, out KIntS o);
QIntS opQIntS(QIntS i, out QIntS o);
SIntS opSIntS(SIntS i, out SIntS o);
- CIntS opCIntS(CIntS i, out CIntS o);
ALongS opALongS(ALongS i, out ALongS o);
LLongS opLLongS(LLongS i, out LLongS o);
KLongS opKLongS(KLongS i, out KLongS o);
QLongS opQLongS(QLongS i, out QLongS o);
SLongS opSLongS(SLongS i, out SLongS o);
- CLongS opCLongS(CLongS i, out CLongS o);
AFloatS opAFloatS(AFloatS i, out AFloatS o);
LFloatS opLFloatS(LFloatS i, out LFloatS o);
KFloatS opKFloatS(KFloatS i, out KFloatS o);
QFloatS opQFloatS(QFloatS i, out QFloatS o);
SFloatS opSFloatS(SFloatS i, out SFloatS o);
- CFloatS opCFloatS(CFloatS i, out CFloatS o);
ADoubleS opADoubleS(ADoubleS i, out ADoubleS o);
LDoubleS opLDoubleS(LDoubleS i, out LDoubleS o);
KDoubleS opKDoubleS(KDoubleS i, out KDoubleS o);
QDoubleS opQDoubleS(QDoubleS i, out QDoubleS o);
SDoubleS opSDoubleS(SDoubleS i, out SDoubleS o);
- CDoubleS opCDoubleS(CDoubleS i, out CDoubleS o);
AStringS opAStringS(AStringS i, out AStringS o);
LStringS opLStringS(LStringS i, out LStringS o);
KStringS opKStringS(KStringS i, out KStringS o);
QStringS opQStringS(QStringS i, out QStringS o);
SStringS opSStringS(SStringS i, out SStringS o);
- CStringS opCStringS(CStringS i, out CStringS o);
AObjectS opAObjectS(AObjectS i, out AObjectS o);
LObjectS opLObjectS(LObjectS i, out LObjectS o);
- CObjectS opCObjectS(CObjectS i, out CObjectS o);
AObjectPrxS opAObjectPrxS(AObjectPrxS i, out AObjectPrxS o);
LObjectPrxS opLObjectPrxS(LObjectPrxS i, out LObjectPrxS o);
KObjectPrxS opKObjectPrxS(KObjectPrxS i, out KObjectPrxS o);
QObjectPrxS opQObjectPrxS(QObjectPrxS i, out QObjectPrxS o);
SObjectPrxS opSObjectPrxS(SObjectPrxS i, out SObjectPrxS o);
- CObjectPrxS opCObjectPrxS(CObjectPrxS i, out CObjectPrxS o);
AStructS opAStructS(AStructS i, out AStructS o);
LStructS opLStructS(LStructS i, out LStructS o);
KStructS opKStructS(KStructS i, out KStructS o);
QStructS opQStructS(QStructS i, out QStructS o);
SStructS opSStructS(SStructS i, out SStructS o);
- CStructS opCStructS(CStructS i, out CStructS o);
AStructSD opAStructSD(AStructSD i, out AStructSD o);
LStructSD opLStructSD(LStructSD i, out LStructSD o);
KStructSD opKStructSD(KStructSD i, out KStructSD o);
QStructSD opQStructSD(QStructSD i, out QStructSD o);
SStructSD opSStructSD(SStructSD i, out SStructSD o);
- CStructSD opCStructSD(CStructSD i, out CStructSD o);
ACVS opACVS(ACVS i, out ACVS o);
LCVS opLCVS(LCVS i, out LCVS o);
- CCVS opCCVS(CCVS i, out CCVS o);
ACRS opACRS(ACRS i, out ACRS o);
LCRS opLCRS(LCRS i, out LCRS o);
- CCRS opCCRS(CCRS i, out CCRS o);
AEnS opAEnS(AEnS i, out AEnS o);
LEnS opLEnS(LEnS i, out LEnS o);
KEnS opKEnS(KEnS i, out KEnS o);
QEnS opQEnS(QEnS i, out QEnS o);
SEnS opSEnS(SEnS i, out SEnS o);
- CEnS opCEnS(CEnS i, out CEnS o);
ACVPrxS opACVPrxS(ACVPrxS i, out ACVPrxS o);
LCVPrxS opLCVPrxS(LCVPrxS i, out LCVPrxS o);
KCVPrxS opKCVPrxS(KCVPrxS i, out KCVPrxS o);
QCVPrxS opQCVPrxS(QCVPrxS i, out QCVPrxS o);
SCVPrxS opSCVPrxS(SCVPrxS i, out SCVPrxS o);
- CCVPrxS opCCVPrxS(CCVPrxS i, out CCVPrxS o);
CustomIntS opCustomIntS(CustomIntS i, out CustomIntS o);
CustomCVS opCustomCVS(CustomCVS i, out CustomCVS o);
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;
@@ -293,5 +255,5 @@ class Baz
SerialLarge SLmem;
SLS SLSmem;
};
-#endif
+
};
diff --git a/csharp/test/Ice/seqMapping/TestAMD.ice b/csharp/test/Ice/seqMapping/TestAMD.ice
index f28190f1794..f0d86ad70d9 100644
--- a/csharp/test/Ice/seqMapping/TestAMD.ice
+++ b/csharp/test/Ice/seqMapping/TestAMD.ice
@@ -17,67 +17,57 @@ sequence<byte> AByteS;
["clr:generic:LinkedList"] sequence<byte> KByteS;
["clr:generic:Queue"] sequence<byte> QByteS;
["clr:generic:Stack"] sequence<byte> SByteS;
-["clr:collection"] sequence<byte> CByteS;
sequence<bool> ABoolS;
["clr:generic:List"] sequence<bool> LBoolS;
["clr:generic:LinkedList"] sequence<bool> KBoolS;
["clr:generic:Queue"] sequence<bool> QBoolS;
["clr:generic:Stack"] sequence<bool> SBoolS;
-["clr:collection"] sequence<bool> CBoolS;
sequence<short> AShortS;
["clr:generic:List"] sequence<short> LShortS;
["clr:generic:LinkedList"] sequence<short> KShortS;
["clr:generic:Queue"] sequence<short> QShortS;
["clr:generic:Stack"] sequence<short> SShortS;
-["clr:collection"] sequence<short> CShortS;
sequence<int> AIntS;
["clr:generic:List"] sequence<int> LIntS;
["clr:generic:LinkedList"] sequence<int> KIntS;
["clr:generic:Queue"] sequence<int> QIntS;
["clr:generic:Stack"] sequence<int> SIntS;
-["clr:collection"] sequence<int> CIntS;
sequence<long> ALongS;
["clr:generic:List"] sequence<long> LLongS;
["clr:generic:LinkedList"] sequence<long> KLongS;
["clr:generic:Queue"] sequence<long> QLongS;
["clr:generic:Stack"] sequence<long> SLongS;
-["clr:collection"] sequence<long> CLongS;
sequence<float> AFloatS;
["clr:generic:List"] sequence<float> LFloatS;
["clr:generic:LinkedList"] sequence<float> KFloatS;
["clr:generic:Queue"] sequence<float> QFloatS;
["clr:generic:Stack"] sequence<float> SFloatS;
-["clr:collection"] sequence<float> CFloatS;
sequence<double> ADoubleS;
["clr:generic:List"] sequence<double> LDoubleS;
["clr:generic:LinkedList"] sequence<double> KDoubleS;
["clr:generic:Queue"] sequence<double> QDoubleS;
["clr:generic:Stack"] sequence<double> SDoubleS;
-["clr:collection"] sequence<double> CDoubleS;
sequence<string> AStringS;
["clr:generic:List"] sequence<string> LStringS;
["clr:generic:LinkedList"] sequence<string> KStringS;
["clr:generic:Queue"] sequence<string> QStringS;
["clr:generic:Stack"] sequence<string> SStringS;
-["clr:collection"] sequence<string> CStringS;
sequence<Object> AObjectS;
["clr:generic:List"] sequence<Object> LObjectS;
-["clr:collection"] sequence<Object> CObjectS;
sequence<Object*> AObjectPrxS;
["clr:generic:List"] sequence<Object*> LObjectPrxS;
["clr:generic:LinkedList"] sequence<Object*> KObjectPrxS;
["clr:generic:Queue"] sequence<Object*> QObjectPrxS;
["clr:generic:Stack"] sequence<Object*> SObjectPrxS;
-["clr:collection"] sequence<Object*> CObjectPrxS;
struct S
{
@@ -89,7 +79,6 @@ sequence<S> AStructS;
["clr:generic:LinkedList"] sequence<S> KStructS;
["clr:generic:Queue"] sequence<S> QStructS;
["clr:generic:Stack"] sequence<S> SStructS;
-["clr:collection"] sequence<S> CStructS;
struct SD
{
@@ -101,7 +90,6 @@ sequence<SD> AStructSD;
["clr:generic:LinkedList"] sequence<SD> KStructSD;
["clr:generic:Queue"] sequence<SD> QStructSD;
["clr:generic:Stack"] sequence<SD> SStructSD;
-["clr:collection"] sequence<SD> CStructSD;
class CV
{
@@ -110,14 +98,12 @@ class CV
sequence<CV> ACVS;
["clr:generic:List"] sequence<CV> LCVS;
-["clr:collection"] sequence<CV> CCVS;
sequence<CV*> ACVPrxS;
["clr:generic:List"] sequence<CV*> LCVPrxS;
["clr:generic:LinkedList"] sequence<CV*> KCVPrxS;
["clr:generic:Queue"] sequence<CV*> QCVPrxS;
["clr:generic:Stack"] sequence<CV*> SCVPrxS;
-["clr:collection"] sequence<CV*> CCVPrxS;
class CR
{
@@ -126,7 +112,6 @@ class CR
sequence<CR> ACRS;
["clr:generic:List"] sequence<CR> LCRS;
-["clr:collection"] sequence<CR> CCRS;
enum En { A, B, C };
@@ -135,7 +120,6 @@ sequence<En> AEnS;
["clr:generic:LinkedList"] sequence<En> KEnS;
["clr:generic:Queue"] sequence<En> QEnS;
["clr:generic:Stack"] sequence<En> SEnS;
-["clr:collection"] sequence<En> CEnS;
["clr:generic:Custom"] sequence<int> CustomIntS;
["clr:generic:Custom"] sequence<CV> CustomCVS;
@@ -156,103 +140,87 @@ sequence<En> AEnS;
KByteS opKByteS(KByteS i, out KByteS o);
QByteS opQByteS(QByteS i, out QByteS o);
SByteS opSByteS(SByteS i, out SByteS o);
- CByteS opCByteS(CByteS i, out CByteS o);
ABoolS opABoolS(ABoolS i, out ABoolS o);
LBoolS opLBoolS(LBoolS i, out LBoolS o);
KBoolS opKBoolS(KBoolS i, out KBoolS o);
QBoolS opQBoolS(QBoolS i, out QBoolS o);
SBoolS opSBoolS(SBoolS i, out SBoolS o);
- CBoolS opCBoolS(CBoolS i, out CBoolS o);
AShortS opAShortS(AShortS i, out AShortS o);
LShortS opLShortS(LShortS i, out LShortS o);
KShortS opKShortS(KShortS i, out KShortS o);
QShortS opQShortS(QShortS i, out QShortS o);
SShortS opSShortS(SShortS i, out SShortS o);
- CShortS opCShortS(CShortS i, out CShortS o);
AIntS opAIntS(AIntS i, out AIntS o);
LIntS opLIntS(LIntS i, out LIntS o);
KIntS opKIntS(KIntS i, out KIntS o);
QIntS opQIntS(QIntS i, out QIntS o);
SIntS opSIntS(SIntS i, out SIntS o);
- CIntS opCIntS(CIntS i, out CIntS o);
ALongS opALongS(ALongS i, out ALongS o);
LLongS opLLongS(LLongS i, out LLongS o);
KLongS opKLongS(KLongS i, out KLongS o);
QLongS opQLongS(QLongS i, out QLongS o);
SLongS opSLongS(SLongS i, out SLongS o);
- CLongS opCLongS(CLongS i, out CLongS o);
AFloatS opAFloatS(AFloatS i, out AFloatS o);
LFloatS opLFloatS(LFloatS i, out LFloatS o);
KFloatS opKFloatS(KFloatS i, out KFloatS o);
QFloatS opQFloatS(QFloatS i, out QFloatS o);
SFloatS opSFloatS(SFloatS i, out SFloatS o);
- CFloatS opCFloatS(CFloatS i, out CFloatS o);
ADoubleS opADoubleS(ADoubleS i, out ADoubleS o);
LDoubleS opLDoubleS(LDoubleS i, out LDoubleS o);
KDoubleS opKDoubleS(KDoubleS i, out KDoubleS o);
QDoubleS opQDoubleS(QDoubleS i, out QDoubleS o);
SDoubleS opSDoubleS(SDoubleS i, out SDoubleS o);
- CDoubleS opCDoubleS(CDoubleS i, out CDoubleS o);
AStringS opAStringS(AStringS i, out AStringS o);
LStringS opLStringS(LStringS i, out LStringS o);
KStringS opKStringS(KStringS i, out KStringS o);
QStringS opQStringS(QStringS i, out QStringS o);
SStringS opSStringS(SStringS i, out SStringS o);
- CStringS opCStringS(CStringS i, out CStringS o);
AObjectS opAObjectS(AObjectS i, out AObjectS o);
LObjectS opLObjectS(LObjectS i, out LObjectS o);
- CObjectS opCObjectS(CObjectS i, out CObjectS o);
AObjectPrxS opAObjectPrxS(AObjectPrxS i, out AObjectPrxS o);
LObjectPrxS opLObjectPrxS(LObjectPrxS i, out LObjectPrxS o);
KObjectPrxS opKObjectPrxS(KObjectPrxS i, out KObjectPrxS o);
QObjectPrxS opQObjectPrxS(QObjectPrxS i, out QObjectPrxS o);
SObjectPrxS opSObjectPrxS(SObjectPrxS i, out SObjectPrxS o);
- CObjectPrxS opCObjectPrxS(CObjectPrxS i, out CObjectPrxS o);
AStructS opAStructS(AStructS i, out AStructS o);
LStructS opLStructS(LStructS i, out LStructS o);
KStructS opKStructS(KStructS i, out KStructS o);
QStructS opQStructS(QStructS i, out QStructS o);
SStructS opSStructS(SStructS i, out SStructS o);
- CStructS opCStructS(CStructS i, out CStructS o);
AStructSD opAStructSD(AStructSD i, out AStructSD o);
LStructSD opLStructSD(LStructSD i, out LStructSD o);
KStructSD opKStructSD(KStructSD i, out KStructSD o);
QStructSD opQStructSD(QStructSD i, out QStructSD o);
SStructSD opSStructSD(SStructSD i, out SStructSD o);
- CStructSD opCStructSD(CStructSD i, out CStructSD o);
ACVS opACVS(ACVS i, out ACVS o);
LCVS opLCVS(LCVS i, out LCVS o);
- CCVS opCCVS(CCVS i, out CCVS o);
ACRS opACRS(ACRS i, out ACRS o);
LCRS opLCRS(LCRS i, out LCRS o);
- CCRS opCCRS(CCRS i, out CCRS o);
AEnS opAEnS(AEnS i, out AEnS o);
LEnS opLEnS(LEnS i, out LEnS o);
KEnS opKEnS(KEnS i, out KEnS o);
QEnS opQEnS(QEnS i, out QEnS o);
SEnS opSEnS(SEnS i, out SEnS o);
- CEnS opCEnS(CEnS i, out CEnS o);
ACVPrxS opACVPrxS(ACVPrxS i, out ACVPrxS o);
LCVPrxS opLCVPrxS(LCVPrxS i, out LCVPrxS o);
KCVPrxS opKCVPrxS(KCVPrxS i, out KCVPrxS o);
QCVPrxS opQCVPrxS(QCVPrxS i, out QCVPrxS o);
SCVPrxS opSCVPrxS(SCVPrxS i, out SCVPrxS o);
- CCVPrxS opCCVPrxS(CCVPrxS i, out CCVPrxS o);
CustomIntS opCustomIntS(CustomIntS i, out CustomIntS o);
CustomCVS opCustomCVS(CustomCVS i, out CustomCVS o);
diff --git a/csharp/test/Ice/seqMapping/Twoways.cs b/csharp/test/Ice/seqMapping/Twoways.cs
index ef6941e623c..c149abf9f32 100644
--- a/csharp/test/Ice/seqMapping/Twoways.cs
+++ b/csharp/test/Ice/seqMapping/Twoways.cs
@@ -101,21 +101,6 @@ class Twoways
}
{
- CByteS i = new CByteS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add((byte)c);
- }
- CByteS o;
- CByteS r;
-
- r = p.opCByteS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
bool[] i = new bool[_length];
for(int c = 0; c < _length; ++c)
{
@@ -191,21 +176,6 @@ class Twoways
}
{
- CBoolS i = new CBoolS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c % 1 == 1);
- }
- CBoolS o;
- CBoolS r;
-
- r = p.opCBoolS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
short[] i = new short[_length];
for(int c = 0; c < _length; ++c)
{
@@ -282,21 +252,6 @@ class Twoways
}
{
- CShortS i = new CShortS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add((short)c);
- }
- CShortS o;
- CShortS r;
-
- r = p.opCShortS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
int[] i = new int[_length];
for(int c = 0; c < _length; ++c)
{
@@ -372,21 +327,6 @@ class Twoways
}
{
- CIntS i = new CIntS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add((int)c);
- }
- CIntS o;
- CIntS r;
-
- r = p.opCIntS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
long[] i = new long[_length];
for(int c = 0; c < _length; ++c)
{
@@ -462,21 +402,6 @@ class Twoways
}
{
- CLongS i = new CLongS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add((long)c);
- }
- CLongS o;
- CLongS r;
-
- r = p.opCLongS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
float[] i = new float[_length];
for(int c = 0; c < _length; ++c)
{
@@ -552,21 +477,6 @@ class Twoways
}
{
- CFloatS i = new CFloatS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add((float)c);
- }
- CFloatS o;
- CFloatS r;
-
- r = p.opCFloatS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
double[] i = new double[_length];
for(int c = 0; c < _length; ++c)
{
@@ -642,21 +552,6 @@ class Twoways
}
{
- CDoubleS i = new CDoubleS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add((double)c);
- }
- CDoubleS o;
- CDoubleS r;
-
- r = p.opCDoubleS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
string[] i = new string[_length];
for(int c = 0; c < _length; ++c)
{
@@ -732,21 +627,6 @@ class Twoways
}
{
- CStringS i = new CStringS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c.ToString());
- }
- CStringS o;
- CStringS r;
-
- r = p.opCStringS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
Ice.Object[] i = new CV[_length];
for(int c = 0; c < _length; ++c)
{
@@ -791,28 +671,6 @@ class Twoways
}
{
- CObjectS i = new CObjectS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
- CObjectS o;
- CObjectS r;
-
- r = p.opCObjectS(i, out o);
-
- IEnumerator<Ice.Object> eo = (IEnumerator<Ice.Object>)o.GetEnumerator();
- IEnumerator<Ice.Object> er = (IEnumerator<Ice.Object>)r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- }
-
- {
Ice.ObjectPrx[] i = new Ice.ObjectPrx[_length];
for(int c = 0; c < _length; ++c)
{
@@ -888,21 +746,6 @@ class Twoways
}
{
- CObjectPrxS i = new CObjectPrxS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(communicator.stringToProxy(c.ToString()));
- }
- CObjectPrxS o;
- CObjectPrxS r;
-
- r = p.opCObjectPrxS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
S[] i = new S[_length];
for(int c = 0; c < _length; ++c)
{
@@ -979,21 +822,6 @@ class Twoways
}
{
- CStructS i = new CStructS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new S(c));
- }
- CStructS o;
- CStructS r;
-
- r = p.opCStructS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
SD[] i = new SD[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1070,21 +898,6 @@ class Twoways
}
{
- CStructSD i = new CStructSD(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new SD(c));
- }
- CStructSD o;
- CStructSD r;
-
- r = p.opCStructSD(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
CV[] i = new CV[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1129,28 +942,6 @@ class Twoways
}
{
- CCVS i = new CCVS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
- CCVS o;
- CCVS r;
-
- r = p.opCCVS(i, out o);
-
- IEnumerator<CV> eo = (IEnumerator<CV>)o.GetEnumerator();
- IEnumerator<CV> er = (IEnumerator<CV>)r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == eo.Current.i);
- test(obj.i == er.Current.i);
- }
- }
-
- {
CR[] i = new CR[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1195,28 +986,6 @@ class Twoways
}
{
- CCRS i = new CCRS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CR(new CV(c)));
- }
- CCRS o;
- CCRS r;
-
- r = p.opCCRS(i, out o);
-
- IEnumerator<CR> eo = (IEnumerator<CR>)o.GetEnumerator();
- IEnumerator<CR> er = (IEnumerator<CR>)r.GetEnumerator();
- foreach(CR obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.v.i == eo.Current.v.i);
- test(obj.v.i == er.Current.v.i);
- }
- }
-
- {
En[] i = new En[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1292,21 +1061,6 @@ class Twoways
}
{
- CEnS i = new CEnS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add((En)(c % 3));
- }
- CEnS o;
- CEnS r;
-
- r = p.opCEnS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
CVPrx[] i = new CVPrx[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1382,21 +1136,6 @@ class Twoways
}
{
- CCVPrxS i = new CCVPrxS(_length);
- for(int c = 0; c < _length; ++c)
- {
- i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
- }
- CCVPrxS o;
- CCVPrxS r;
-
- r = p.opCCVPrxS(i, out o);
-
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- }
-
- {
Custom<int> i = new Custom<int>();
for(int c = 0; c < _length; ++c)
{
@@ -1504,7 +1243,6 @@ class Twoways
}
}
-#if !COMPACT && !SILVERLIGHT
{
Serialize.Small i = null;
Serialize.Small o;
@@ -1612,6 +1350,5 @@ class Twoways
// OK, talking to non-C# server.
}
}
-#endif
}
}
diff --git a/csharp/test/Ice/seqMapping/TwowaysAMI.cs b/csharp/test/Ice/seqMapping/TwowaysAMI.cs
index b722ad5d270..c50306991f6 100644
--- a/csharp/test/Ice/seqMapping/TwowaysAMI.cs
+++ b/csharp/test/Ice/seqMapping/TwowaysAMI.cs
@@ -108,16 +108,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCByteSI(Ice.AsyncResult result)
- {
- CByteS i = (CByteS)result.AsyncState;
- CByteS o;
- CByteS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCByteS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opABoolSI(Ice.AsyncResult result)
{
bool[] i = (bool[])result.AsyncState;
@@ -168,16 +158,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCBoolSI(Ice.AsyncResult result)
- {
- CBoolS i = (CBoolS)result.AsyncState;
- CBoolS o;
- CBoolS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCBoolS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opAShortSI(Ice.AsyncResult result)
{
short[] i = (short[])result.AsyncState;
@@ -228,16 +208,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCShortSI(Ice.AsyncResult result)
- {
- CShortS i = (CShortS)result.AsyncState;
- CShortS o;
- CShortS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCShortS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opAIntSI(Ice.AsyncResult result)
{
int[] i = (int[])result.AsyncState;
@@ -288,16 +258,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCIntSI(Ice.AsyncResult result)
- {
- CIntS i = (CIntS)result.AsyncState;
- CIntS o;
- CIntS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCIntS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opALongSI(Ice.AsyncResult result)
{
long[] i = (long[])result.AsyncState;
@@ -348,16 +308,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCLongSI(Ice.AsyncResult result)
- {
- CLongS i = (CLongS)result.AsyncState;
- CLongS o;
- CLongS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCLongS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opAFloatSI(Ice.AsyncResult result)
{
float[] i = (float[])result.AsyncState;
@@ -408,16 +358,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCFloatSI(Ice.AsyncResult result)
- {
- CFloatS i = (CFloatS)result.AsyncState;
- CFloatS o;
- CFloatS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCFloatS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opADoubleSI(Ice.AsyncResult result)
{
double[] i = (double[])result.AsyncState;
@@ -468,16 +408,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCDoubleSI(Ice.AsyncResult result)
- {
- CDoubleS i = (CDoubleS)result.AsyncState;
- CDoubleS o;
- CDoubleS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCDoubleS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opAStringSI(Ice.AsyncResult result)
{
string[] i = (string[])result.AsyncState;
@@ -528,16 +458,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCStringSI(Ice.AsyncResult result)
- {
- CStringS i = (CStringS)result.AsyncState;
- CStringS o;
- CStringS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStringS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opAObjectSI(Ice.AsyncResult result)
{
Ice.Object[] i = (Ice.Object[])result.AsyncState;
@@ -572,23 +492,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCObjectSI(Ice.AsyncResult result)
- {
- CObjectS i = (CObjectS)result.AsyncState;
- CObjectS o;
- CObjectS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCObjectS(out o, result);
- IEnumerator<Ice.Object> eo = o.GetEnumerator();
- IEnumerator<Ice.Object> er = r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- callback.called();
- }
-
public void opAObjectPrxSI(Ice.AsyncResult result)
{
Ice.ObjectPrx[] i = (Ice.ObjectPrx[])result.AsyncState;
@@ -640,16 +543,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCObjectPrxSI(Ice.AsyncResult result)
- {
- CObjectPrxS i = (CObjectPrxS)result.AsyncState;
- CObjectPrxS o;
- CObjectPrxS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCObjectPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opAStructSI(Ice.AsyncResult result)
{
S[] i = (S[])result.AsyncState;
@@ -700,16 +593,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCStructSI(Ice.AsyncResult result)
- {
- CStructS i = (CStructS)result.AsyncState;
- CStructS o;
- CStructS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStructS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opAStructSDI(Ice.AsyncResult result)
{
SD[] i = (SD[])result.AsyncState;
@@ -760,16 +643,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCStructSDI(Ice.AsyncResult result)
- {
- CStructSD i = (CStructSD)result.AsyncState;
- CStructSD o;
- CStructSD r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCStructSD(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opACVSI(Ice.AsyncResult result)
{
CV[] i = (CV[])result.AsyncState;
@@ -804,23 +677,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCCVSI(Ice.AsyncResult result)
- {
- CCVS i = (CCVS)result.AsyncState;
- CCVS o;
- CCVS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCVS(out o, result);
- IEnumerator<CV> eo = (IEnumerator<CV>)o.GetEnumerator();
- IEnumerator<CV> er = (IEnumerator<CV>)r.GetEnumerator();
- foreach(CV obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.i == ((CV)eo.Current).i);
- test(obj.i == ((CV)er.Current).i);
- }
- callback.called();
- }
-
public void opACVPrxSI(Ice.AsyncResult result)
{
CVPrx[] i = (CVPrx[])result.AsyncState;
@@ -872,16 +728,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCCVPrxSI(Ice.AsyncResult result)
- {
- CCVPrxS i = (CCVPrxS)result.AsyncState;
- CCVPrxS o;
- CCVPrxS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCVPrxS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opACRSI(Ice.AsyncResult result)
{
CR[] i = (CR[])result.AsyncState;
@@ -916,23 +762,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCCRSI(Ice.AsyncResult result)
- {
- CCRS i = (CCRS)result.AsyncState;
- CCRS o;
- CCRS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCCRS(out o, result);
- IEnumerator<CR> eo = (IEnumerator<CR>)o.GetEnumerator();
- IEnumerator<CR> er = (IEnumerator<CR>)r.GetEnumerator();
- foreach(CR obj in i)
- {
- eo.MoveNext();
- er.MoveNext();
- test(obj.v.i == ((CR)eo.Current).v.i);
- test(obj.v.i == ((CR)er.Current).v.i);
- }
- callback.called();
- }
-
public void opAEnSI(Ice.AsyncResult result)
{
En[] i = (En[])result.AsyncState;
@@ -983,16 +812,6 @@ public class TwowaysAMI
callback.called();
}
- public void opCEnSI(Ice.AsyncResult result)
- {
- CEnS i = (CEnS)result.AsyncState;
- CEnS o;
- CEnS r = MyClassPrxHelper.uncheckedCast(result.getProxy()).end_opCEnS(out o, result);
- test(Ice.CollectionComparer.Equals(i, o));
- test(Ice.CollectionComparer.Equals(i, r));
- callback.called();
- }
-
public void opCustomIntSI(Ice.AsyncResult result)
{
Custom<int> i = (Custom<int>)result.AsyncState;
@@ -1070,7 +889,6 @@ public class TwowaysAMI
callback.called();
}
-#if !COMPACT && !SILVERLIGHT
public void opSerialSmallCSharpNullI(Ice.AsyncResult result)
{
try
@@ -1166,7 +984,6 @@ public class TwowaysAMI
// OK, talking to non-C# server.
}
}
-#endif
public virtual void check()
{
@@ -1176,7 +993,6 @@ public class TwowaysAMI
private CallbackBase callback = new CallbackBase();
}
-
static int _length = 100;
internal static void twowaysAMI(Ice.Communicator communicator, Test.MyClassPrx p)
@@ -1242,18 +1058,6 @@ public class TwowaysAMI
}
{
- CByteS i = new CByteS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((byte)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCByteS(i, null, cb.opCByteSI, i);
- cb.check();
- }
-
- {
bool[] i = new bool[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1314,18 +1118,6 @@ public class TwowaysAMI
}
{
- CBoolS i = new CBoolS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c % 1 == 1);
- }
-
- Callback cb = new Callback();
- p.begin_opCBoolS(i, null, cb.opCBoolSI, i);
- cb.check();
- }
-
- {
short[] i = new short[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1386,18 +1178,6 @@ public class TwowaysAMI
}
{
- CShortS i = new CShortS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((short)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCShortS(i, null, cb.opCShortSI, i);
- cb.check();
- }
-
- {
int[] i = new int[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1458,18 +1238,6 @@ public class TwowaysAMI
}
{
- CIntS i = new CIntS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((int)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCIntS(i, null, cb.opCIntSI, i);
- cb.check();
- }
-
- {
long[] i = new long[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1530,18 +1298,6 @@ public class TwowaysAMI
}
{
- CLongS i = new CLongS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((long)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCLongS(i, null, cb.opCLongSI, i);
- cb.check();
- }
-
- {
float[] i = new float[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1602,18 +1358,6 @@ public class TwowaysAMI
}
{
- CFloatS i = new CFloatS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((float)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCFloatS(i, null, cb.opCFloatSI, i);
- cb.check();
- }
-
- {
double[] i = new double[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1674,18 +1418,6 @@ public class TwowaysAMI
}
{
- CDoubleS i = new CDoubleS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((double)c);
- }
-
- Callback cb = new Callback();
- p.begin_opCDoubleS(i, null, cb.opCDoubleSI, i);
- cb.check();
- }
-
- {
string[] i = new string[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1746,18 +1478,6 @@ public class TwowaysAMI
}
{
- CStringS i = new CStringS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(c.ToString());
- }
-
- Callback cb = new Callback();
- p.begin_opCStringS(i, null, cb.opCStringSI, i);
- cb.check();
- }
-
- {
Ice.Object[] i = new Ice.Object[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1782,18 +1502,6 @@ public class TwowaysAMI
}
{
- CObjectS i = new CObjectS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
-
- Callback cb = new Callback();
- p.begin_opCObjectS(i, null, cb.opCObjectSI, i);
- cb.check();
- }
-
- {
Ice.ObjectPrx[] i = new Ice.ObjectPrx[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1854,18 +1562,6 @@ public class TwowaysAMI
}
{
- CObjectPrxS i = new CObjectPrxS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(communicator.stringToProxy(c.ToString()));
- }
-
- Callback cb = new Callback();
- p.begin_opCObjectPrxS(i, null, cb.opCObjectPrxSI, i);
- cb.check();
- }
-
- {
S[] i = new S[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1926,18 +1622,6 @@ public class TwowaysAMI
}
{
- CStructS i = new CStructS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new S(c));
- }
-
- Callback cb = new Callback();
- p.begin_opCStructS(i, null, cb.opCStructSI, i);
- cb.check();
- }
-
- {
CV[] i = new CV[_length];
for(int c = 0; c < _length; ++c)
{
@@ -1962,18 +1646,6 @@ public class TwowaysAMI
}
{
- CCVS i = new CCVS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CV(c));
- }
-
- Callback cb = new Callback();
- p.begin_opCCVS(i, null, cb.opCCVSI, i);
- cb.check();
- }
-
- {
CVPrx[] i = new CVPrx[_length];
for(int c = 0; c < _length; ++c)
{
@@ -2034,18 +1706,6 @@ public class TwowaysAMI
}
{
- CCVPrxS i = new CCVPrxS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(CVPrxHelper.uncheckedCast(communicator.stringToProxy(c.ToString())));
- }
-
- Callback cb = new Callback();
- p.begin_opCCVPrxS(i, null, cb.opCCVPrxSI, i);
- cb.check();
- }
-
- {
CR[] i = new CR[_length];
for(int c = 0; c < _length; ++c)
{
@@ -2070,18 +1730,6 @@ public class TwowaysAMI
}
{
- CCRS i = new CCRS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add(new CR(new CV(c)));
- }
-
- Callback cb = new Callback();
- p.begin_opCCRS(i, null, cb.opCCRSI, i);
- cb.check();
- }
-
- {
En[] i = new En[_length];
for(int c = 0; c < _length; ++c)
{
@@ -2142,18 +1790,6 @@ public class TwowaysAMI
}
{
- CEnS i = new CEnS();
- for(int c = 0; c < _length; ++c)
- {
- i.Add((En)(c % 3));
- }
-
- Callback cb = new Callback();
- p.begin_opCEnS(i, null, cb.opCEnSI, i);
- cb.check();
- }
-
- {
Custom<int> i = new Custom<int>();
for(int c = 0; c < _length; ++c)
{
@@ -2211,7 +1847,6 @@ public class TwowaysAMI
cb.check();
}
-#if !COMPACT && !SILVERLIGHT
{
Serialize.Small i = null;
@@ -2258,6 +1893,5 @@ public class TwowaysAMI
p.begin_opSerialStructCSharp(i, null, cb.opSerialStructCSharpI, i);
cb.check();
}
-#endif
}
}
diff --git a/csharp/test/Ice/serialize/AllTests.cs b/csharp/test/Ice/serialize/AllTests.cs
index fe2afc2ee54..66f3e11ef0c 100644
--- a/csharp/test/Ice/serialize/AllTests.cs
+++ b/csharp/test/Ice/serialize/AllTests.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
@@ -15,10 +14,6 @@ using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
using Test;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
public class AllTests : TestCommon.TestApp
{
//
@@ -67,20 +62,7 @@ public class AllTests : TestCommon.TestApp
return true;
}
-#if SILVERLIGHT
- public override Ice.InitializationData initData()
- {
- Ice.InitializationData initData = new Ice.InitializationData();
- initData.properties = Ice.Util.createProperties();
- initData.properties.setProperty("Ice.FactoryAssemblies", "serialize,version=1.0.0.0");
- return initData;
- }
-
- override
- public void run(Ice.Communicator communicator)
-#else
static public int run(Ice.Communicator communicator)
-#endif
{
Write("testing serialization... ");
Flush();
@@ -96,12 +78,10 @@ public class AllTests : TestCommon.TestApp
ex.vsll = new LinkedList<ValStruct>();
ex.vssk = new Stack<ValStruct>();
ex.vsq = new Queue<ValStruct>();
- ex.vsc = new ValStructCollection();
ex.isd = new Dictionary<int, string>();
ex.ivd = new Dictionary<int, ValStruct>();
ex.ipd = null;
ex.issd = new SortedDictionary<int, string>();
- ex.isdc = new IntStringDC();
ex.optName = new Ice.Optional<string>();
ex.optInt = new Ice.Optional<int>();
ex.optValStruct = new Ice.Optional<ValStruct>();
@@ -128,8 +108,6 @@ public class AllTests : TestCommon.TestApp
ex.vssk.Push(ex.vs);
ex.vsq = new Queue<ValStruct>();
ex.vsq.Enqueue(ex.vs);
- ex.vsc = new ValStructCollection();
- ex.vsc.Add(ex.vs);
ex.isd = new Dictionary<int, string>();
ex.isd[5] = "five";
ex.ivd = new Dictionary<int, ValStruct>();
@@ -137,8 +115,6 @@ public class AllTests : TestCommon.TestApp
ex.ipd = new Dictionary<int, MyClassPrx>();
ex.issd = new SortedDictionary<int, string>();
ex.issd[3] = "three";
- ex.isdc = new IntStringDC();
- ex.isdc[4] = "four";
ex.optName = new Ice.Optional<string>("MyException");
ex.optInt = new Ice.Optional<int>(99);
ex.optValStruct = new Ice.Optional<ValStruct>(ex.vs);
@@ -196,9 +172,7 @@ public class AllTests : TestCommon.TestApp
test(c2.s.Equals(c.s));
WriteLine("ok");
-#if !SILVERLIGHT
return 0;
-#endif
}
private static T inOut<T>(T o)
diff --git a/csharp/test/Ice/serialize/Client.cs b/csharp/test/Ice/serialize/Client.cs
index 91c6ad3d0eb..0fb56692d3e 100644
--- a/csharp/test/Ice/serialize/Client.cs
+++ b/csharp/test/Ice/serialize/Client.cs
@@ -8,10 +8,7 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
-using System.Collections;
-using System.Collections.Generic;
[assembly: CLSCompliant(true)]
@@ -29,18 +26,10 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = AllTests.run(communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/serialize/Test.ice b/csharp/test/Ice/serialize/Test.ice
index dbe3933510b..a2c2a96c17f 100644
--- a/csharp/test/Ice/serialize/Test.ice
+++ b/csharp/test/Ice/serialize/Test.ice
@@ -53,16 +53,12 @@ sequence<ValStruct> ValStructLinkedList;
sequence<ValStruct> ValStructStack;
["clr:generic:Queue"]
sequence<ValStruct> ValStructQueue;
-["clr:collection"]
-sequence<ValStruct> ValStructCollection;
dictionary<int, string> IntStringD;
dictionary<int, ValStruct> IntValStructD;
dictionary<int, MyClass*> IntProxyD;
["clr:generic:SortedDictionary"]
dictionary<int, string> IntStringSD;
-["clr:collection"]
-dictionary<int, string> IntStringDC;
class Base
{
@@ -96,13 +92,11 @@ exception MyException
ValStructLinkedList vsll;
ValStructStack vssk;
ValStructQueue vsq;
- ValStructCollection vsc;
IntStringD isd;
IntValStructD ivd;
IntProxyD ipd;
IntStringSD issd;
- IntStringDC isdc;
optional(1) string optName;
optional(2) int optInt;
diff --git a/csharp/test/Ice/servantLocator/AllTests.cs b/csharp/test/Ice/servantLocator/AllTests.cs
index 8a6344b6b3d..f52a592e4de 100644
--- a/csharp/test/Ice/servantLocator/AllTests.cs
+++ b/csharp/test/Ice/servantLocator/AllTests.cs
@@ -11,10 +11,6 @@ using System;
using Test;
using Ice;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
public class AllTests : TestCommon.TestApp
{
public static void testExceptions(TestIntfPrx obj)
@@ -198,20 +194,7 @@ 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", "servantLocator,version=1.0.0.0");
- return initData;
- }
-
- override
- public void run(Ice.Communicator communicator)
-#else
public static TestIntfPrx allTests(Ice.Communicator communicator)
-#endif
{
Write("testing stringToProxy... ");
Flush();
@@ -372,10 +355,6 @@ public class AllTests : TestCommon.TestApp
{
test(false);
}
-#if SILVERLIGHT
- obj.shutdown();
-#else
return obj;
-#endif
}
}
diff --git a/csharp/test/Ice/servantLocator/Client.cs b/csharp/test/Ice/servantLocator/Client.cs
index 602afa61b39..b6de8d4f0fc 100644
--- a/csharp/test/Ice/servantLocator/Client.cs
+++ b/csharp/test/Ice/servantLocator/Client.cs
@@ -9,7 +9,6 @@
using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -33,15 +32,6 @@ public class Client
public static int Main(string[] args)
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
-
App app = new App();
return app.main(args, data);
}
diff --git a/csharp/test/Ice/servantLocator/Collocated.cs b/csharp/test/Ice/servantLocator/Collocated.cs
index 32caa46854a..66e39874c4a 100644
--- a/csharp/test/Ice/servantLocator/Collocated.cs
+++ b/csharp/test/Ice/servantLocator/Collocated.cs
@@ -7,9 +7,7 @@
//
// **********************************************************************
-using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -42,14 +40,6 @@ public class Collocated
public static int Main(string[] args)
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "collocated");
-#endif
App app = new App();
return app.main(args, data);
}
diff --git a/csharp/test/Ice/servantLocator/ServantLocatorI.cs b/csharp/test/Ice/servantLocator/ServantLocatorI.cs
index a2d5d7f64b4..a51a02e8cac 100644
--- a/csharp/test/Ice/servantLocator/ServantLocatorI.cs
+++ b/csharp/test/Ice/servantLocator/ServantLocatorI.cs
@@ -36,7 +36,7 @@ public sealed class ServantLocatorI : Ice.ServantLocator
}
}
- public Ice.Object locate(Ice.Current current, out System.Object cookie)
+ public Ice.Object locate(Ice.Current current, out object cookie)
{
lock(this)
{
diff --git a/csharp/test/Ice/servantLocator/Server.cs b/csharp/test/Ice/servantLocator/Server.cs
index ebd19dae615..6c5d86bfc60 100644
--- a/csharp/test/Ice/servantLocator/Server.cs
+++ b/csharp/test/Ice/servantLocator/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/Ice/slicing/exceptions/AllTests.cs b/csharp/test/Ice/slicing/exceptions/AllTests.cs
index 0d3122f210c..1d0038283c3 100644
--- a/csharp/test/Ice/slicing/exceptions/AllTests.cs
+++ b/csharp/test/Ice/slicing/exceptions/AllTests.cs
@@ -12,10 +12,6 @@ using System.Diagnostics;
using System.Threading;
using Test;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
public class AllTests : TestCommon.TestApp
{
private class Callback
@@ -31,7 +27,7 @@ public class AllTests : TestCommon.TestApp
{
while(!_called)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
_called = false;
@@ -44,7 +40,7 @@ public class AllTests : TestCommon.TestApp
{
Debug.Assert(!_called);
_called = true;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
@@ -94,19 +90,7 @@ 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", "exceptions,version=1.0.0.0");
- return initData;
- }
-
- public override void run(Ice.Communicator communicator)
-#else
public static TestIntfPrx allTests(Ice.Communicator communicator, bool collocated)
-#endif
{
Write("testing stringToProxy... ");
Flush();
@@ -829,10 +813,6 @@ public class AllTests : TestCommon.TestApp
}
WriteLine("ok");
- //
- // No server side in Silverlight
- //
-#if !SILVERLIGHT
Write("preserved exceptions... ");
Flush();
{
@@ -955,12 +935,6 @@ public class AllTests : TestCommon.TestApp
adapter.destroy();
}
WriteLine("ok");
-#endif
-
-#if SILVERLIGHT
- testPrx.shutdown();
-#else
return testPrx;
-#endif
}
}
diff --git a/csharp/test/Ice/slicing/exceptions/Client.cs b/csharp/test/Ice/slicing/exceptions/Client.cs
index a0bdc939c23..a89ce7c02e1 100644
--- a/csharp/test/Ice/slicing/exceptions/Client.cs
+++ b/csharp/test/Ice/slicing/exceptions/Client.cs
@@ -8,7 +8,7 @@
// **********************************************************************
using Test;
-using System.Diagnostics;
+using System;
public class Client
{
@@ -27,20 +27,12 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -52,7 +44,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/slicing/exceptions/Server.cs b/csharp/test/Ice/slicing/exceptions/Server.cs
index 789222f8fac..bdd28e784e0 100644
--- a/csharp/test/Ice/slicing/exceptions/Server.cs
+++ b/csharp/test/Ice/slicing/exceptions/Server.cs
@@ -7,7 +7,7 @@
//
// **********************************************************************
-using System.Diagnostics;
+using System;
public class Server
{
@@ -32,20 +32,12 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "server");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -57,7 +49,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/slicing/exceptions/ServerAMD.cs b/csharp/test/Ice/slicing/exceptions/ServerAMD.cs
index 3477ea0a5bf..bdd28e784e0 100644
--- a/csharp/test/Ice/slicing/exceptions/ServerAMD.cs
+++ b/csharp/test/Ice/slicing/exceptions/ServerAMD.cs
@@ -7,7 +7,7 @@
//
// **********************************************************************
-using System.Diagnostics;
+using System;
public class Server
{
@@ -32,20 +32,12 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "serveramd");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -57,7 +49,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/slicing/objects/AllTests.cs b/csharp/test/Ice/slicing/objects/AllTests.cs
index da4604f28af..d4076b64185 100644
--- a/csharp/test/Ice/slicing/objects/AllTests.cs
+++ b/csharp/test/Ice/slicing/objects/AllTests.cs
@@ -10,13 +10,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
-using System.Threading;
using Test;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
public class AllTests : TestCommon.TestApp
{
private class Callback
@@ -81,20 +76,7 @@ public class AllTests : TestCommon.TestApp
return null;
}
-#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
{
Write("testing stringToProxy... ");
Flush();
@@ -1414,16 +1396,16 @@ public class AllTests : TestCommon.TestApp
ss2d3.pd3 = ss1d1;
SS1 ss1 = new SS1();
- ss1.s = new BSeq(3);
- ss1.s.Add(ss1b);
- ss1.s.Add(ss1d1);
- ss1.s.Add(ss1d3);
+ ss1.s = new B[3];
+ ss1.s[0] = ss1b;
+ ss1.s[1] = ss1d1;
+ ss1.s[2] = ss1d3;
SS2 ss2 = new SS2();
- ss2.s = new BSeq(3);
- ss2.s.Add(ss2b);
- ss2.s.Add(ss2d1);
- ss2.s.Add(ss2d3);
+ ss2.s = new B[3];
+ ss2.s[0] = ss2b;
+ ss2.s[1] = ss2d1;
+ ss2.s[2] = ss2d3;
ss = testPrx.sequenceTest(ss1, ss2);
}
@@ -1502,16 +1484,16 @@ public class AllTests : TestCommon.TestApp
ss2d3.pd3 = ss1d1;
SS1 ss1 = new SS1();
- ss1.s = new BSeq();
- ss1.s.Add(ss1b);
- ss1.s.Add(ss1d1);
- ss1.s.Add(ss1d3);
+ ss1.s = new B[3];
+ ss1.s[0] = ss1b;
+ ss1.s[1] = ss1d1;
+ ss1.s[2] = ss1d3;
SS2 ss2 = new SS2();
- ss2.s = new BSeq();
- ss2.s.Add(ss2b);
- ss2.s.Add(ss2d1);
- ss2.s.Add(ss2d3);
+ ss2.s = new B[3];
+ ss2.s[0] = ss2b;
+ ss2.s[1] = ss2d1;
+ ss2.s[2] = ss2d3;
Callback cb = new Callback();
testPrx.begin_sequenceTest(ss1, ss2).whenCompleted(
@@ -2429,11 +2411,6 @@ public class AllTests : TestCommon.TestApp
}
WriteLine("ok");
-
-#if SILVERLIGHT
- testPrx.shutdown();
-#else
return testPrx;
-#endif
}
}
diff --git a/csharp/test/Ice/slicing/objects/Client.cs b/csharp/test/Ice/slicing/objects/Client.cs
index a0bdc939c23..a89ce7c02e1 100644
--- a/csharp/test/Ice/slicing/objects/Client.cs
+++ b/csharp/test/Ice/slicing/objects/Client.cs
@@ -8,7 +8,7 @@
// **********************************************************************
using Test;
-using System.Diagnostics;
+using System;
public class Client
{
@@ -27,20 +27,12 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -52,7 +44,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/slicing/objects/Server.cs b/csharp/test/Ice/slicing/objects/Server.cs
index cfd418e3861..54109e72e98 100644
--- a/csharp/test/Ice/slicing/objects/Server.cs
+++ b/csharp/test/Ice/slicing/objects/Server.cs
@@ -7,7 +7,7 @@
//
// **********************************************************************
-using System.Diagnostics;
+using System;
public class Server
{
@@ -32,20 +32,12 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "server");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -57,7 +49,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/slicing/objects/ServerAMD.cs b/csharp/test/Ice/slicing/objects/ServerAMD.cs
index fdc684e7014..54109e72e98 100644
--- a/csharp/test/Ice/slicing/objects/ServerAMD.cs
+++ b/csharp/test/Ice/slicing/objects/ServerAMD.cs
@@ -7,7 +7,7 @@
//
// **********************************************************************
-using System.Diagnostics;
+using System;
public class Server
{
@@ -32,20 +32,12 @@ public class Server
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "serveramd");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -57,7 +49,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/slicing/objects/Test.ice b/csharp/test/Ice/slicing/objects/Test.ice
index 12a0dd34273..08c203f4698 100644
--- a/csharp/test/Ice/slicing/objects/Test.ice
+++ b/csharp/test/Ice/slicing/objects/Test.ice
@@ -34,7 +34,7 @@ class D1 extends B
B pd1;
};
-["clr:collection"] sequence<B> BSeq;
+sequence<B> BSeq;
class SS1
{
diff --git a/csharp/test/Ice/slicing/objects/TestAMD.ice b/csharp/test/Ice/slicing/objects/TestAMD.ice
index 3d83bdb6f73..64ebd62fd61 100644
--- a/csharp/test/Ice/slicing/objects/TestAMD.ice
+++ b/csharp/test/Ice/slicing/objects/TestAMD.ice
@@ -34,7 +34,7 @@ class D1 extends B
B pd1;
};
-["clr:collection"] sequence<B> BSeq;
+sequence<B> BSeq;
class SS1
{
diff --git a/csharp/test/Ice/stream/AllTests.cs b/csharp/test/Ice/stream/AllTests.cs
index 372f8e9bba5..f4f965d6bc5 100644
--- a/csharp/test/Ice/stream/AllTests.cs
+++ b/csharp/test/Ice/stream/AllTests.cs
@@ -7,16 +7,11 @@
//
// **********************************************************************
-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
{
//
@@ -145,20 +140,7 @@ public class AllTests : TestCommon.TestApp
private Ice.ValueFactory _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();
@@ -415,7 +397,6 @@ public class AllTests : TestCommon.TestApp
test(Compare(arr2S, arrS));
}
-#if !COMPACT && !SILVERLIGHT
{
Serialize.Small small = new Serialize.Small();
small.i = 99;
@@ -426,7 +407,6 @@ public class AllTests : TestCommon.TestApp
Serialize.Small small2 = (Serialize.Small)@in.readSerializable();
test(small2.i == 99);
}
-#endif
{
short[] arr =
@@ -1161,119 +1141,6 @@ public class AllTests : TestCommon.TestApp
}
{
- bool[] arr =
- {
- true,
- false,
- true,
- false
- };
- @out = new Ice.OutputStream(communicator);
- Test.BoolCollection l = new Test.BoolCollection(arr);
- Test.BoolCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = new Ice.InputStream(communicator, data);
- Test.BoolCollection l2 = Test.BoolCollectionHelper.read(@in);
- test(Compare(l, l2));
- }
-
- {
- int[] arr =
- {
- 0x01,
- 0x11,
- 0x12,
- 0x22
- };
- @out = new Ice.OutputStream(communicator);
- Test.IntCollection l = new Test.IntCollection(arr);
- Test.IntCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = new Ice.InputStream(communicator, data);
- Test.IntCollection l2 = Test.IntCollectionHelper.read(@in);
- test(Compare(l2, l));
- }
-
- {
- string[] arr =
- {
- "string1",
- "string2",
- "string3",
- "string4"
- };
- @out = new Ice.OutputStream(communicator);
- Test.StringCollection l = new Test.StringCollection(arr);
- Test.StringCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = new Ice.InputStream(communicator, data);
- Test.StringCollection l2 = Test.StringCollectionHelper.read(@in);
- test(Compare(l2, l));
- }
-
- {
- Test.MyEnum[] arr =
- {
- Test.MyEnum.enum3,
- Test.MyEnum.enum2,
- Test.MyEnum.enum1,
- Test.MyEnum.enum2
- };
- @out = new Ice.OutputStream(communicator);
- Test.MyEnumCollection l = new Test.MyEnumCollection(arr);
- Test.MyEnumCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = new Ice.InputStream(communicator, data);
- Test.MyEnumCollection l2 = Test.MyEnumCollectionHelper.read(@in);
- test(Compare(l2, l));
- }
-
- {
- @out = new Ice.OutputStream(communicator);
- Test.SmallStructCollection l = new Test.SmallStructCollection(smallStructArray);
- Test.SmallStructCollectionHelper.write(@out, l);
- byte[] data = @out.finished();
- @in = new Ice.InputStream(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 = new Ice.OutputStream(communicator);
- Test.MyClassCollection l = new Test.MyClassCollection(myClassArray);
- Test.MyClassCollectionHelper.write(@out, l);
- @out.writePendingObjects();
- byte[] data = @out.finished();
- @in = new Ice.InputStream(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]));
- }
- }
-
- {
string[] arr =
{
"string1",
@@ -1318,13 +1185,9 @@ public class AllTests : TestCommon.TestApp
Stack<string[]> l2 = Test.StringSStackHelper.read(@in);
test(Compare(l2, l));
}
-#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 = new Ice.OutputStream(communicator);
@@ -1335,21 +1198,7 @@ public class AllTests : TestCommon.TestApp
test(Ice.CollectionComparer.Equals(dict2, dict));
}
- {
- Test.StringIntDCollection dict = new Test.StringIntDCollection();
- dict.Add("key1", 1);
- dict.Add("key2", 2);
- @out = new Ice.OutputStream(communicator);
- Test.StringIntDCollectionHelper.write(@out, dict);
- byte[] data = @out.finished();
- @in = new Ice.InputStream(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/csharp/test/Ice/stream/Client.cs b/csharp/test/Ice/stream/Client.cs
index 91c6ad3d0eb..0fb56692d3e 100644
--- a/csharp/test/Ice/stream/Client.cs
+++ b/csharp/test/Ice/stream/Client.cs
@@ -8,10 +8,7 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
-using System.Collections;
-using System.Collections.Generic;
[assembly: CLSCompliant(true)]
@@ -29,18 +26,10 @@ public class Client
try
{
Ice.InitializationData data = new Ice.InitializationData();
-#if COMPACT
- //
- // When using Ice for .NET Compact Framework, we need to specify
- // the assembly so that Ice can locate classes and exceptions.
- //
- data.properties = Ice.Util.createProperties();
- data.properties.setProperty("Ice.FactoryAssemblies", "client");
-#endif
communicator = Ice.Util.initialize(ref args, data);
status = AllTests.run(communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/stream/Test.ice b/csharp/test/Ice/stream/Test.ice
index 40c079e6dca..2df649693da 100644
--- a/csharp/test/Ice/stream/Test.ice
+++ b/csharp/test/Ice/stream/Test.ice
@@ -103,40 +103,17 @@ sequence<string> StringQueue;
["clr:generic:Queue"]
sequence<SmallStruct> SmallStructQueue;
-["clr:collection"]
-sequence<bool> BoolCollection;
-["clr:collection"]
-sequence<int> IntCollection;
-["clr:collection"]
-sequence<string> StringCollection;
-["clr:collection"]
-sequence<MyEnum> MyEnumCollection;
-["clr:collection"]
-sequence<SmallStruct> SmallStructCollection;
-["clr:collection"]
-sequence<MyClass> MyClassCollection;
["clr:generic:List"]
sequence<Ice::StringSeq> StringSList;
["clr:generic:Stack"]
sequence<Ice::StringSeq> StringSStack;
-#ifndef SILVERLIGHT
-# if COMPACT
-["clr:generic:SortedList"]
-dictionary<string, string> SortedStringStringD;
-# 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
{
@@ -154,9 +131,7 @@ class MyClass
MyEnumS seq9;
MyClassS seq10;
StringMyClassD d;
-#if !defined(COMPACT) && !defined(SILVERLIGHT)
SerialSmall ss;
-#endif
};
interface MyInterface
diff --git a/csharp/test/Ice/threadPoolPriority/Client.cs b/csharp/test/Ice/threadPoolPriority/Client.cs
index 54f503c3dbd..eb4f911ac78 100644
--- a/csharp/test/Ice/threadPoolPriority/Client.cs
+++ b/csharp/test/Ice/threadPoolPriority/Client.cs
@@ -8,9 +8,7 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
-using System.Collections;
[assembly: CLSCompliant(true)]
@@ -60,7 +58,7 @@ public class Client
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/threadPoolPriority/Server.cs b/csharp/test/Ice/threadPoolPriority/Server.cs
index 1a8c1c2a613..01b0638f3c7 100644
--- a/csharp/test/Ice/threadPoolPriority/Server.cs
+++ b/csharp/test/Ice/threadPoolPriority/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -43,7 +42,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/timeout/AllTests.cs b/csharp/test/Ice/timeout/AllTests.cs
index 835f5768ec2..ae6b67da28a 100644
--- a/csharp/test/Ice/timeout/AllTests.cs
+++ b/csharp/test/Ice/timeout/AllTests.cs
@@ -7,14 +7,9 @@
//
// **********************************************************************
-using System;
using System.Diagnostics;
using System.Threading;
-#if SILVERLIGHT
-using System.Windows.Controls;
-#endif
-
public class AllTests : TestCommon.TestApp
{
private class Callback
@@ -30,7 +25,7 @@ public class AllTests : TestCommon.TestApp
{
while(!_called)
{
- System.Threading.Monitor.Wait(this);
+ Monitor.Wait(this);
}
_called = false;
@@ -43,42 +38,14 @@ public class AllTests : TestCommon.TestApp
{
Debug.Assert(!_called);
_called = true;
- System.Threading.Monitor.Pulse(this);
+ Monitor.Pulse(this);
}
}
private bool _called;
}
-#if SILVERLIGHT
- public override Ice.InitializationData initData()
- {
- Ice.InitializationData initData = new Ice.InitializationData();
- initData.properties = Ice.Util.createProperties();
-
- //
- // We need to send messages large enough to cause the transport
- // buffers to fill up.
- //
- initData.properties.setProperty("Ice.MessageSizeMax", "20000");
-
- //
- // 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);
@@ -473,11 +440,6 @@ public class AllTests : TestCommon.TestApp
adapter.destroy();
}
WriteLine("ok");
-
-#if SILVERLIGHT
- timeout.shutdown();
-#else
return timeout;
-#endif
}
}
diff --git a/csharp/test/Ice/timeout/Client.cs b/csharp/test/Ice/timeout/Client.cs
index 4a73cc048d1..4a2d31b5607 100644
--- a/csharp/test/Ice/timeout/Client.cs
+++ b/csharp/test/Ice/timeout/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -61,7 +60,7 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/timeout/Server.cs b/csharp/test/Ice/timeout/Server.cs
index 55f33f19791..31e15a6e868 100644
--- a/csharp/test/Ice/timeout/Server.cs
+++ b/csharp/test/Ice/timeout/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -54,7 +53,7 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/Ice/timeout/TimeoutI.cs b/csharp/test/Ice/timeout/TimeoutI.cs
index de554d92ea5..8ebb25385cb 100644
--- a/csharp/test/Ice/timeout/TimeoutI.cs
+++ b/csharp/test/Ice/timeout/TimeoutI.cs
@@ -7,7 +7,6 @@
//
// **********************************************************************
-using System;
using System.Threading;
internal class ActivateAdapterThread
diff --git a/csharp/test/Ice/udp/Client.cs b/csharp/test/Ice/udp/Client.cs
index 09466cb310d..00f7b56c55e 100644
--- a/csharp/test/Ice/udp/Client.cs
+++ b/csharp/test/Ice/udp/Client.cs
@@ -9,7 +9,6 @@
using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -27,9 +26,9 @@ public class Client
int num;
try
{
- num = args.Length == 1 ? System.Int32.Parse(args[0]) : 0;
+ num = args.Length == 1 ? Int32.Parse(args[0]) : 0;
}
- catch(System.FormatException)
+ catch(FormatException)
{
num = 0;
}
@@ -56,9 +55,9 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -70,7 +69,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/Ice/udp/Server.cs b/csharp/test/Ice/udp/Server.cs
index f7bbe9c7ae2..49886019a36 100644
--- a/csharp/test/Ice/udp/Server.cs
+++ b/csharp/test/Ice/udp/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -26,9 +25,9 @@ public class Server
int port = 12010;
try
{
- port += args.Length == 1 ? System.Int32.Parse(args[0]) : 0;
+ port += args.Length == 1 ? Int32.Parse(args[0]) : 0;
}
- catch(System.FormatException)
+ catch(FormatException)
{
}
properties.setProperty("ControlAdapter.Endpoints", "tcp -p " + port);
@@ -85,9 +84,9 @@ public class Server
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -99,7 +98,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/IceBox/admin/AllTests.cs b/csharp/test/IceBox/admin/AllTests.cs
index c32f5e596cd..fc0938892ae 100644
--- a/csharp/test/IceBox/admin/AllTests.cs
+++ b/csharp/test/IceBox/admin/AllTests.cs
@@ -9,7 +9,6 @@
using System;
using System.Collections.Generic;
-using System.Diagnostics;
using Test;
diff --git a/csharp/test/IceBox/admin/Client.cs b/csharp/test/IceBox/admin/Client.cs
index 8687ffd392a..1d0a221becb 100644
--- a/csharp/test/IceBox/admin/Client.cs
+++ b/csharp/test/IceBox/admin/Client.cs
@@ -35,10 +35,7 @@ public class Client
{
int status = 0;
Ice.Communicator communicator = null;
-
-#if !COMPACT && !UNITY
Debug.Listeners.Add(new ConsoleTraceListener());
-#endif
try
{
@@ -48,7 +45,7 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/IceBox/configuration/Client.cs b/csharp/test/IceBox/configuration/Client.cs
index db723be1b3d..f66be79fed2 100644
--- a/csharp/test/IceBox/configuration/Client.cs
+++ b/csharp/test/IceBox/configuration/Client.cs
@@ -7,9 +7,7 @@
//
// **********************************************************************
-using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -45,9 +43,9 @@ public class Client
communicator = Ice.Util.initialize(ref args, initData);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -59,7 +57,7 @@ public class Client
}
catch (Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/IceDiscovery/simple/AllTests.cs b/csharp/test/IceDiscovery/simple/AllTests.cs
index c451cd170b0..64e6836e09e 100644
--- a/csharp/test/IceDiscovery/simple/AllTests.cs
+++ b/csharp/test/IceDiscovery/simple/AllTests.cs
@@ -10,7 +10,6 @@
using Test;
using System;
using System.Collections.Generic;
-using System.Threading;
public class AllTests
{
diff --git a/csharp/test/IceDiscovery/simple/Client.cs b/csharp/test/IceDiscovery/simple/Client.cs
index ac280869984..36e5224e7fc 100644
--- a/csharp/test/IceDiscovery/simple/Client.cs
+++ b/csharp/test/IceDiscovery/simple/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -24,9 +23,9 @@ public class Client
int num;
try
{
- num = args.Length == 1 ? System.Int32.Parse(args[0]) : 0;
+ num = args.Length == 1 ? Int32.Parse(args[0]) : 0;
}
- catch(System.FormatException)
+ catch(FormatException)
{
num = 0;
}
@@ -44,9 +43,9 @@ public class Client
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -58,7 +57,7 @@ public class Client
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/IceDiscovery/simple/Server.cs b/csharp/test/IceDiscovery/simple/Server.cs
index 1a757522949..998df8ca95d 100644
--- a/csharp/test/IceDiscovery/simple/Server.cs
+++ b/csharp/test/IceDiscovery/simple/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -26,9 +25,9 @@ public class Server
int num = 0;
try
{
- num = System.Int32.Parse(args[0]);
+ num = Int32.Parse(args[0]);
}
- catch(System.FormatException)
+ catch(FormatException)
{
}
@@ -54,9 +53,9 @@ public class Server
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -68,7 +67,7 @@ public class Server
}
catch(Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/IceGrid/simple/AllTests.cs b/csharp/test/IceGrid/simple/AllTests.cs
index c82fa9805f7..f1c781d6b7d 100644
--- a/csharp/test/IceGrid/simple/AllTests.cs
+++ b/csharp/test/IceGrid/simple/AllTests.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Threading;
using Test;
public class AllTests
@@ -147,10 +146,10 @@ public class AllTests
}
Console.Out.WriteLine("ok");
- System.Console.Out.Write("shutting down server... ");
- System.Console.Out.Flush();
+ Console.Out.Write("shutting down server... ");
+ Console.Out.Flush();
obj.shutdown();
- System.Console.Out.WriteLine("ok");
+ Console.Out.WriteLine("ok");
}
public static void
diff --git a/csharp/test/IceGrid/simple/Client.cs b/csharp/test/IceGrid/simple/Client.cs
index b2607ab696e..21eca6fe720 100644
--- a/csharp/test/IceGrid/simple/Client.cs
+++ b/csharp/test/IceGrid/simple/Client.cs
@@ -7,9 +7,7 @@
//
// **********************************************************************
-using Test;
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -54,9 +52,9 @@ public class Client
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch (System.Exception ex)
+ catch (Exception ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
@@ -68,7 +66,7 @@ public class Client
}
catch (Ice.LocalException ex)
{
- System.Console.Error.WriteLine(ex);
+ Console.Error.WriteLine(ex);
status = 1;
}
}
diff --git a/csharp/test/IceGrid/simple/Server.cs b/csharp/test/IceGrid/simple/Server.cs
index 0b67157dd8d..34713234936 100644
--- a/csharp/test/IceGrid/simple/Server.cs
+++ b/csharp/test/IceGrid/simple/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
diff --git a/csharp/test/IceGrid/simple/TestI.cs b/csharp/test/IceGrid/simple/TestI.cs
index 7715743a010..f05fd64f776 100644
--- a/csharp/test/IceGrid/simple/TestI.cs
+++ b/csharp/test/IceGrid/simple/TestI.cs
@@ -9,11 +9,6 @@
public sealed class TestI : Test.TestIntfDisp_
{
- public
- TestI()
- {
- }
-
public override void
shutdown(Ice.Current current)
{
diff --git a/csharp/test/IceSSL/configuration/Client.cs b/csharp/test/IceSSL/configuration/Client.cs
index 0003af8adf8..6154fd3dc5d 100644
--- a/csharp/test/IceSSL/configuration/Client.cs
+++ b/csharp/test/IceSSL/configuration/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -44,7 +43,7 @@ public class Client
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/IceSSL/configuration/Server.cs b/csharp/test/IceSSL/configuration/Server.cs
index 860ef58b15d..d0aed55ac65 100644
--- a/csharp/test/IceSSL/configuration/Server.cs
+++ b/csharp/test/IceSSL/configuration/Server.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Reflection;
[assembly: CLSCompliant(true)]
@@ -41,7 +40,7 @@ public class Server
communicator = Ice.Util.initialize(ref args);
status = run(args, communicator);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
Console.Error.WriteLine(ex);
status = 1;
diff --git a/csharp/test/IceUtil/inputUtil/Client.cs b/csharp/test/IceUtil/inputUtil/Client.cs
index 439c1810cd5..eda4b88b917 100644
--- a/csharp/test/IceUtil/inputUtil/Client.cs
+++ b/csharp/test/IceUtil/inputUtil/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
public class Client
{
@@ -22,8 +21,8 @@ public class Client
public static void Main(string[] argvs)
{
- System.Console.Out.Write("testing string to command line arguments... ");
- System.Console.Out.Flush();
+ Console.Out.Write("testing string to command line arguments... ");
+ Console.Out.Flush();
string[] args;
try
@@ -104,10 +103,10 @@ public class Client
}
}
- System.Console.Out.WriteLine("ok");
+ Console.Out.WriteLine("ok");
- System.Console.Out.Write("checking string splitting... ");
- System.Console.Out.Flush();
+ Console.Out.Write("checking string splitting... ");
+ Console.Out.Flush();
{
string[] arr;
@@ -163,6 +162,6 @@ public class Client
test(IceUtilInternal.StringUtil.splitString("a\"b", ":") == null);
}
- System.Console.Out.WriteLine("ok");
+ Console.Out.WriteLine("ok");
}
}
diff --git a/csharp/test/Slice/keyword/Client.cs b/csharp/test/Slice/keyword/Client.cs
index 818d7106084..168f0e9063e 100644
--- a/csharp/test/Slice/keyword/Client.cs
+++ b/csharp/test/Slice/keyword/Client.cs
@@ -126,10 +126,6 @@ public class Client
f1.@default();
}
test(f1 == null);
- @abstract.@extern l = new @abstract.@extern();
- test(l != null);
- @abstract.@finally g = new @abstract.@finally();
- test(g != null);
Dictionary<string, @abstract.@break> g2 = new Dictionary<string, @abstract.@break>();
test(g2 != null);
@abstract.@fixed h = new @abstract.@fixed();
diff --git a/csharp/test/Slice/keyword/Key.ice b/csharp/test/Slice/keyword/Key.ice
index c14cb9b47bc..fb93dc2b69d 100644
--- a/csharp/test/Slice/keyword/Key.ice
+++ b/csharp/test/Slice/keyword/Key.ice
@@ -39,18 +39,15 @@ class delegate
class explicit extends delegate implements decimal, case
{
};
-["clr:collection"] sequence<as> extern;
+
dictionary<string, break> while;
-["clr:collection"] dictionary<string, as> finally;
class optionalMembers
{
optional(1) break for;
optional(2) as goto;
optional(3) explicit if;
- optional(4) extern catch;
optional(5) while internal;
- optional(6) finally is;
optional(7) string namespace;
optional(8) explicit* null;
};
@@ -59,35 +56,27 @@ interface optionalParams
{
optional(1) break for(optional(2) as goto,
optional(3) explicit if,
- optional(4) extern catch,
optional(5) while internal,
- optional(6) finally is,
optional(7) string namespace,
optional(8) explicit* null);
["amd"]
optional(1) break continue(optional(2) as goto,
optional(3) explicit if,
- optional(4) extern catch,
optional(5) while internal,
- optional(6) finally is,
optional(7) string namespace,
optional(8) explicit* null);
optional(1) break in(out optional(2) as goto,
out optional(3) explicit if,
- out optional(4) extern catch,
out optional(5) while internal,
- out optional(6) finally is,
out optional(7) string namespace,
out optional(8) explicit* null);
["amd"]
optional(1) break foreach(out optional(2) as goto,
out optional(3) explicit if,
- out optional(4) extern catch,
out optional(5) while internal,
- out optional(6) finally is,
out optional(7) string namespace,
out optional(8) explicit* null);
};
diff --git a/csharp/test/Slice/structure/Client.cs b/csharp/test/Slice/structure/Client.cs
index 79aefd596d3..ca183624e32 100644
--- a/csharp/test/Slice/structure/Client.cs
+++ b/csharp/test/Slice/structure/Client.cs
@@ -8,7 +8,6 @@
// **********************************************************************
using System;
-using System.Diagnostics;
using System.Collections.Generic;
using Test;
@@ -18,7 +17,7 @@ public class Client
{
if(!b)
{
- throw new System.Exception();
+ throw new Exception();
}
}
@@ -33,10 +32,10 @@ public class Client
C def_cls = new C(5);
S1 def_s = new S1("name");
string[] def_ss = new string[]{ "one", "two", "three" };
- IntList def_il = new IntList();
- def_il.Add(1);
- def_il.Add(2);
- def_il.Add(3);
+ int[] def_il = new int[3];
+ def_il[0] = 1;
+ def_il[1] = 2;
+ def_il[2] = 3;
Dictionary<string, string> def_sd = new Dictionary<string, string>();
def_sd.Add("abc", "def");
Ice.ObjectPrx def_prx = communicator.stringToProxy("test");
@@ -147,11 +146,11 @@ public class Client
S2 v1, v2;
v1 = (S2)def_s2.Clone();
- v1.il = (IntList)def_s2.il.Clone();
+ v1.il = (int[])def_s2.il.Clone();
test(v1.Equals(def_s2));
v1 = (S2)def_s2.Clone();
- v1.il = new IntList();
+ v1.il = new int[3] { 0, 0, 0};
test(!v1.Equals(def_s2));
v1 = (S2)def_s2.Clone();
diff --git a/csharp/test/Slice/structure/Test.ice b/csharp/test/Slice/structure/Test.ice
index 0d26449d2a0..e4ea700992b 100644
--- a/csharp/test/Slice/structure/Test.ice
+++ b/csharp/test/Slice/structure/Test.ice
@@ -11,7 +11,7 @@ module Test
{
sequence<string> StringSeq;
-["clr:collection"] sequence<int> IntList;
+sequence<int> IntList;
dictionary<string, string> StringDict;
class C
diff --git a/csharp/test/TestCommon/TestApp.cs b/csharp/test/TestCommon/TestApp.cs
index 277c1c42761..cf4b394db6e 100644
--- a/csharp/test/TestCommon/TestApp.cs
+++ b/csharp/test/TestCommon/TestApp.cs
@@ -8,19 +8,7 @@
// **********************************************************************
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
+using System.Diagnostics;
namespace TestCommon
{
@@ -30,123 +18,25 @@ namespace TestCommon
{
if(!b)
{
- System.Diagnostics.Debug.Assert(false);
- throw new System.Exception();
+ Debug.Assert(false);
+ throw new Exception();
}
}
-#if !SILVERLIGHT
- static
-#endif
- public void Write(string msg)
+
+ public static 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)
+ public static void WriteLine(string msg)
{
-#if SILVERLIGHT
Console.Out.WriteLine(msg);
-#else
- Console.Out.WriteLine(msg);
-#endif
}
-#if !SILVERLIGHT
- static
-#endif
- public void Flush()
+ public static 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
}
}