diff options
author | Bernard Normier <bernard@zeroc.com> | 2020-04-09 18:57:08 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2020-04-09 18:57:08 -0400 |
commit | 038f547d2d1558943b8efd97f359f01c280b42c1 (patch) | |
tree | 8d7056d538216ef5d6c07ff63392357fa41a7ff0 | |
parent | Endpoint cleanup in C# (#786) (diff) | |
download | ice-038f547d2d1558943b8efd97f359f01c280b42c1.tar.bz2 ice-038f547d2d1558943b8efd97f359f01c280b42c1.tar.xz ice-038f547d2d1558943b8efd97f359f01c280b42c1.zip |
Cleanup default Process admin facet
-rw-r--r-- | csharp/src/Ice/Communicator.cs | 2 | ||||
-rw-r--r-- | csharp/src/Ice/Process.cs | 25 |
2 files changed, 12 insertions, 15 deletions
diff --git a/csharp/src/Ice/Communicator.cs b/csharp/src/Ice/Communicator.cs index c468efa0b08..d023bfd4b40 100644 --- a/csharp/src/Ice/Communicator.cs +++ b/csharp/src/Ice/Communicator.cs @@ -502,7 +502,7 @@ namespace Ice string processFacetName = "Process"; if (_adminFacetFilter.Count == 0 || _adminFacetFilter.Contains(processFacetName)) { - _adminFacets.Add(processFacetName, new IceInternal.Process(this)); + _adminFacets.Add(processFacetName, new Process(this)); } // diff --git a/csharp/src/Ice/Process.cs b/csharp/src/Ice/Process.cs index f2ed41cbc85..93d4ac9fcd9 100644 --- a/csharp/src/Ice/Process.cs +++ b/csharp/src/Ice/Process.cs @@ -2,31 +2,28 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // -namespace IceInternal +namespace Ice { - public sealed class Process : Ice.IProcess + // Default implementation of the Process Admin facet. + internal sealed class Process : IProcess { - public Process(Ice.Communicator communicator) => _communicator = communicator; + private readonly Communicator _communicator; - public void Shutdown(Ice.Current current) => _communicator.Shutdown(); + public void Shutdown(Current current) => _communicator.Shutdown(); - public void WriteMessage(string message, int fd, Ice.Current current) + public void WriteMessage(string message, int fd, Current current) { switch (fd) { case 1: - { - System.Console.Out.WriteLine(message); - break; - } + System.Console.Out.WriteLine(message); + break; case 2: - { - System.Console.Error.WriteLine(message); - break; - } + System.Console.Error.WriteLine(message); + break; } } - private readonly Ice.Communicator _communicator; + internal Process(Communicator communicator) => _communicator = communicator; } } |