< Summary

Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 23
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
Dispose()100%110%
Finalize()100%110%

File(s)

https://raw.githubusercontent.com/dotnet/runtime/811a7eabb75c42db53440e8ba3f60c07511cfd1f/src/libraries/System.Reflection.Metadata/src/System/Reflection/Internal/Utilities/CriticalDisposableObject.cs

#LineLine coverage
 1// Licensed to the .NET Foundation under one or more agreements.
 2// The .NET Foundation licenses this file to you under the MIT license.
 3using System.Runtime.ConstrainedExecution;
 4
 5namespace System.Reflection.Internal
 6{
 7    internal abstract class CriticalDisposableObject : CriticalFinalizerObject, IDisposable
 8    {
 9        protected abstract void Release();
 10
 11        public void Dispose()
 012        {
 013            Release();
 014            GC.SuppressFinalize(this);
 015        }
 16
 17        ~CriticalDisposableObject()
 018        {
 019            Release();
 020        }
 21    }
 22}
 23

Methods/Properties

Dispose()
Finalize()