summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/exceptions
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/test/Ice/exceptions
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/test/Ice/exceptions')
-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
6 files changed, 14 insertions, 67 deletions
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)