< Summary

Information
Class: Ice.LoggerPlugin
Assembly: Ice
File(s): /_/csharp/src/Ice/LoggerPlugin.cs
Tag: 91_21789722663
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 36
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
0%
Covered methods: 0
Total methods: 3
Method coverage: 0%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
initialize()100%210%
destroy()100%210%

File(s)

/_/csharp/src/Ice/LoggerPlugin.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3#nullable enable
 4
 5namespace Ice;
 6
 7/// <summary>
 8/// A special plug-in that installs a logger during a communicator's initialization.
 9/// Both initialize and destroy are no-op.
 10/// </summary>
 11public class LoggerPlugin : Plugin
 12{
 13    /// <summary>
 14    /// Initializes a new instance of the <see cref="LoggerPlugin" /> class. This constructor installs a custom logger
 15    /// in the provided <paramref name="communicator" />. The communicator takes ownership of <paramref name="logger" />
 16    /// and is responsible for disposing it when the communicator is destroyed.
 17    /// </summary>
 18    /// <param name="communicator">The communicator in which to install the logger.</param>
 19    /// <param name="logger">The logger to install.</param>
 020    public
 021    LoggerPlugin(Communicator communicator, Logger logger) => communicator.instance.setLogger(logger);
 22
 23    /// <summary>
 24    /// This method is no-op.
 25    /// </summary>
 26    public void initialize()
 27    {
 028    }
 29
 30    /// <summary>
 31    /// This method is no-op.
 32    /// </summary>
 33    public void destroy()
 34    {
 035    }
 36}