summaryrefslogtreecommitdiff
path: root/csharp/test/Ice/plugin/PluginThreeFailFactory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/test/Ice/plugin/PluginThreeFailFactory.cs')
-rw-r--r--csharp/test/Ice/plugin/PluginThreeFailFactory.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/csharp/test/Ice/plugin/PluginThreeFailFactory.cs b/csharp/test/Ice/plugin/PluginThreeFailFactory.cs
new file mode 100644
index 00000000000..e2d20165f3f
--- /dev/null
+++ b/csharp/test/Ice/plugin/PluginThreeFailFactory.cs
@@ -0,0 +1,47 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2015 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;
+
+public class PluginThreeFailFactory : Ice.PluginFactory
+{
+ public Ice.Plugin create(Ice.Communicator communicator, string name, string[] args)
+ {
+ return new PluginThreeFail(communicator);
+ }
+
+ internal class PluginThreeFail : BasePluginFail
+ {
+ public PluginThreeFail(Ice.Communicator communicator) : base(communicator)
+ {
+ }
+
+ public override void initialize()
+ {
+ throw new PluginInitializeFailException();
+ }
+
+ public override void destroy()
+ {
+ test(false);
+ }
+
+ ~PluginThreeFail()
+ {
+ if(_initialized)
+ {
+ Console.WriteLine("PluginThreeFail was initialized");
+ }
+ if(_destroyed)
+ {
+ Console.WriteLine("PluginThreeFail was destroyed");
+ }
+ }
+ }
+}