summaryrefslogtreecommitdiff
path: root/csharp/src/IceBox/ServiceManagerI.cs
diff options
context:
space:
mode:
Diffstat (limited to 'csharp/src/IceBox/ServiceManagerI.cs')
-rw-r--r--csharp/src/IceBox/ServiceManagerI.cs41
1 files changed, 20 insertions, 21 deletions
diff --git a/csharp/src/IceBox/ServiceManagerI.cs b/csharp/src/IceBox/ServiceManagerI.cs
index 34cf7a953d5..17757974413 100644
--- a/csharp/src/IceBox/ServiceManagerI.cs
+++ b/csharp/src/IceBox/ServiceManagerI.cs
@@ -210,7 +210,6 @@ class ServiceManagerI : ServiceManagerDisp_
//
// Null observers and duplicate registrations are ignored
//
-
lock(this)
{
if(observer != null)
@@ -520,7 +519,7 @@ class ServiceManagerI : ServiceManagerDisp_
}
}
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
FailureException e = new FailureException(ex);
e.reason = err + "unable to load assembly: " + assemblyName;
@@ -530,12 +529,12 @@ class ServiceManagerI : ServiceManagerDisp_
//
// Instantiate the class.
//
- System.Type c = null;
+ Type c = null;
try
{
c = serviceAssembly.GetType(className, true);
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
FailureException e = new FailureException(ex);
e.reason = err + "GetType failed for '" + className + "'";
@@ -640,11 +639,11 @@ class ServiceManagerI : ServiceManagerDisp_
{
try
{
- Object[] parameters = new Object[1];
+ object[] parameters = new object[1];
parameters[0] = _communicator;
info.service = (Service)ci.Invoke(parameters);
}
- catch(System.MethodAccessException ex)
+ catch(MethodAccessException ex)
{
FailureException e = new FailureException(ex);
e.reason = err + "unable to access service constructor " + className + "(Ice.Communicator)";
@@ -666,7 +665,7 @@ class ServiceManagerI : ServiceManagerDisp_
throw e;
}
}
- catch(System.UnauthorizedAccessException ex)
+ catch(UnauthorizedAccessException ex)
{
FailureException e = new FailureException(ex);
e.reason = err + "unauthorized access to default service constructor for " + className;
@@ -678,7 +677,7 @@ class ServiceManagerI : ServiceManagerDisp_
{
throw;
}
- catch(System.InvalidCastException ex)
+ catch(InvalidCastException ex)
{
FailureException e = new FailureException(ex);
e.reason = err + "service does not implement IceBox.Service";
@@ -686,7 +685,7 @@ class ServiceManagerI : ServiceManagerDisp_
}
catch(System.Reflection.TargetInvocationException ex)
{
- if(ex.InnerException is IceBox.FailureException)
+ if(ex.InnerException is FailureException)
{
throw ex.InnerException;
}
@@ -697,7 +696,7 @@ class ServiceManagerI : ServiceManagerDisp_
throw e;
}
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
FailureException e = new FailureException(ex);
e.reason = err + "exception in service constructor " + className;
@@ -713,7 +712,7 @@ class ServiceManagerI : ServiceManagerDisp_
{
throw;
}
- catch(System.Exception ex)
+ catch(Exception ex)
{
FailureException e = new FailureException(ex);
e.reason = "exception while starting service " + service;
@@ -723,7 +722,7 @@ class ServiceManagerI : ServiceManagerDisp_
info.status = ServiceStatus.Started;
_services.Add(info);
}
- catch(System.Exception)
+ catch(Exception)
{
if(info.communicator != null)
{
@@ -763,7 +762,7 @@ class ServiceManagerI : ServiceManagerDisp_
info.service.stop();
stoppedServices.Add(info.name);
}
- catch(System.Exception e)
+ catch(Exception e)
{
_logger.warning("IceBox.ServiceManager: exception while stopping service " + info.name + ":\n" +
e.ToString());
@@ -784,7 +783,7 @@ class ServiceManagerI : ServiceManagerDisp_
{
_sharedCommunicator.destroy();
}
- catch(System.Exception e)
+ catch(Exception e)
{
_logger.warning("ServiceManager: exception while destroying shared communicator:\n" + e.ToString());
}
@@ -796,7 +795,7 @@ class ServiceManagerI : ServiceManagerDisp_
}
}
- private void servicesStarted(List<String> services, Dictionary<ServiceObserverPrx, bool>.KeyCollection observers)
+ private void servicesStarted(List<string> services, Dictionary<ServiceObserverPrx, bool>.KeyCollection observers)
{
//
// Must be called with 'this' unlocked
@@ -849,7 +848,7 @@ class ServiceManagerI : ServiceManagerDisp_
}
}
- private void observerRemoved(ServiceObserverPrx observer, System.Exception ex)
+ private void observerRemoved(ServiceObserverPrx observer, Exception ex)
{
if(_traceServiceObserver >= 1)
{
@@ -938,7 +937,7 @@ class ServiceManagerI : ServiceManagerDisp_
public string[] args;
}
- private Ice.Properties createServiceProperties(String service)
+ private Ice.Properties createServiceProperties(string service)
{
Ice.Properties properties;
Ice.Properties communicatorProperties = _communicator.getProperties();
@@ -956,7 +955,7 @@ class ServiceManagerI : ServiceManagerDisp_
properties = Ice.Util.createProperties();
}
- String programName = communicatorProperties.getProperty("Ice.ProgramName");
+ string programName = communicatorProperties.getProperty("Ice.ProgramName");
if(programName.Length == 0)
{
properties.setProperty("Ice.ProgramName", service);
@@ -984,7 +983,7 @@ class ServiceManagerI : ServiceManagerDisp_
// the communicator for its own reasons.
//
}
- catch(System.Exception e)
+ catch(Exception e)
{
_logger.warning("ServiceManager: exception while shutting down communicator for service "
+ service + "\n" + e.ToString());
@@ -996,7 +995,7 @@ class ServiceManagerI : ServiceManagerDisp_
{
communicator.destroy();
}
- catch(System.Exception e)
+ catch(Exception e)
{
_logger.warning("ServiceManager: exception while destroying communicator for service "
+ service + "\n" + e.ToString());
@@ -1024,7 +1023,7 @@ class ServiceManagerI : ServiceManagerDisp_
if(facetNames.Count > 0)
{
// TODO: need String.Join with escape!
- properties.setProperty("Ice.Admin.Facets", String.Join(" ", facetNames.ToArray()));
+ properties.setProperty("Ice.Admin.Facets", string.Join(" ", facetNames.ToArray()));
}
return true;
}