summaryrefslogtreecommitdiff
path: root/csharp/src/Ice/PropertiesAdminI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/Ice/PropertiesAdminI.cs')
-rw-r--r--csharp/src/Ice/PropertiesAdminI.cs39
1 files changed, 16 insertions, 23 deletions
diff --git a/csharp/src/Ice/PropertiesAdminI.cs b/csharp/src/Ice/PropertiesAdminI.cs
index 84f209efa2f..5fa6a69064a 100644
--- a/csharp/src/Ice/PropertiesAdminI.cs
+++ b/csharp/src/Ice/PropertiesAdminI.cs
@@ -7,6 +7,7 @@
//
// **********************************************************************
+using System;
using System.Collections.Generic;
namespace Ice
@@ -29,10 +30,10 @@ namespace IceInternal
{
sealed class PropertiesAdminI : Ice.PropertiesAdminDisp_, Ice.NativePropertiesAdmin
{
- internal PropertiesAdminI(Ice.Properties properties, Ice.Logger logger)
+ internal PropertiesAdminI(Instance instance)
{
- _properties = properties;
- _logger = logger;
+ _properties = instance.initializationData().properties;
+ _logger = instance.initializationData().logger;
}
public override string
@@ -40,16 +41,15 @@ namespace IceInternal
{
return _properties.getProperty(name);
}
-
+
public override Dictionary<string, string>
getPropertiesForPrefix(string name, Ice.Current current)
{
return _properties.getPropertiesForPrefix(name);
}
-
- public override void setProperties_async(Ice.AMD_PropertiesAdmin_setProperties cb,
- Dictionary<string, string> props,
- Ice.Current current)
+
+ public override void
+ setProperties(Dictionary<string, string> props, Ice.Current current)
{
lock(this)
{
@@ -177,19 +177,8 @@ namespace IceInternal
_properties.setProperty(e.Key, "");
}
- //
- // Send the response now so that we do not block the client during the call to the update callback.
- //
- cb.ice_response();
-
if(_updateCallbacks.Count > 0)
{
- //
- // Copy the callbacks to allow callbacks to update the callbacks.
- //
- List<Ice.PropertiesAdminUpdateCallback> callbacks =
- new List<Ice.PropertiesAdminUpdateCallback>(_updateCallbacks);
-
Dictionary<string, string> changes = new Dictionary<string, string>(added);
foreach(KeyValuePair<string, string> e in changed)
{
@@ -199,16 +188,20 @@ namespace IceInternal
{
changes.Add(e.Key, e.Value);
}
-
- foreach(Ice.PropertiesAdminUpdateCallback callback in callbacks)
+
+ // Copy callbacks to allow callbacks to update callbacks
+ foreach(var callback in new List<Ice.PropertiesAdminUpdateCallback>(_updateCallbacks))
{
try
{
callback.updated(changes);
}
- catch(System.Exception)
+ catch(Exception ex)
{
- // Ignore.
+ if(_properties.getPropertyAsIntWithDefault("Ice.Warn.Dispatch", 1) > 1)
+ {
+ _logger.warning("properties admin update callback raised unexpected exception:\n" + ex);
+ }
}
}
}