04 Jul 2024 11:53:22

Dependency Graph

- This diagram represents the Graph of Dependencies between the .NET assemblies of your application.
- This static diagram can be useful but it is just a coarse view of your application architecture.
- It is recommended to use the NDepend interactive Dependency Graph and interactive Dependency Matrix found in the NDepend UI for an in-depth exploration of the actual architecture of your code.

Online documentation:

- NDepend Interactive Dependency Graph
- NDepend Interactive Dependency Matrix

Dependency Matrix

- This diagram represents the DSM (Dependency Structure Matrix) beetween the .NET assemblies of your application.
- The Dependency Matrix is a compact way to represent and navigate across dependencies between components.
- The number on cells of the Dependency Matrix included in the report, represent the number of types involved in the coupling
- It is recommended to use the NDepend interactive Dependency Matrix and interactive Dependency Graph found in the NDepend UI for an in-depth exploration of the actual architecture of your code.

Online documentation:

- NDepend Interactive Dependency Matrix
- NDepend Interactive Dependency Graph

Visualizing Code Metrics through Treemaping

- In this Metric View, the code base is represented through a Treemap.
- Treemapping is a method for displaying tree-structured data by using nested rectangles.
- In the present treemap, each rectangle represents a method and the area of a rectangle is proportional to the number of lines of code of the corresponding method.
- It is recommended to use the NDepend interactive Metric View found in the NDepend UI for an in-depth code metrics exploration.

With the Online documentation, understand how Treemaping can help you see patterns in your code base, that would be hard to spot with other ways.

- Visualizing Code Metrics with Treemap

Abstractness versus Instability Diagram

The Abstractness versus Instability Diagram helps to detect which assemblies are potentially painful to maintain (i.e concrete and stable) and which assemblies are potentially useless (i.e abstract and instable).

- Abstractness: If an assembly contains many abstract types (i.e interfaces and abstract classes) and few concrete types, it is considered as abstract.
- Instability: An assembly is considered stable if its types are used by a lot of types from other assemblies. In this context stable means painful to modify.

Online documentation:

- Definitions of related Code Metrics

For beginners: Where to start

- The Issues tab makes it easy to identify the source files with most issues and most technical debt.
- Write clean code from now on: The first analysis result of your project is considered as the baseline. Continue your development and further analysis results will be compared against the baseline. In all tabs new issues introduced on new and refactored classes will be highlighted. This will be the issues to fix first.
- Import test coverage data to assess possible improvements in your testing strategy .
- Watch the series of 4mn videos about various NDepend features.
- Discover the most typical use-cases.
- In addition to the NDepend report, use the interactive UI through the standalone executable VisualNDepend.exe, or through the Visual Studio NDepend extension. With the interactive UI, browse more detailed data and have Rules checking updated each time the code is modified and recompiled.
- The baseline, the analysis execution and the report options settings are customizable through the interactive UI, in the panel Project Properties.

Code queries and rules results are truncated to list a maximum of 20 code elements in this report

- To enable or disable this setting, there is a tickbox labelled Don't show more than 20 matched items for a Rule violated in the NDepend Project Properties panel > Report tab > Avoid too big report for large code base section
- This setting is enabled by default to avoid to have too large reports when analyzing large code bases.

Does this report gets too large?

- There is a setting enabled by default to avoid to have too large reports when analyzing large code bases.
- To enable or disable this setting, there is a tick-box labelled Don't show more than 100 matched items for a Rule violated in the NDepend Project Properties panel > Report tab > Avoid too big report for large code base section

report date | 04 Jul 2024 11:53:22
analysis duration | 00:05.663
ndepend version | 2024.1.1 Professional Developer/Build-Machine Edition
baseline | Baseline is same code base snapshot.
code coverage data | Not Defined. To import Code Coverage Data, please read this online documentation.

Get started.Documentation.

#### Diagrams

Dependency Graph
View as ?fullscaled
Dependency Matrix
View as ?fullscaled
Treemap Metric View
View as ?fullscaled
Abstractness vs. Instability
View ? controlimage

#### Application Metrics

Note: Further Application Statistics are available.

# Lines of Code

213 |  | no diff

0 (NotMyCode) |  | no diff

Estimated Dev Effort 5.49d |  | no diff

# Types

5 |  | no diff

1 Assemblies |  | no diff

4 Namespaces |  | no diff

14 Methods |  | no diff

0 Fields |  | no diff

8 Source Files |  | no diff

586 Line Feed |  | no diff

220 Third-Party Elements |  | no diff

Comment

35.84% |  | no diff

119 Lines of Comment |  | no diff

Debt

6.64% |  | no diff

Rating |  | B |  | 43min effort to reach |  | A

Debt 2h 55min |  | no diff

The technical-debt is incomplete because no coverage data specified. |  |

CoverageN/A because no coverage data specified

Method Complexity (IL)

34 Max |  | no diff

4.77 Average |  | no diff

Quality Gates

| Fail | 0 |  |

| Warn | 0 |  |

| Pass | 12 |  |

Rules

| Critical | 0 |  |

| Violated | 8 |  |

| Ok | 158 |  |

Issues

| All | 19 |  |

| Blocker | 0 |  |

| Critical | 0 |  |

| High | 6 |  |

| Medium | 5 |  |

| Low | 8 |  |

| Suppressed | 0 |  |

0

- The number of projects with no issues.
- Sort the column #Un-resolved ascending to list these files first.

1

- The number of projects with at least one unresolved issue but no new issue added since the baseline.
- Sort the column #Un-resolved Issues to list these files first.

0

- The number of projects with at least one new issue introduced since the baseline.
- Sort the column #New Issues to list these files first.

Clicking a project's name selects its associated source files under the Issues tab.
This occurs because the search pattern for the source files grid is set to the project's name.

Project Name | #New Issues | #Un- resolved | #Fixed | New Debt | Debt | %Cov | #Types | #Statements
--- | --- | --- | --- | --- | --- | --- | --- | ---
ClearstreamAPIConnector | 0 | 19 | 0 | 0min 0s | 2h 55min | N/A | 9 | 213

12 pass

- The number of Quality Gates that pass.
- A Quality Gate passes if its value is lower than its warning threshold, and lower than its failure threshold.

0 warn

- The number of Quality Gates that warn.
- A Quality Gate warns if its value is equal to or higher than its warning threshold, but lower than its failure threshold.

0 fail

- The number of Quality Gates that fail.
- A Quality Gate fails if its value is equal to or higher than its failure threshold. If any, it means that the code is not ready for production. You have the option to stop the build process upon any Quality Gate failure.

Quality Gates that measure diff cannot
be run on the baseline. Hence they
have blank trend and baseline value.

Name | Trend | Baseline Status | Status | Group
--- | --- | --- | --- | ---

|  | Percentage Coverage

N/A %

N/A %

Quality Gates

|  | Percentage Coverage on New Code

N/A %

N/A %

Quality Gates

|  | Percentage Coverage on Refactored Code

N/A %

N/A %

Quality Gates

|  | Blocker Issues

0 issues

0 issues

Quality Gates

|  | Critical Issues

0 issues

0 issues

Quality Gates

|  | New Blocker / Critical / High Issues

0 issues

Quality Gates

|  | Critical Rules Violated

0 rules

0 rules

Quality Gates

|  | Treat Compiler Warnings as Error

0 issues

0 issues

Quality Gates

|  | Percentage Debt

6.64 %

6.64 %

Quality Gates

|  | New Debt since Baseline

0 man-days

Quality Gates

|  | Debt Rating per Namespace

0 namespaces

0 namespaces

Quality Gates

|  | New Annual Interest since Baseline

0 man-days

Quality Gates

158 pass

- The number of CQLinq rules that are not violated. Those rules are not listed below.
- Notice that Roslyn Analyzers that pass are not imported. Thus, they are not counted in this number.

8 violated The number of CQLinq rules and Roslyn Analyzers that are violated. They are listed below.0 violated

- The number of CQLinq rules marked as critical that are violated. They are listed below with a top-left red tick.
- By sorting the first column, violated critical rules can be listed first.

- Rules can also be checked live at development-time, from within the IDE Online documentation.
- Rules that rely on diff cannot be run on the baseline. Hence, they have blank values in column #New Issues or Fixed.
- Number of Rules or Queries with Error (syntax error, exception thrown, time-out): 0

| Id | Name | #New Issues | Un- resolved | Fixed | New Debt | Debt | Category
--- | --- | --- | --- | --- | --- | --- | --- | ---
01 | ND2100 ● | Avoid referencing source file out of the project directory | 0 | |m100|0| 4 | 0 | 0min 0s | |m43|1| 40min | Source Files Organization
01 | ND3103 ● | Don't disable certificate validation | 0 | |m66|1| 3 | 0 | 0min 0s | |m100|0| 1h 30min | Security
01 | ND1807 ● | Avoid public methods not publicly visible | 0 | |m66|2| 3 | 0 | 0min 0s | |m0|7| 1min 30s | Visibility
01 | ND1203 ● | Class with no descendant should be sealed if possible | 0 | |m66|3| 3 | 0 | 0min 0s | |m0|6| 1min 30s | Object Oriented Design
01 | ND1701 ● | Potentially Dead Methods | 0 | |m66|4| 3 | 0 | 0min 0s | |m32|2| 30min | Dead Code
01 | ND2104 ● | Types with source files stored in the same directory, should be declared in the same namespace | 0 | |m0|5| 1 | 0 | 0min 0s | |m6|3| 7min | Source Files Organization
01 | ND1803 ● | Types that could be declared as private, nested in a parent type | 0 | |m0|6| 1 | 0 | 0min 0s | |m1|4| 3min 0s | Visibility
01 | ND1307 ● | Declare types in namespaces | 0 | |m0|7| 1 | 0 | 0min 0s | |m0|5| 2min 0s | Design

#### Size

#### % Coverage and % Debt

#### Issues

#### Rules

#### Quality Gates

#### Debt

#### Analysis Logs

Logs emitted during NDepend analysis.

Warnings can reveal potential flaws concerning the health of the build process.

A particular warning can be disabled through the NDepend interactive UI, panel Error List, tick the checkbox Disabled corresponding to the warning to disable.

| Message
--- | ---
| Begin full analysis with NDepend v2024.1.1 on 04 Jul 2024 11:53:22
| Visual Studio solution file resolved to absolute file path: from {.\ClearstreamAPIConnector.sln} to {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.sln}
| Output directory resolved to absolute directory path: C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\NDependOut
| .NET Assembly resolved from the Visual Studio solution file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.sln} C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\bin\Debug\net7.0\ClearstreamAPIConnector.dll
| No .NET Assembly filtered out from the Visual Studio solution file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.sln}.
| Concurrent mode
| The source file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\DiTemplate.cs} (last modified 26 Jun 2024 08:42:44) and the PDB file of the assembly {ClearstreamAPIConnector} (last modified 18 Aug 2023 12:45:55) are not in-sync.
| The source file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\LoggingHandler.cs} (last modified 26 Jun 2024 08:42:44) and the PDB file of the assembly {ClearstreamAPIConnector} (last modified 18 Aug 2023 12:45:55) are not in-sync.
| The source file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\Program.cs} (last modified 26 Jun 2024 08:42:44) and the PDB file of the assembly {ClearstreamAPIConnector} (last modified 18 Aug 2023 12:45:55) are not in-sync.
| The source file {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\Token.cs} (last modified 26 Jun 2024 08:42:44) and the PDB file of the assembly {ClearstreamAPIConnector} (last modified 18 Aug 2023 12:45:55) are not in-sync.
| 4 source files parsed ; 4 source files not found ; 4 source files not in-sync with PDB
| 0 code rule has been extracted from code.
| No issue have been imported. No directory that contains issue files have been resolved from the project ClearstreamAPIConnector
| No dependency cycle detected in assemblies referencement graph.
| Do merge code generated by compiler into application code.
| Analyze dependencies of your application.
| No SuppressMessageAttribute found in the analyzed code base. Since NDepend v2018.2 SuppressMessageAttribute can be used to suppress NDepend issues. Don't forget to set in your projects the compilation symbol CODE_ANALYSIS to use this attribute to suppress NDepend issues.
| Persisting code model snapshot in {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\NDependOut\NDependAnalysisResult_ClearstreamAPIConnector_2024Jul04_11h53m22.ndar}
| The source directory {C:\Users\johan\OneDrive\DEV\ClearstreamAPIConnector} referenced by the PDB file of the assembly {ClearstreamAPIConnector} can't be found.
| Log trend metrics values.
| Rule {From now, all types added should be 100% covered by tests} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {From now, all types added should be 100% covered by tests} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Avoid decreasing code coverage by tests of types} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Avoid decreasing code coverage by tests of types} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Code should be tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Code should be tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {New Types and Methods should be tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {New Types and Methods should be tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Methods refactored should be tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Methods refactored should be tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Assemblies and Namespaces should be tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Assemblies and Namespaces should be tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Types almost 100% tested should be 100% tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Types almost 100% tested should be 100% tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Namespaces almost 100% tested should be 100% tested} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Namespaces almost 100% tested should be 100% tested} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Types that used to be 100% covered by tests should still be 100% covered} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Types that used to be 100% covered by tests should still be 100% covered} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Types tagged with FullCoveredAttribute should be 100% covered} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Types tagged with FullCoveredAttribute should be 100% covered} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Types 100% covered should be tagged with FullCoveredAttribute} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Types 100% covered should be tagged with FullCoveredAttribute} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Methods should have a low C.R.A.P score} relies on code coverage data that is not available in the baseline code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Rule {Methods should have a low C.R.A.P score} relies on code coverage data that is not available in the newer code base snapshot. The rule hasen't been executed on both baseline and newer code base snapshots.
| Quality Gate {Percentage Coverage} relies on code coverage data that is not available in the baseline code base snapshot.
| Quality Gate {Percentage Coverage} relies on code coverage data that is not available in the newer code base snapshot.
| Quality Gate {Percentage Coverage on New Code} relies on code coverage data that is not available in the baseline code base snapshot.
| Quality Gate {Percentage Coverage on New Code} relies on code coverage data that is not available in the newer code base snapshot.
| Quality Gate {Percentage Coverage on Refactored Code} relies on code coverage data that is not available in the baseline code base snapshot.
| Quality Gate {Percentage Coverage on Refactored Code} relies on code coverage data that is not available in the newer code base snapshot.
| Execute queries and rules
| Output report source files
| The baseline versions of source files modified are not available in the report. Reason: Cannot find the file {SourceFiles.zip} in the analysis result directory {C:\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\NDependOut}. Make sure that the NDepend Project Properties > Analysis > Zip Source Files setting is enabled.
| Output report projects
| Building the report (standard).
| NDepend analysis done. Duration: 00:05.663

#### Application Statistics

Stat | # Occurences | Avg | StdDev | Max
--- | --- | --- | --- | ---
Properties on interfaces | interfaces | 0 | 0 | -1 properties on
Methods on interfaces | interfaces | 0 | 0 | -1 methods on
Arguments on methods on interfaces | methods | 0 | 0 | -1 arguments on
Public properties on classes | 9 Classes | 1.56 | 3.24 | 10 public properties on TestClearstreamAPIEndpoint.DiTemplate
Public methods on classes | 9 classes | 4.22 | 6.43 | 21 public methods on TestClearstreamAPIEndpoint.DiTemplate
Arguments on public methods on classes | 38 methods | 0.5 | 0.5 | 1 arguments on System.Runtime.CompilerServices.NullableAttribute..ctor(Byte)
IL instructions in non-abstract methods | 47 methods | 52.57 | 121.36 | 430 IL instructions in TestClearstreamAPIEndpoint.Program.GetRefreshTokenAsync(Token)
Cyclomatic complexity on non abstract Methods | 47 Methods | 4.77 | 9.64 | CC = 34 for TestClearstreamAPIEndpoint.Program.GetRefreshTokenAsync(Token)

#### Assemblies Metrics

If you wish to define thresholds on assemblies' Code Metrics, consider writing some Rules.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.

Assemblies | # lines of code | # IL instruction | # Types | # Abstract Types | # lines of comment | % Comment | % Coverage | Afferent Coupling | Efferent Coupling | Relational Cohesion | Instability | Abstractness | Distance
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
ClearstreamAPIConnector v1.0.0.0 | 213 | 2471 | 9 | 0 | 119 | 35.84 | - | 0 | 65 | 2 | 1 | 0 | 0

If you wish to define thresholds on types' Code Metrics, consider writing some Rule.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.

#### Types Metrics : Code Quality

Type Name | Type Rank | # Lines Of Code | # IL Instructions | # Lines Of Comment | % Comment | Cyclomatic Complexity | IL Cyclomatic Complexity | % Coverage | Afferent Coupling | Efferent Coupling | Type Namespace
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
EmbeddedAttribute | 4.51 | 0 | 4 | - | - | - | 1 | - | 3 | 3 | Microsoft.CodeAnalysis
NullableAttribute | 4.49 | 0 | 19 | - | - | - | 2 | - | 5 | 7 | System.Runtime.CompilerServices
NullableContextAttribute | 2.64 | 0 | 7 | - | - | - | 1 | - | 4 | 6 | System.Runtime.CompilerServices
DiTemplate | 2.12 | 20 | 74 | 0 | 0 | 0 | 21 | - | 2 | 8 | TestClearstreamAPIEndpoint
LoggingHandler | 0.27 | 13 | 267 | 0 | 0 | 0 | 20 | - | 1 | 23 | TestClearstreamAPIEndpoint
DiTemplateList | 0.27 | 0 | 4 | - | - | - | 1 | - | 1 | 4 | TestClearstreamAPIEndpoint
Token | 0.27 | 8 | 32 | 0 | 0 | 0 | 9 | - | 1 | 8 |
Program | 0.15 | 172 | 2057 | 0 | 0 | 0 | 168 | - | 0 | 63 | TestClearstreamAPIEndpoint
RefSafetyRulesAttribute | 0.15 | 0 | 7 | - | - | - | 1 | - | 0 | 6 | System.Runtime.CompilerServices

#### Types Metrics : Code Members and Inheritance

Type Name | # Instance Methods | Nb Static Methods | Nb Properties | # Fields | # Children Classes | Depth Of Inheritance Tree | Type Namespace
--- | --- | --- | --- | --- | --- | --- | ---
EmbeddedAttribute | 1 | 0 | 0 | 0 | 0 | 2 | Microsoft.CodeAnalysis
NullableAttribute | 2 | 0 | 0 | 1 | 0 | 2 | System.Runtime.CompilerServices
NullableContextAttribute | 1 | 0 | 0 | 1 | 0 | 2 | System.Runtime.CompilerServices
DiTemplate | 21 | 0 | 10 | 10 | 0 | 1 | TestClearstreamAPIEndpoint
LoggingHandler | 2 | 0 | 0 | 0 | 0 | 1 | TestClearstreamAPIEndpoint
DiTemplateList | 1 | 0 | 0 | 0 | 0 | 1 | TestClearstreamAPIEndpoint
Token | 9 | 0 | 4 | 4 | 0 | 1 |
Program | 1 | 8 | 0 | 0 | 0 | 1 | TestClearstreamAPIEndpoint
RefSafetyRulesAttribute | 1 | 0 | 0 | 1 | 0 | 2 | System.Runtime.CompilerServices

#### Types Metrics : Lack Of Cohesion Of Methods and Association Between Classes

Type Name | Lack Of Cohesion Of Methods | Lack Of Cohesion Of Methods HS | Association Between Classes | Type Namespace
--- | --- | --- | --- | ---
EmbeddedAttribute | 0 | 0 | 1 | Microsoft.CodeAnalysis
NullableAttribute | 0 | 0 | 1 | System.Runtime.CompilerServices
NullableContextAttribute | 0 | 0 | 1 | System.Runtime.CompilerServices
DiTemplate | 0 | 0 | 1 | TestClearstreamAPIEndpoint
LoggingHandler | 0 | 0 | 18 | TestClearstreamAPIEndpoint
DiTemplateList | 0 | 0 | 1 | TestClearstreamAPIEndpoint
Token | 0 | 0 | 1 |
Program | 0 | 0 | 81 | TestClearstreamAPIEndpoint
RefSafetyRulesAttribute | 0 | 0 | 1 | System.Runtime.CompilerServices

#### Namespaces Metrics

If you wish to define thresholds on namespaces' Code Metrics, consider writing some Code Rules.
Clicking column header arrows sorts values.
Clicking column header title text redirect to the online Code Metric definition.

Namespaces | # lines of code | # IL instruction | # Types | # lines of comment | % Comment | % Coverage | Afferent Coupling | Efferent Coupling
--- | --- | --- | --- | --- | --- | --- | --- | ---
| 8 | 32 | 1 | - | - | - | 1 | 4
Microsoft.CodeAnalysis | 0 | 4 | 1 | - | - | - | 1 | 2
ClearstreamAPIConnector .dll::System.Runtime .CompilerServices | 0 | 33 | 3 | - | - | - | 2 | 3
TestClearstreamAPIEndpoint | 205 | 2402 | 4 | - | - | - | 0 | 19

####

Quality Gates 1200

- 12 Quality Gate(s) that Pass
  - Percentage Coverage
  - Percentage Coverage on New Code
  - Percentage Coverage on Refactored Code
  - Blocker Issues
  - Critical Issues
  - New Blocker / Critical / High Issues
  - Critical Rules Violated
  - Treat Compiler Warnings as Error
  - Percentage Debt
  - New Debt since Baseline
  - Debt Rating per Namespace
  - New Annual Interest since Baseline

|  | Quality Gate Pass: Percentage Coverage

• Quality Gate Description: Code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite. A program with high code coverage, measured as a percentage, has had more of its source code executed during testing which suggests it has a lower chance of containing undetected software bugs compared to a program with low code coverage. Code coverage is certainly the most important quality code metric. But coverage is not enough the team needs to ensure that results are checked at test-time. These checks can be done both in test code, and in application code through assertions. The important part is that a test must fail explicitly when a check gets unvalidated during the test execution. This quality gate defines a warn threshold (80%) and a fail threshold (70%). These are indicative thresholds and in practice the more the better. To achieve high coverage and low risk, make sure that new and refactored classes gets 100% covered by tests and that the application and test code contains as many checks/assertions as possible.

### Scalar Result: N/A %

|  | Quality Gate Pass: Percentage Coverage on New Code

• Quality Gate Description: New Code is defined as methods added since the baseline. To achieve high code coverage it is essential that new code gets properly tested and covered by tests. It is advised that all non-UI new classes gets 100% covered. Typically 90% of a class is easy to cover by tests and 10% is hard to reach through tests. It means that this 10% remaining is not easily testable, which means it is not well designed, which often means that this code is especially error-prone. This is the reason why it is important to reach 100% coverage for a class, to make sure that potentially error-prone code gets tested.

### Scalar Result: N/A %

|  | Quality Gate Pass: Percentage Coverage on Refactored Code

• Quality Gate Description: Refactored Code is defined as methods where code was changed since the baseline. Comment changes and formatting changes are not considered as refactoring. To achieve high code coverage it is essential that refactored code gets properly tested and covered by tests. It is advised that when refactoring a class or a method, it is important to also write tests to make sure it gets 100% covered. Typically 90% of a class is easy to cover by tests and 10% is hard to reach through tests. It means that this 10% remaining is not easily testable, which means it is not well designed, which often means that this code is especially error-prone. This is the reason why it is important to reach 100% coverage for a class, to make sure that potentially error-prone code gets tested.

### Scalar Result: N/A %

|  | Quality Gate Pass: Blocker Issues

• Quality Gate Description: An issue with the severity Blocker cannot move to production, it must be fixed. The severity of an issue is either defined explicitly in the rule source code, either inferred from the issue annual interest and thresholds defined in the NDepend Project Properties > Issue and Debt.

###

No issue matched

|  | Quality Gate Pass: Critical Issues

• Quality Gate Description: An issue with a severity level Critical shouldn't move to production. It still can for business imperative needs purposes, but at worst it must be fixed during the next iterations. The severity of an issue is either defined explicitly in the rule source code, either inferred from the issue annual interest and thresholds defined in the NDepend Project Properties > Issue and Debt.

###

No issue matched

|  | Quality Gate Pass: New Blocker / Critical / High Issues

• Quality Gate Description: An issue with the severity Blocker cannot move to production, it must be fixed. An issue with a severity level Critical shouldn't move to production. It still can for business imperative needs purposes, but at worth it must be fixed during the next iterations. An issue with a severity level High should be fixed quickly, but can wait until the next scheduled interval. The severity of an issue is either defined explicitly in the rule source code, either inferred from the issue annual interest and thresholds defined in the NDepend Project Properties > Issue and Debt.

###

No issue matched

|  | Quality Gate Pass: Critical Rules Violated

• Quality Gate Description: The concept of critical rule is useful to pinpoint certain rules that should not be violated. A rule can be made critical just by checking the Critical button in the rule edition control and then saving the rule. This quality gate fails if any critical rule gets any violations. When no baseline is available, rules that rely on diff are not counted. If you observe that this quality gate count slightly decreases with no apparent reason, the reason is certainly that rules that rely on diff are not counted because the baseline is not defined.

###

No rule matched

|  | Quality Gate Pass: Treat Compiler Warnings as Error

• Quality Gate Description: Many compiler warnings, if ignored, could lead to runtime errors, unpredictable behavior, or security vulnerabilities. Addressing these warnings early can prevent such issues from becoming real problems in production. Also, this approach encourages developers to follow best coding practices and to use language features correctly. It helps in maintaining a high standard of coding within a team, especially in projects with multiple contributors. This Quality Gate requires Roslyn Analyzers issues to be imported: https://www.ndepend.com/docs/roslyn-analyzer-issue-import C# and VB.NET compiler warnings are Roslyn Analyzers issues whose rule id starts with "CS" or "VB". This Quality Gate warns if there are any such warning. It fails if there are 10 or more such warnings. See list of C# compiler warnings here: https://learn.microsoft.com/en-us/dotnet/csharp/misc/cs0183

###

No issue matched

|  | Quality Gate Pass: Percentage Debt

• Quality Gate Description: % Debt total is defined as a percentage on: • the estimated total effort to develop the code base • and the the estimated total time to fix all issues (the Debt) Estimated total effort to develop the code base is inferred from # lines of code of the code base and from the Estimated number of man-day to develop 1000 logical lines of code setting found in NDepend Project Properties > Issue and Debt. Debt documentation: https://www.ndepend.com/docs/technical-debt#Debt This quality gates fails if the estimated debt is more than 30% of the estimated effort to develop the code base, and warns if the estimated debt is more than 20% of the estimated effort to develop the code base

### Scalar Result: 6.64 %

|  | Quality Gate Pass: New Debt since Baseline

• Quality Gate Description: This Quality Gate fails if the estimated effort to fix new or worsened issues (what is called the New Debt since Baseline) is higher than 2 man-days. This Quality Gate warns if this estimated effort is positive. Debt documentation: https://www.ndepend.com/docs/technical-debt#Debt

### Scalar Result: 0 man-days

|  | Quality Gate Pass: Debt Rating per Namespace

• Quality Gate Description: Forbid namespaces with a poor Debt Rating equals to E or D. The Debt Rating for a code element is estimated by the value of the Debt Ratio and from the various rating thresholds defined in this project Debt Settings. The Debt Ratio of a code element is a percentage of Debt Amount (in floating man-days) compared to the estimated effort to develop the code element (also in floating man-days). The estimated effort to develop the code element is inferred from the code elements number of lines of code, and from the project Debt Settings parameters estimated number of man-days to develop 1000 logical lines of code. The logical lines of code corresponds to the number of debug breakpoints in a method and doesn't depend on code formatting nor comments. The Quality Gate can be modified to match assemblies, types or methods with a poor Debt Rating, instead of matching namespaces.

###

No namespace matched

|  | Quality Gate Pass: New Annual Interest since Baseline

• Quality Gate Description: This Quality Gate fails if the estimated annual cost to leave all issues unfixed, increased from more than 2 man-days since the baseline. This Quality Gate warns if this estimated annual cost is positive. This estimated annual cost is named the Annual-Interest. Each rule can either provide a formula to compute the Annual-Interest per issue, or assign a Severity level for each issue. Some thresholds defined in Project Properties > Issue and Debt > Annual Interest are used to infer an Annual-Interest value from a Severity level. Annual Interest documentation: https://www.ndepend.com/docs/technical-debt#AnnualInterest

### Scalar Result: 0 man-days

####

Hot Spots 000

####

Code Smells 000

####

Code Smells Regression 000

####

Object Oriented Design 000

####

Design 000

####

Architecture 000

####

API Breaking Changes 000

####

Code Coverage 000

####

Dead Code 000

####

Security 000

####

Visibility 000

####

Immutability 000

####

Naming Conventions 000

####

Source Files Organization 000

####

.NET Framework Usage 000

####

API Usage 000

####

Defining JustMyCode 000

####

Trend Metrics 000

####

Code Diff Summary 000

####

Roslyn Analyzers 000

####

Rules extracted from Source Code 000

####

Object Oriented Design 1310

- 1 Rule(s) violated
  - ND1203 Class with no descendant should be sealed if possible

|  | Rule Violated: ND1203 Class with no descendant should be sealed if possible

• Rule Description: If a non-static class isn't declared with the keyword sealed, it means that it can be subclassed everywhere the non-sealed class is visible. Making a class a base class requires significant design effort. Subclassing a non-sealed class, not initially designed to be subclassed, will lead to unanticipated design issue. Most classes are non-sealed because developers don't care about the keyword sealed, not because the primary intention was to write a class that can be subclassed. There are performance gain in declaring a class as sealed. See a benchmark here: https://www.meziantou.net/performance-benefits-of-sealed-class.htm But the real benefit of doing so, is actually to express the intention: this class has not be designed to be a base class, hence it is not allowed to subclass it. Notice that by default this rule doesn't match public class to avoid matching classes that are intended to be sub-classed by third-party code using your library. If you are developing an application and not a library, just uncomment the clause !t.IsPubliclyVisible.

• How to Fix Issues of this Rule: For each matched class, take the time to assess if it is really meant to be subclassed. Certainly most matched class will end up being declared as sealed.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1203:ClassWithNoDescendantShouldBeSealedIfPossible", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

3 types matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

3 types | # lines of code (LOC) | Debt | Severity | Full Name
--- | --- | --- | --- | ---
Program | |m100|0| 172 | |m0|0| 0min 30s | 0Medium | TestClearstreamAPIEndpoint.Program
Token | |m4|1| 8 | |m0|1| 0min 30s | 1Medium | Token
DiTemplateList | |m0|2| 0 | |m0|2| 0min 30s | 2Medium | TestClearstreamAPIEndpoint .DiTemplateList

####

Design 1110

- 1 Rule(s) violated
  - ND1307 Declare types in namespaces

|  | Rule Violated: ND1307 Declare types in namespaces

• Rule Description: Types are declared within namespaces to prevent name collisions, and as a way of organizing related types in an object hierarchy. Types outside any named namespace are in a global namespace that cannot be referenced in code. Such practice results in naming collisions and ambiguity since types in the global namespace are accessible from anywhere in the code. Also, placing types within namespaces allows to encapsulate related code and data, providing a level of abstraction and modularity. Global types lack this encapsulation, making it harder to understand the organization and structure of your code. The global namespace has no name, hence it is qualified as being the anonymous namespace. This rule warns about anonymous namespaces.

• How to Fix Issues of this Rule: To fix a violation of this rule, declare all types of all anonymous namespaces in some named namespaces.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1307:DeclareTypesInNamespaces", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

1 namespace matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

1 namespace | childTypes | # lines of code (LOC) | Debt | Severity | Full Name
--- | --- | --- | --- | --- | ---

N:anonymous namespace in assembly ClearstreamAPIConnector

|m0|0|

1 type

- Token

|m0|0| 8

|m0|0| 2min 0s

0Medium

{anonymous namespace} in assembly ClearstreamAPIConnector

####

Dead Code 310

- 1 Rule(s) violated
  - ND1701 Potentially Dead Methods

|  | Rule Violated: ND1701 Potentially Dead Methods

• Rule Description: This rule lists potentially dead methods. A dead method is a method that can be removed because it is never called by the program. This rule lists not only methods not called anywhere in code, but also methods called only by methods not called anywhere in code. This is why this rule comes with a column MethodsCallingMe and this is why there is a code metric named depth: • A depth value of 0 means the method is not called. • A depth value of 1 means the method is called only by methods not called. • etc… By reading the source code of this rule, you'll see that by default, public methods are not matched, because such method might not be called by the analyzed code, but still be called by client code, not analyzed by NDepend. This default behavior can be easily changed.

• How to Fix Issues of this Rule: Static analysis cannot provide an exact list of dead methods, because there are several ways to invoke a method dynamically (like through reflection). For each method matched by this query, first investigate if the method is invoked somehow (like through reflection). If the method is really never invoked, it is important to remove it to avoid maintaining useless code. If you estimate the code of the method might be used in the future, at least comment it, and provide an explanatory comment about the future intentions. If a method is invoked somehow, but still is matched by this rule, you can tag it with the attribute IsNotDeadCodeAttribute found in NDepend.API.dll to avoid matching the method again. You can also provide your own attribute for this need, but then you'll need to adapt this code rule. Issues of this rule have a Debt equal to 10 minutes because it only takes a short while to investigate if a method can be safely discarded. On top of these 10 minutes, the depth of usage of such method adds up 3 minutes per unity because dead method only called by dead code takes a bit more time to be investigated. The Annual Interest of issues of this rule, the annual cost to not fix such issue, is proportional to the type #lines of code, because the bigger the method is, the more it slows down maintenance.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1701:PotentiallyDeadMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

3 methods matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

3 methods | depth | MethodsCallingMe | Debt | Annual Interest | Full Name
--- | --- | --- | --- | --- | ---
ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) | |m0|0| 0 | 0no method | |m0|0| 10min | 210min | TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors)
GetRefreshTokenAsync(Token) | |m0|1| 0 | 1no method | |m0|1| 10min | 042min | TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token)
CallClearstreamPlaygroundApiAsyn c (Token) | |m0|2| 0 | 2no method | |m0|2| 10min | 128min | TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token)

####

Security 810

- 1 Rule(s) violated
  - ND3103 Don't disable certificate validation

|  | Rule Violated: ND3103 Don't disable certificate validation

• Rule Description: Matched methods are subscribing a custom certificate validation procedure through the delegate: ServicePointManager.ServerCertificateValidationCallback. Doing so is often used to disable certificate validation to connect easily to a host that is not signed by a root certificate authority. https://en.wikipedia.org/wiki/Root_certificate This might create a vulnerability to man-in-the-middle attacks since the client will trust any certificate. https://en.wikipedia.org/wiki/Man-in-the-middle_attack

• How to Fix Issues of this Rule: Don't rely on a weak custom certificate validation. If a legitimate custom certificate validation procedure must be subscribed, you can chose to suppress related issue(s).

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND3103:DontDisableCertificateValidation", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

3 methods matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

3 methods | Debt | Severity | Full Name
--- | --- | --- | ---
GetRefreshTokenAsync(Token) | |m0|0| 30min | 0High | TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token)
GetElibilityTokenAsync() | |m0|1| 30min | 1High | TestClearstreamAPIEndpoint.Program .GetElibilityTokenAsync()
Main(String[]) | |m0|2| 30min | 2High | TestClearstreamAPIEndpoint.Program .Main(String[])

####

Visibility 920

- 2 Rule(s) violated
  - ND1807 Avoid public methods not publicly visible
  - ND1803 Types that could be declared as private, nested in a parent type

|  | Rule Violated: ND1807 Avoid public methods not publicly visible

• Rule Description: This rule warns about methods declared as public whose parent type is not declared as public. In such situation public means, can be accessed from anywhere my parent type is visible. Some developers think this is an elegant language construct, some others find it misleading. This rule can be deactivated if you don't agree with it. Read the whole debate here: http://ericlippert.com/2014/09/15/internal-or-public/ By default issues of this rule have a Low severity because they reflect more an advice than a problem.

• How to Fix Issues of this Rule: Declare the method as internal if it is used outside of its type, else declare it as private.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1807:AvoidPublicMethodsNotPubliclyVisible", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

3 methods matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

3 methods | parentTypeVisibility | declareMethodAs | methodsCaller | Debt | Severity | Full Name
--- | --- | --- | --- | --- | --- | ---

get_access_token()

0declared as *internal*

0internal

|m100|0|

3 methods

- TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token)
- TestClearstreamAPIEndpoint.Program .GetAllTemplates(Token)
- TestClearstreamAPIEndpoint.Program .Main(String[])

|m0|0| 0min 30s

0Low

Token.get_access_token()

get_expires_in()

1declared as *internal*

1internal

|m0|2|

1 method

- TestClearstreamAPIEndpoint.Program .Main(String[])

|m0|1| 0min 30s

1Low

Token.get_expires_in()

get_refresh_token()

2declared as *internal*

2internal

|m50|1|

2 methods

- TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token)
- TestClearstreamAPIEndpoint.Program .Main(String[])

|m0|2| 0min 30s

2Low

Token.get_refresh_token()

|  | Rule Violated: ND1803 Types that could be declared as private, nested in a parent type

• Rule Description: This rule matches types that can be potentially nested and declared private into another type. The conditions for a type to be potentially nested into a parent type are: • the parent type is the only type consuming it, • the type and the parent type are declared in the same namespace. Declaring a type as private into a parent type improves encapsulation. The scope from which the type can be consumed is then reduced to a minimum. This rule doesn't match classes with extension methods because such class cannot be nested in another type.

• How to Fix Issues of this Rule: Nest each matched type into the specified parent type and declare it as private. However nested private types are hardly testable. Hence this rule might not be applied to types consumed directly by tests.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1803:TypesThatCouldBeDeclaredAsPrivateNestedInAParentType", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

1 type matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

1 type | couldBeNestedIn | Debt | Severity | Full Name
--- | --- | --- | --- | ---
DiTemplateList | 0TestClearstreamAPIEndpoint.Program | |m0|0| 3min 0s | 0Low | TestClearstreamAPIEndpoint .DiTemplateList

####

Source Files Organization 420

- 2 Rule(s) violated
  - ND2100 Avoid referencing source file out of the project directory
  - ND2104 Types with source files stored in the same directory, should be declared in the same namespace

|  | Rule Violated: ND2100 Avoid referencing source file out of the project directory

• Rule Description: A source file located outside of the VS project directory can be added through: > Add > Existing Items… > Add As Link Doing so can be used to share types definitions across several assemblies. This provokes type duplication at binary level. Hence maintainability is degraded and subtle versioning bug can appear. This rule matches types whose source files are not declared under the directory that contains the related Visual Studio project file, or under any sub-directory of this directory. This practice can be tolerated for certain types shared across executable assemblies. Such type can be responsible for startup related concerns, such as registering custom assembly resolving handlers or checking the .NET Framework version before loading any custom library.

• How to Fix Issues of this Rule: To fix a violation of this rule, prefer referencing from a VS project only source files defined in sub-directories of the VS project file location. By default issues of this rule have a Low severity because they reflect more an advice than a problem.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND2100:AvoidReferencingSourceFileOutOfVisualStudioProjectDirectory", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

4 types matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

4 types | sourceFilePath | projectFilePath | Debt | Severity | Full Name
--- | --- | --- | --- | --- | ---
Token | 1\Users\johan\OneDrive\DEV\ClearstreamAPIConnector\Token.cs | 1\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.csproj | |m0|1| 10min | 1Low | Token
DiTemplate | 0\Users\johan\OneDrive\DEV\ClearstreamAPIConnector\DiTemplate.cs | 0\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.csproj | |m0|0| 10min | 0Low | TestClearstreamAPIEndpoint .DiTemplate
LoggingHandler | 3\Users\johan\OneDrive\DEV\ClearstreamAPIConnector\LoggingHandler.cs | 3\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.csproj | |m0|3| 10min | 3Low | TestClearstreamAPIEndpoint .LoggingHandler
Program | 2\Users\johan\OneDrive\DEV\ClearstreamAPIConnector\Program.cs | 2\Users\Johannes Rest\OneDrive\DEV\ClearstreamAPIConnector\ClearstreamAPIConnector.csproj | |m0|2| 10min | 2Low | TestClearstreamAPIEndpoint.Program

|  | Rule Violated: ND2104 Types with source files stored in the same directory, should be declared in the same namespace

• Rule Description: To maintain a robust code structure and organization, it is advisable to synchronize the namespaces hierarchy with the directory hierarchy that contains the source files. Following this practice is a widely accepted convention, and failing to adhere to it can result in source code that is less maintainable and harder to navigate. Respecting this convention means that types with source files stored in the same directory, should be declared in the same namespace. For each directory that contains several source files, where most types are declared in a namespace (what we call the main namespace) and a few types are declared out of the main namespace, this code rule matches: • The main namespace • typesOutOfMainNamespace: Types declared in source files in the main namespace's directory but that are not in the main namespace. • typesInMainNamespace: And for informational purposes, types declared in source files in the main namespace's directory, and that are in the main namespace.

• How to Fix Issues of this Rule: Violations of this rule are types in the typesOutOfMainNamespace column. Typically such type … • … is contained in the wrong namespace but its source file is stored in the right directory. In such situation the type should be contained in main namespace. • … is contained in the right namespace but its source file is stored in the wrong directory In such situation the source file of the type must be moved to the proper parent namespace directory. • … is declared in multiple source files, stored in different directories. In such situation it is preferable that all source files are stored in a single directory. The estimated Debt, which means the effort to fix such issue, is equal to 2 minutes plus 5 minutes per type in typesOutOfMainNamespace.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND2104:TypesWithSourceFilesStoredInTheSameDirectoryShouldBeDeclaredInTheSameNamespace", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

1 namespace matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

1 namespace | typesOutOfMainNamespace | typesInMainNamespace | Debt | Severity | Full Name
--- | --- | --- | --- | --- | ---

TestClearstreamAPIEndpoint

|m0|0|

1 type

- Token

|m0|0|

3 types

- TestClearstreamAPIEndpoint .DiTemplate
- TestClearstreamAPIEndpoint .LoggingHandler
- TestClearstreamAPIEndpoint.Program

|m0|0| 7min

0High

TestClearstreamAPIEndpoint

#### Hot Spots

- 7 Queries
  - Types Hot Spots
  - Types to Fix Priority
  - Issues to Fix Priority
  - Debt and Issues per Rule
  - New Debt and Issues per Rule
  - Debt and Issues per Code Element
  - New Debt and Issues per Code Element

|  | Code Query: Types Hot Spots

• Query Description: This query lists types with most Debt, or in other words, types with issues that would need the largest effort to get fixed. Both issues on the type and its members are taken account. Since untested code often generates a lot of Debt, the type size and percentage coverage is shown (just uncomment t.PercentageCoverage in the query source code once you've imported the coverage data). The Debt Rating and Debt Ratio are also shown for informational purpose. -- The amount of Debt is not a measure to prioritize the effort to fix issues, it is an estimation of how far the team is from clean code that abides by the rules set. For each issue the Annual Interest estimates the annual cost to leave the issues unfixed. The Severity of an issue is estimated through thresholds from the Annual Interest. The Debt Breaking Point represents the duration from now when the estimated cost to leave the issue unfixed costs as much as the estimated effort to fix it. Hence the shorter the Debt Breaking Point the largest the Return on Investment for fixing the issue. The Breaking Point is the right metric to prioritize issues fix.

###

3 types matched

3 types | Debt | Issues | Annual Interest | Breaking Point | # lines of code (LOC) | DebtRating | DebtRatio | Full Name
--- | --- | --- | --- | --- | --- | --- | --- | ---

Program

|m100|0| 2h 10min

|m100|0|

First 3 of 8 issues

- TestClearstreamAPIEndpoint.Program violates rule 'Class with no descendant should be sealed if possible'
- TestClearstreamAPIEndpoint.Program violates rule 'Avoid referencing source file out of the project directory'
- TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) violates rule 'Potentially Dead Methods'

|m100|0| 2h 22min

|m0|2| 335d

|m100|0| 172

1B

|m19|1| 8.3

TestClearstreamAPIEndpoint.Program

Token

|m6|1| 12min

|m50|1|

First 3 of 5 issues

- Token violates rule 'Class with no descendant should be sealed if possible'
- Token violates rule 'Avoid referencing source file out of the project directory'
- Token.get_access_token() violates rule 'Avoid public methods not publicly visible'

|m0|1| 2min 0s

|m100|0| 6y

|m4|1| 8

2B

|m0|2| 5.34

Token

DiTemplateList

|m0|2| 3min 30s

|m0|2|

2 issues

- TestClearstreamAPIEndpoint .DiTemplateList} violates rule 'Class with no descendant should be sealed if possible'
- TestClearstreamAPIEndpoint .DiTemplateList} violates rule 'Types that could be declared as private, nested in a parent type'

|m0|2| 2min 0s

|m16|1| 1y 273d

|m0|2| 0

0D

|m100|0| 20.25

TestClearstreamAPIEndpoint .DiTemplateList

|  | Code Query: Types to Fix Priority

• Query Description: This query lists types per increasing Debt Breaking Point. For each issue the Debt estimates the effort to fix the issue, and the Annual Interest estimates the annual cost to leave the issue unfixed. The Severity of an issue is estimated through thresholds from the Annual Interest of the issue. The Debt Breaking Point represents the duration from now when the estimated cost to leave the issue unfixed costs as much as the estimated effort to fix it. Hence the shorter the Debt Breaking Point the largest the Return on Investment for fixing the issues. Often new and refactored types since baseline will be listed first, because issues on these types get a higher Annual Interest because it is important to focus first on new issues. -- Both issues on the type and its members are taken account. Only types with at least 30 minutes of Debt are listed to avoid polluting the list with the numerous types with small Debt, on which the Breaking Point value makes less sense. The Annual Interest estimates the cost per year in man-days to leave these issues unfixed. Since untested code often generates a lot of Debt, the type size and percentage coverage is shown (just uncomment t.PercentageCoverage in the query source code once you've imported the coverage data). The Debt Rating and Debt Ratio are also shown for informational purpose.

###

1 type matched

1 type | Breaking Point | Debt | Annual Interest | Issues | # lines of code (LOC) | DebtRating | DebtRatio | Full Name
--- | --- | --- | --- | --- | --- | --- | --- | ---

Program

|m0|0| 335d

|m0|0| 2h 10min

|m0|0| 2h 22min

|m0|0|

First 3 of 8 issues

- TestClearstreamAPIEndpoint.Program violates rule 'Class with no descendant should be sealed if possible'
- TestClearstreamAPIEndpoint.Program violates rule 'Avoid referencing source file out of the project directory'
- TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) violates rule 'Potentially Dead Methods'

|m0|0| 172

0B

|m0|0| 8.3

TestClearstreamAPIEndpoint.Program

|  | Code Query: Issues to Fix Priority

• Query Description: This query lists issues per increasing Debt Breaking Point. Double-click an issue to edit its rule and select the issue in the rule result. This way you can view all information concerning the issue. For each issue the Debt estimates the effort to fix the issue, and the Annual Interest estimates the annual cost to leave the issue unfixed. The Severity of an issue is estimated through thresholds from the Annual Interest of the issue. The Debt Breaking Point represents the duration from now when the estimated cost to leave the issue unfixed costs as much as the estimated effort to fix it. Hence the shorter the Debt Breaking Point the largest the Return on Investment for fixing the issue. Often issues on new and refactored code elements since baseline will be listed first, because such issues get a higher Annual Interest because it is important to focus first on new issues on recent code. More documentation: https://www.ndepend.com/docs/technical-debt

###

19 issues matched

19 issues | Debt | Annual Interest | Breaking Point | CodeElement | Full Name
--- | --- | --- | --- | --- | ---
High issue on: TestClearstreamAPIEndpoint .Program .GetRefreshTokenAsync(Token) | |m32|05| 10min | 0042min | |m15|10| 86d | 06TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) | Rule violated: Potentially Dead Methods
Medium issue on: TestClearstreamAPIEndpoint .Program | |m0|14| 0min 30s | 102min 0s | |m16|09| 91d | 05TestClearstreamAPIEndpoint.Program | Rule violated: Class with no descendant should be sealed if possible
Medium issue on: Token | |m0|13| 0min 30s | 072min 0s | |m16|07| 91d | 08Token | Rule violated: Class with no descendant should be sealed if possible
{C:TestClearstreamAPIEndpoint .DiTemplateList} | |m0|18| 0min 30s | 082min 0s | |m16|08| 91d | 07TestClearstreamAPIEndpoint .DiTemplateList | Rule violated: Class with no descendant should be sealed if possible
{N:TestClearstreamAPIEndpoint} | |m22|10| 7min | 0420min | |m23|06| 127d | 04TestClearstreamAPIEndpoint | Rule violated: Types with source files stored in the same directory, should be declared in the same namespace
High issue on: TestClearstreamAPIEndpoint .Program .CallClearstreamPlaygroundApiAsync (Token) | |m32|06| 10min | 0128min | |m23|05| 130d | 01TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token) | Rule violated: Potentially Dead Methods
Medium issue on: {anonymous namespace in assembly ClearstreamAPIConnector} | |m5|12| 2min 0s | 092min 0s | |m66|04| 1y | 00N:anonymous namespace in assembly ClearstreamAPIConnector | Rule violated: Declare types in namespaces
Medium issue on: TestClearstreamAPIEndpoint .Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) | |m32|04| 10min | 0610min | |m66|03| 1y | 03TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) | Rule violated: Potentially Dead Methods
High issue on: TestClearstreamAPIEndpoint .Program .GetRefreshTokenAsync(Token) | |m100|01| 30min | 0520min | |m100|00| 1y 182d | 02TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) | Rule violated: Don't disable certificate validation
High issue on: TestClearstreamAPIEndpoint .Program .GetElibilityTokenAsync() | |m100|02| 30min | 0220min | |m100|02| 1y 182d | 09TestClearstreamAPIEndpoint.Program .GetElibilityTokenAsync() | Rule violated: Don't disable certificate validation
High issue on: TestClearstreamAPIEndpoint .Program .Main(String[]) | |m100|00| 30min | 0320min | |m100|01| 1y 182d | 16TestClearstreamAPIEndpoint.Program .Main(String[]) | Rule violated: Don't disable certificate validation
{C:TestClearstreamAPIEndpoint .DiTemplateList} | |m8|11| 3min 0s | 150min 0s | |m0|16| 00:00:00 | 15TestClearstreamAPIEndpoint .DiTemplateList | Rule violated: Types that could be declared as private, nested in a parent type
Low issue on: Token.get_access_token() | |m0|16| 0min 30s | 170min 0s | |m0|15| 00:00:00 | 18Token.get_access_token() | Rule violated: Avoid public methods not publicly visible
Low issue on: Token.get_expires_in() | |m0|15| 0min 30s | 140min 0s | |m0|18| 00:00:00 | 17Token.get_expires_in() | Rule violated: Avoid public methods not publicly visible
Low issue on: Token.get_refresh_token() | |m0|17| 0min 30s | 160min 0s | |m0|17| 00:00:00 | 14Token.get_refresh_token() | Rule violated: Avoid public methods not publicly visible
Low issue on: Token | |m32|07| 10min | 180min 0s | |m0|12| 00:00:00 | 11Token | Rule violated: Avoid referencing source file out of the project directory
Low issue on: TestClearstreamAPIEndpoint .DiTemplate | |m32|08| 10min | 130min 0s | |m0|11| 00:00:00 | 10TestClearstreamAPIEndpoint .DiTemplate | Rule violated: Avoid referencing source file out of the project directory
Low issue on: TestClearstreamAPIEndpoint .LoggingHandler | |m32|09| 10min | 110min 0s | |m0|14| 00:00:00 | 13TestClearstreamAPIEndpoint .LoggingHandler | Rule violated: Avoid referencing source file out of the project directory
Low issue on: TestClearstreamAPIEndpoint .Program | |m32|03| 10min | 120min 0s | |m0|13| 00:00:00 | 12TestClearstreamAPIEndpoint.Program | Rule violated: Avoid referencing source file out of the project directory

|  | Code Query: Debt and Issues per Rule

• Query Description: This query lists violated rules with most Debt first. A rule violated has issues. For each issue the Debt estimates the effort to fix the issue. -- The amount of Debt is not a measure to prioritize the effort to fix issues, it is an estimation of how far the team is from clean code that abides by the rules set. For each issue the Annual Interest estimates the annual cost to leave the issues unfixed. The Severity of an issue is estimated through thresholds from the Annual Interest. The Debt Breaking Point represents the duration from now when the estimated cost to leave the issue unfixed costs as much as the estimated effort to fix it. Hence the shorter the Debt Breaking Point the largest the Return on Investment for fixing the issue. The Breaking Point is the right metric to prioritize issues fix. -- Notice that rules can be grouped in Rule Category. This way you'll see categories that generate most Debt. Typically the rules that generate most Debt are the ones related to Code Coverage by Tests, Architecture and Code Smells. More documentation: https://www.ndepend.com/docs/technical-debt

###

8 rules matched

8 rules | Issues | Debt | Annual Interest | Breaking Point | Category | Full Name
--- | --- | --- | --- | --- | --- | ---

Don't disable certificate validation

|m66|1|

3 issues

- TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) violates rule 'Don't disable certificate validation'
- TestClearstreamAPIEndpoint.Program .GetElibilityTokenAsync() violates rule 'Don't disable certificate validation'
- TestClearstreamAPIEndpoint.Program .Main(String[]) violates rule 'Don't disable certificate validation'

|m100|0| 1h 30min

|m75|1| 1h 0min

|m100|0| 1y 182d

2Project Rules \ Security

Rule

Avoid referencing source file out of the project directory

|m100|0|

First 3 of 4 issues

- Token violates rule 'Avoid referencing source file out of the project directory'
- TestClearstreamAPIEndpoint .DiTemplate violates rule 'Avoid referencing source file out of the project directory'
- TestClearstreamAPIEndpoint .LoggingHandler violates rule 'Avoid referencing source file out of the project directory'

|m43|1| 40min

|m0|6| 0min 0s

|m0|6| 00:00:00

3Project Rules \ Source Files Organization

Rule

Potentially Dead Methods

|m66|2|

3 issues

- TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) violates rule 'Potentially Dead Methods'
- TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) violates rule 'Potentially Dead Methods'
- TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token) violates rule 'Potentially Dead Methods'

|m32|2| 30min

|m100|0| 1h 20min

|m25|2| 136d

0Project Rules \ Dead Code

Rule

Types with source files stored in the same directory, should be declared in the same namespace

|m0|5|

1 issue

- TestClearstreamAPIEndpoint} violates rule 'Types with source files stored in the same directory, should be declared in the same namespace'

|m6|3| 7min

|m25|2| 20min

|m23|3| 127d

1Project Rules \ Source Files Organization

Rule

Types that could be declared as private, nested in a parent type

|m0|7|

1 issue

- TestClearstreamAPIEndpoint .DiTemplateList} violates rule 'Types that could be declared as private, nested in a parent type'

|m1|4| 3min 0s

|m0|7| 0min 0s

|m0|7| 00:00:00

6Project Rules \ Visibility

Rule

Declare types in namespaces

|m0|6|

1 issue

- {anonymous namespace in assembly ClearstreamAPIConnector} violates rule 'Declare types in namespaces'

|m0|5| 2min 0s

|m2|4| 2min 0s

|m66|1| 1y

7Project Rules \ Design

Rule

Class with no descendant should be sealed if possible

|m66|4|

3 issues

- TestClearstreamAPIEndpoint.Program violates rule 'Class with no descendant should be sealed if possible'
- Token violates rule 'Class with no descendant should be sealed if possible'
- TestClearstreamAPIEndpoint .DiTemplateList} violates rule 'Class with no descendant should be sealed if possible'

|m0|7| 1min 30s

|m7|3| 6min

|m16|4| 91d

4Project Rules \ Object Oriented Design

Rule

Avoid public methods not publicly visible

|m66|3|

3 issues

- Token.get_access_token() violates rule 'Avoid public methods not publicly visible'
- Token.get_expires_in() violates rule 'Avoid public methods not publicly visible'
- Token.get_refresh_token() violates rule 'Avoid public methods not publicly visible'

|m0|6| 1min 30s

|m0|5| 0min 0s

|m0|5| 00:00:00

5Project Rules \ Visibility

Rule

|  | Code Query: New Debt and Issues per Rule

• Query Description: This query lists violated rules that have new issues since baseline, with most new Debt first. A rule violated has issues. For each issue the Debt estimates the effort to fix the issue. -- New issues since the baseline are consequence of recent code refactoring sessions. They represent good opportunities of fix because the code recently refactored is fresh in the developers mind, which means fixing now costs less than fixing later. Fixing issues on recently touched code is also a good way to foster practices that will lead to higher code quality and maintainability, including writing unit-tests and avoiding unnecessary complex code. -- Notice that rules can be grouped in Rule Category. This way you'll see categories that generate most Debt. Typically the rules that generate most Debt are the ones related to Code Coverage by Tests, Architecture and Code Smells. More documentation: https://www.ndepend.com/docs/technical-debt

###

No rule matched

|  | Code Query: Debt and Issues per Code Element

• Query Description: This query lists code elements that have issues, with most Debt first. For each code element the Debt estimates the effort to fix the element issues. The amount of Debt is not a measure to prioritize the effort to fix issues, it is an estimation of how far the team is from clean code that abides by the rules set. For each element the Annual Interest estimates the annual cost to leave the elements issues unfixed. The Severity of an issue is estimated through thresholds from the Annual Interest of the issue. The Debt Breaking Point represents the duration from now when the estimated cost to leave the issues unfixed costs as much as the estimated effort to fix it. Hence the shorter the Debt Breaking Point the largest the Return on Investment for fixing the issue. The Breaking Point is the right metric to prioritize issues fix.

###

15 code containers matched

15 code containers | Issues | Debt | Annual Interest | Breaking Point | Full Name
--- | --- | --- | --- | --- | ---

GetRefreshTokenAsync(Token)

|m100|03|

2 issues

- TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) violates rule 'Potentially Dead Methods'
- TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token) violates rule 'Don't disable certificate validation'

|m100|00| 40min

|m100|00| 1h 2min

|m12|07| 235d

TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token)

GetElibilityTokenAsync()

|m0|07|

1 issue

- TestClearstreamAPIEndpoint.Program .GetElibilityTokenAsync() violates rule 'Don't disable certificate validation'

|m74|02| 30min

|m32|03| 20min

|m28|03| 1y 182d

TestClearstreamAPIEndpoint.Program .GetElibilityTokenAsync()

Main(String[])

|m0|06|

1 issue

- TestClearstreamAPIEndpoint.Program .Main(String[]) violates rule 'Don't disable certificate validation'

|m74|01| 30min

|m32|04| 20min

|m28|04| 1y 182d

TestClearstreamAPIEndpoint.Program .Main(String[])

Token

|m100|01|

2 issues

- Token violates rule 'Class with no descendant should be sealed if possible'
- Token violates rule 'Avoid referencing source file out of the project directory'

|m25|04| 10min

|m3|07| 2min 0s

|m100|00| 5y 91d

Token

Program

|m100|02|

2 issues

- TestClearstreamAPIEndpoint.Program violates rule 'Class with no descendant should be sealed if possible'
- TestClearstreamAPIEndpoint.Program violates rule 'Avoid referencing source file out of the project directory'

|m25|03| 10min

|m3|06| 2min 0s

|m100|01| 5y 91d

TestClearstreamAPIEndpoint.Program

DiTemplate

|m0|04|

1 issue

- TestClearstreamAPIEndpoint .DiTemplate violates rule 'Avoid referencing source file out of the project directory'

|m24|06| 10min

|m0|13| 0min 0s

|m0|13| 00:00:00

TestClearstreamAPIEndpoint .DiTemplate

LoggingHandler

|m0|08|

1 issue

- TestClearstreamAPIEndpoint .LoggingHandler violates rule 'Avoid referencing source file out of the project directory'

|m24|05| 10min

|m0|14| 0min 0s

|m0|14| 00:00:00

TestClearstreamAPIEndpoint .LoggingHandler

ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors)

|m0|05|

1 issue

- TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) violates rule 'Potentially Dead Methods'

|m24|07| 10min

|m16|05| 10min

|m19|06| 1y

TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors)

CallClearstreamPlaygroundApiAsyn c (Token)

|m0|13|

1 issue

- TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token) violates rule 'Potentially Dead Methods'

|m24|08| 10min

|m45|01| 28min

|m6|08| 130d

TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token)

TestClearstreamAPIEndpoint

|m0|14|

1 issue

- TestClearstreamAPIEndpoint} violates rule 'Types with source files stored in the same directory, should be declared in the same namespace'

|m16|09| 7min

|m32|02| 20min

|m6|09| 127d

TestClearstreamAPIEndpoint

DiTemplateList

|m100|00|

2 issues

- TestClearstreamAPIEndpoint .DiTemplateList} violates rule 'Class with no descendant should be sealed if possible'
- TestClearstreamAPIEndpoint .DiTemplateList} violates rule 'Types that could be declared as private, nested in a parent type'

|m7|10| 3min 30s

|m3|09| 2min 0s

|m33|02| 1y 273d

TestClearstreamAPIEndpoint .DiTemplateList

N:anonymous namespace in assembly ClearstreamAPIConnector

|m0|09|

1 issue

- {anonymous namespace in assembly ClearstreamAPIConnector} violates rule 'Declare types in namespaces'

|m3|11| 2min 0s

|m3|08| 2min 0s

|m19|05| 1y

{anonymous namespace} in assembly ClearstreamAPIConnector

get_access_token()

|m0|10|

1 issue

- Token.get_access_token() violates rule 'Avoid public methods not publicly visible'

|m0|14| 0min 30s

|m0|12| 0min 0s

|m0|12| 00:00:00

Token.get_access_token()

get_expires_in()

|m0|11|

1 issue

- Token.get_expires_in() violates rule 'Avoid public methods not publicly visible'

|m0|13| 0min 30s

|m0|10| 0min 0s

|m0|10| 00:00:00

Token.get_expires_in()

get_refresh_token()

|m0|12|

1 issue

- Token.get_refresh_token() violates rule 'Avoid public methods not publicly visible'

|m0|12| 0min 30s

|m0|11| 0min 0s

|m0|11| 00:00:00

Token.get_refresh_token()

|  | Code Query: New Debt and Issues per Code Element

• Query Description: This query lists code elements that have new issues since baseline, with most new Debt first. For each code element the Debt estimates the effort to fix the element issues. New issues since the baseline are consequence of recent code refactoring sessions. They represent good opportunities of fix because the code recently refactored is fresh in the developers mind, which means fixing now costs less than fixing later. Fixing issues on recently touched code is also a good way to foster practices that will lead to higher code quality and maintainability, including writing unit-tests and avoiding unnecessary complex code.

###

No code element matched

#### Object Oriented Design

- 1 Rule(s) violated
  - Class with no descendant should be sealed if possible
- 13 validated Rule(s)
  - Avoid interfaces too big
  - Base class should not use derivatives
  - Class shouldn't be too deep in inheritance tree
  - Overrides of Method() should call base.Method()
  - Do not hide base class methods
  - A stateless class or structure might be turned into a static type
  - Non-static classes should be instantiated or turned to static
  - Methods should be declared static if possible
  - Constructor should not call a virtual method
  - Avoid the Singleton pattern
  - Don't assign static fields from instance methods
  - Avoid empty interfaces
  - Avoid types initialization cycles

|  | Validated Rule: Avoid interfaces too big

• Rule Description: This rule matches interfaces with more than 14 methods, properties or events. Interfaces are abstractions and are meant to simplify the code. They should have a single responsibility, and when they become overly large and complex, it means they have too many responsibilities. The Interface Segregation Principle (ISP) advises us that when a large interface is used by various consumers, each of which only requires specific methods, unnecessarily coupling those consumers through the same interface can occur. Furthermore, when dealing with large interfaces, we often end up with larger classes that attempt to handle too many unrelated tasks. A property with a getter or setter or both count as one member. An event count as one member.

• How to Fix Issues of this Rule: Typically to fix such issue, the interface must be refactored in a grape of smaller single-responsibility interfaces. For example if an interface IFoo handles both read and write operations, it can be split into two interfaces: IFooReader and IFooWriter. A usual problem for a large public interface is that it has many clients that consume it. As a consequence splitting it in smaller interfaces has an important impact and it is not always feasible. The estimated Debt, which means the effort to fix such issue, varies linearly from 20 minutes for an interface with 10 methods, up to 7 hours for an interface with 100 or more methods. The Debt is divided by two if the interface is not publicly visible, because in such situation only the current project is impacted by the refactoring.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1200:AvoidInterfacesTooBig", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: Base class should not use derivatives

• Rule Description: In Object-Oriented Programming, the open/closed principle states: software entities (components, classes, methods, etc.) should be open for extension, but closed for modification. http://en.wikipedia.org/wiki/Open/closed_principle Hence a base class should be designed properly to make it easy to derive from, this is extension. But creating a new derived class, or modifying an existing one, shouldn't provoke any modification in the base class. And if a base class is using some derivative classes somehow, there are good chances that such modification will be needed. Extending the base class is not anymore a simple operation, this is not good design. Note that this rule doesn't warn when a base class is using a derived class that is nested in the base class and declared as private. In such situation we consider that the derived class is an encapsulated implementation detail of the base class.

• How to Fix Issues of this Rule: Understand the need for using derivatives, then imagine a new design, and then refactor. Typically an algorithm in the base class needs to access something from derived classes. You can try to encapsulate this access behind an abstract or a virtual method. If you see in the base class some conditions on typeof(DerivedClass) not only urgent refactoring is needed. Such condition can easily be replaced through an abstract or a virtual method. Sometime you'll see a base class that creates instance of some derived classes. In such situation, certainly using the factory method pattern http://en.wikipedia.org/wiki/Factory_method_pattern or the abstract factory pattern http://en.wikipedia.org/wiki/Abstract_factory_pattern will improve the design. The estimated Debt, which means the effort to fix such issue, is equal to 3 minutes per derived class used by the base class + 3 minutes per member of a derived class used by the base class.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1201:BaseClassShouldNotUseDerivatives", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: Class shouldn't be too deep in inheritance tree

• Rule Description: This rule warns about classes having 4 or more base classes. Notice that third-party base classes are not counted because this rule is about your code design, not third-party libraries consumed design. In theory, there is nothing wrong having a long inheritance chain, if the modeling has been well thought out, if each base class is a well-designed refinement of the domain. In practice, modeling properly a domain demands a lot of effort and experience and more often than not, a long inheritance chain is a sign of confused design, that is hard to work with and maintain.

• How to Fix Issues of this Rule: In Object-Oriented Programming, a well-known motto is Favor Composition over Inheritance. This is because inheritance comes with pitfalls. In general, the implementation of a derived class is very bound up with the base class implementation. Also a base class exposes implementation details to its derived classes, that's why it's often said that inheritance breaks encapsulation. On the other hands, Composition favors binding with interfaces over binding with implementations. Hence, not only the encapsulation is preserved, but the design is clearer, because interfaces make it explicit and less coupled. Hence, to break a long inheritance chain, Composition is often a powerful way to enhance the design of the refactored underlying logic. You can also read: http://en.wikipedia.org/wiki/Composition_over_inheritance and http://stackoverflow.com/questions/49002/prefer-composition-over-inheritance The estimated Debt, which means the effort to fix such issue, depends linearly upon the depth of inheritance.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1202:ClassShouldntBeTooDeepInInheritanceTree", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Rule Violated: ND1203 Class with no descendant should be sealed if possible

• Rule Description: If a non-static class isn't declared with the keyword sealed, it means that it can be subclassed everywhere the non-sealed class is visible. Making a class a base class requires significant design effort. Subclassing a non-sealed class, not initially designed to be subclassed, will lead to unanticipated design issue. Most classes are non-sealed because developers don't care about the keyword sealed, not because the primary intention was to write a class that can be subclassed. There are performance gain in declaring a class as sealed. See a benchmark here: https://www.meziantou.net/performance-benefits-of-sealed-class.htm But the real benefit of doing so, is actually to express the intention: this class has not be designed to be a base class, hence it is not allowed to subclass it. Notice that by default this rule doesn't match public class to avoid matching classes that are intended to be sub-classed by third-party code using your library. If you are developing an application and not a library, just uncomment the clause !t.IsPubliclyVisible.

• How to Fix Issues of this Rule: For each matched class, take the time to assess if it is really meant to be subclassed. Certainly most matched class will end up being declared as sealed.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1203:ClassWithNoDescendantShouldBeSealedIfPossible", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

3 types matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

3 types | # lines of code (LOC) | Debt | Severity | Full Name
--- | --- | --- | --- | ---
Program | |m100|0| 172 | |m0|0| 0min 30s | 0Medium | TestClearstreamAPIEndpoint.Program
Token | |m4|1| 8 | |m0|1| 0min 30s | 1Medium | Token
DiTemplateList | |m0|2| 0 | |m0|2| 0min 30s | 2Medium | TestClearstreamAPIEndpoint .DiTemplateList

|  | Validated Rule: Overrides of Method() should call base.Method()

• Rule Description: Typically overrides of a base method, should refine or complete the behavior of the base method. If the base method is not called, the base behavior is not refined but it is replaced. Violations of this rule are a sign of design flaw, especially if the actual design provides valid reasons that advocates that the base behavior must be replaced and not refined.

• How to Fix Issues of this Rule: You should investigate if inheritance is the right choice to bind the base class implementation with the derived classes implementations. Does presenting the method with polymorphic behavior through an interface, would be a better design choice? In such situation, often using the design pattern template method http://en.wikipedia.org/wiki/Template_method_pattern might help improving the design.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1204:OverridesOfMethodShouldCallBaseMethod", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

|  | Validated Rule: Do not hide base class methods

• Rule Description: Method hiding is when a base class defines non-virtual method M(), and a derived class has also a method M() with the same signature. In such situation, calling base.M() does something different than calling derived.M(). Notice that this is not polymorphic behavior. With polymorphic behavior, calling both base.M() and derived.M() on an instance object of derived, invoke the same implementation. This situation should be avoided because it obviously leads to confusion. This rule warns about all method hiding cases in the code base.

• How to Fix Issues of this Rule: To fix a violation of this rule, remove or rename the method, or change the parameter signature so that the method does not hide the base method. However method hiding is for those times when you need to have two things to have the same name but different behavior. This is a very rare situations, described here: https://learn.microsoft.com/en-us/archive/blogs/ericlippert/method-hiding-apologia

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1205:DoNotHideBaseClassMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

|  | Validated Rule: A stateless class or structure might be turned into a static type

• Rule Description: This rule matches classes and structures that are not static, nor generic, that doesn't have any instance fields, that doesn't implement any interface nor has a base class (different than System.Object). Such class or structure is a stateless collection of pure functions, that doesn't act on any this object data. Such collection of pure functions is better hosted in a static class. Doing so simplifies the client code that doesn't have to create an object anymore to invoke the pure functions.

• How to Fix Issues of this Rule: Declare all methods as static and transform the class or structure into a static class. By default issues of this rule have a Low severity because they reflect more an advice than a problem.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1206:AStatelessClassOrStructureMightBeTurnedIntoAStaticType", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: Non-static classes should be instantiated or turned to static

• Rule Description: If the constructors of a class are never called, the class is never instantiated, and should be defined as a static class. However this rule doesn't match instantiation through reflection. As a consequence, plug-in root classes, instantiated through reflection via IoC frameworks, can be false positives for this rule. This rule doesn't match also classes instantiated by the ASP.NET infrastructure, ASP.NET view model classes and Entity Framework ModelSnapshot, DbContext and Migration classes. Notice that by default this rule matches also public class. If you are developing a framework with classes that are intended to be instantiated by your clients, just uncomment the line !t.IsPublic.

• How to Fix Issues of this Rule: First it is important to investigate why the class is never instantiated. If the reason is the class hosts only static methods then the class can be safely declared as static. Others reasons like, the class is meant to be instantiated via reflection, or is meant to be instantiated only by client code should lead to adapt this rule code to avoid these matches.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1207:NonStaticClassesShouldBeInstantiatedOrTurnedToStatic", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: Methods should be declared static if possible

• Rule Description: When an instance method can be safely declared as static you should declare it as static. Whenever you write a method, you fulfill a contract in a given scope. The narrower the scope is, the smaller the chance is that you write a bug. When a method is static, you can't access non-static members; hence, your scope is narrower. So, if you don't need and will never need (even in subclasses) instance fields to fulfill your contract, why give access to these fields to your method? Declaring the method static in this case will let the compiler check that you don't use members that you do not intend to use. Declaring a method as static if possible is also good practice because clients can tell from the method signature that calling the method can't alter the object's state. Doing so, is also a micro performance optimization, since a static method is a bit cheaper to invoke than an instance method, because the this reference* doesn't need anymore to be passed. Notice that if a matched method is a handler, bound to an event through code generated by a designer, declaring it as static might break the designer generated code, if the generated code use the this invocation syntax, (like this.Method()).

• How to Fix Issues of this Rule: Declare matched methods as static. Since such method doesn't use any instance fields and methods of its type and base-types, you should consider if it makes sense, to move such a method to a static utility class.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1208:MethodsShouldBeDeclaredStaticIfPossible", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

|  | Validated Rule: Constructor should not call a virtual method

• Rule Description: This rule matches constructors of a non-sealed class that call one or several virtual methods. During the construction of a .NET object at runtime, constructors execute sequentially, starting from the base class and progressing to the most derived class. Objects maintain their type throughout construction; they begin as the most derived type with the method table corresponding to that type. Consequently, virtual method calls always execute on the most derived type, even when called from within the constructor. Combining these two observations leads to the issue that when you invoke a virtual method within a constructor and the current class is not the most derived type in its inheritance hierarchy, the method will execute on a class whose constructor hasn't been executed yet. This may result in an unsuitable state for the method to be called. Therefore, this situation renders the class error-prone when deriving from it.

• How to Fix Issues of this Rule: Issues reported can be solved by re-designing object initialisation or by declaring the parent class as sealed, if possible. A constructor should primarily focus on initializing the state of its own class. Additional setup can be handled in constructors of derived classes or in dedicated methods called after object construction.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1209:ConstructorShouldNotCallAVirtualMethod", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

|  | Validated Rule: Avoid the Singleton pattern

• Rule Description: The singleton pattern ensures a class has only one instance during runtime: http://en.wikipedia.org/wiki/Singleton_pattern Initially, this pattern may seem attractive due to its simplicity and applicability to common scenarios, making it widely adopted. We advise against using singleton classes because they tend to produce code that is less testable and harder to maintain. Singleton, by design, is not conducive to testing, as it enforces the use of the same instance object across multiple unit tests, limiting the flexibility required for effective testing and maintenance. Additionally, the static Instance getter method of the singleton pattern provides convenient but uncontrolled access to the single object and its state, leading to code that can become disorganized and messy over time, often requiring refactoring efforts. This rule applies specifically to singleton types with mutable instance fields because the pitfalls of singletons arise from unregulated access and modification of instance data. More details available in these discussions: https://blog.ndepend.com/the-proper-usages-of-the-keyword-static-in-c/

• How to Fix Issues of this Rule: This rule pertains to the usual syntax of singletons, where a single static field holds the instance of the parent class. We emphasize that the issue lies in this specific syntax, which hinders testability. The concern is not having a single instance of the class during runtime. To address matches for this rule, create the single instance at the program's startup and pass it explicitly to all classes and methods requiring access. When dealing with multiple singletons, consider consolidating them into a single program execution context. This unified context simplifies propagation across various program units. The estimated Debt, which means the effort to fix such issue, is equal to 3 minutes per method relying on the singleton. It is not rare that hundreds of methods rely on the singleton and that it takes hours to get rid of a singleton, refactoring the way just explained above. The severity of each singleton issue is Critical because as explained, using a the singleton pattern can really prevent the whole program to be testable and maintained.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1210:AvoidTheSingletonPattern", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: Don't assign static fields from instance methods

• Rule Description: Assigning static fields from instance methods leads to poorly maintainable and non-thread-safe code. More discussion on the topic can be found here: https://blog.ndepend.com/the-proper-usages-of-the-keyword-static-in-c/

• How to Fix Issues of this Rule: If the static field is just assigned once in the program lifetime, make sure to declare it as readonly and assign it inline, or from the static constructor. In Object-Oriented-Programming the natural artifact to hold states that can be modified is instance fields. Hence to fix violations of this rule, make sure to hold assignable states through instance fields, not through static fields.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1211:DontAssignStaticFieldsFromInstanceMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No field matched

|  | Validated Rule: Avoid empty interfaces

• Rule Description: Interfaces define members that provide a behavior or usage contract. The functionality that is described by the interface can be adopted by any type, regardless of where the type appears in the inheritance hierarchy. A type implements an interface by providing implementations for the members of the interface. An empty interface does not define any members. Therefore, it does not define a contract that can be implemented. If your design includes empty interfaces that types are expected to implement, you are probably using an interface as a marker or a way to identify a group of types. If this identification will occur at run time, the correct way to accomplish this is to use a custom attribute. Use the presence or absence of the attribute, or the properties of the attribute, to identify the target types. If the identification must occur at compile time, then it is acceptable to use an empty interface. Note that if an interface is empty but implements at least one other interface, it won't be matched by this rule. Such interface can be considered as not empty, since implementing it means that sub-interfaces members must be implemented.

• How to Fix Issues of this Rule: Remove the interface or add members to it. If the empty interface is being used to mark a set of types, replace the interface with a custom attribute. The estimated Debt, which means the effort to fix such issue, is equal to 10 minutes to discard an empty interface plus 3 minutes per type implementing an empty interface.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1212:AvoidEmptyInterfaces", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: Avoid types initialization cycles

• Rule Description: The class constructor, also known as the static constructor and labeled as cctor in IL code, is executed by the runtime the first time a type is utilized. A cctor doesn't need to be explicitly declared in source code to exist in compiled IL code. Having a static field inline initialization is enough to have the cctor implicitly declared in the parent class or structure. If the cctor of a type t1 is using the type t2 and if the cctor of t2 is using t1, some type initialization unexpected and hard-to-diagnose buggy behavior can occur. Such a cyclic chain of initialization is not necessarily limited to two types and can embrace N types in the general case. More information on types initialization cycles can be found here: http://codeblog.jonskeet.uk/2012/04/07/type-initializer-circular-dependencies/ The present code rule enumerates types initialization cycles. Some false positives can appear if some lambda expressions are defined in cctors or in methods called by cctors. In such situation, this rule considers these lambda expressions as executed at type initialization time, while it is not necessarily the case.

• How to Fix Issues of this Rule: Types initialization cycles create confusion and unexpected behaviors. If several states hold by several classes must be initialized during the first access of any of those classes, a better design option is to create a dedicated class whose responsibility is to initialize and hold all these states. The estimated Debt, which means the effort to fix such issue, is equal to 20 minutes per cycle plus 10 minutes per type class constructor involved in the cycle.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1213:AvoidTypesInitializationCycles", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

#### API Breaking Changes

- 6 validated Rule(s)
  - API Breaking Changes: Types
  - API Breaking Changes: Methods
  - API Breaking Changes: Fields
  - API Breaking Changes: Interfaces and Abstract Classes
  - Broken serializable types
  - Avoid changing enumerations Flags status

|  | Validated Rule: API Breaking Changes: Types

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule warns if a type publicly visible in the baseline, is not publicly visible anymore or if it has been removed. Clients code using such type will be broken.

• How to Fix Issues of this Rule: Make sure that public types that used to be presented to clients, still remain public now, and in the future. If a public type must really be removed, you can tag it with System.ObsoleteAttribute with a workaround message during a few public releases, until it gets removed definitely. Notice that this rule doesn't match types removed that were tagged as obsolete. Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consumers of the API.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1500:APIBreakingChangesTypes", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: API Breaking Changes: Methods

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule warns if a method publicly visible in the baseline, is not publicly visible anymore or if it has been removed. Clients code using such method will be broken.

• How to Fix Issues of this Rule: Make sure that public methods that used to be presented to clients, still remain public now, and in the future. If a public method must really be removed, you can tag it with System.ObsoleteAttribute with a workaround message during a few public releases, until it gets removed definitely. Notice that this rule doesn't match methods removed that were tagged as obsolete. Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consumers of the API.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1501:APIBreakingChangesMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

|  | Validated Rule: API Breaking Changes: Fields

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule warns if a field publicly visible in the baseline, is not publicly visible anymore or if it has been removed. Clients code using such field will be broken.

• How to Fix Issues of this Rule: Make sure that public fields that used to be presented to clients, still remain public now, and in the future. If a public field must really be removed, you can tag it with System.ObsoleteAttribute with a workaround message during a few public releases, until it gets removed definitely. Notice that this rule doesn't match fields removed that were tagged as obsolete. Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consumers of the API.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1502:APIBreakingChangesFields", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No field matched

|  | Validated Rule: API Breaking Changes: Interfaces and Abstract Classes

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule warns if a publicly visible interface or abstract class has been changed and contains new abstract methods or if some abstract methods have been removed. Clients code that implement such interface or derive from such abstract class will be broken.

• How to Fix Issues of this Rule: Make sure that the public contracts of interfaces and abstract classes that used to be presented to clients, remain stable now, and in the future. If a public contract must really be changed, you can tag abstract methods that will be removed with System.ObsoleteAttribute with a workaround message during a few public releases, until it gets removed definitely. Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consummers of the API. The severity is not set to Critical because an interface is not necessarily meant to be implemented by the consummer of the API.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1503:APIBreakingChangesInterfacesAndAbstractClasses", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: Broken serializable types

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule warns about breaking changes in types tagged with SerializableAttribute. To do so, this rule searches for serializable type with serializable instance fields added or removed. Notice that it doesn't take account of fields tagged with NonSerializedAttribute. From http://msdn.microsoft.com/library/system.serializableattribute.aspx : "All the public and private fields in a type that are marked by the SerializableAttribute are serialized by default, unless the type implements the ISerializable interface to override the serialization process. The default serialization process excludes fields that are marked with the NonSerializedAttribute attribute."

• How to Fix Issues of this Rule: Make sure that the serialization process of serializable types remains stable now, and in the future. Else you'll have to deal with Version Tolerant Serialization that is explained here: https://msdn.microsoft.com/en-us/library/ms229752(v=vs.110).aspx Issues of this rule have a severity equal to High because an API Breaking change can provoque significant friction with consummers of the API.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1504:BrokenSerializableTypes", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Validated Rule: Avoid changing enumerations Flags status

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule matches enumeration types that used to be tagged with FlagsAttribute in the baseline, and not anymore. It also matches the opposite, enumeration types that are now tagged with FlagsAttribute, and were not tagged in the baseline. Being tagged with FlagsAttribute is a strong property for an enumeration. Not so much in terms of behavior (only the enum.ToString() method behavior changes when an enumeration is tagged with FlagsAttribute) but in terms of meaning: is the enumeration a range of values or a range of flags? As a consequence, changing the FlagsAttributes status of an enumeration can have significant impact for its clients.

• How to Fix Issues of this Rule: Make sure the FlagsAttribute status of each enumeration remains stable now, and in the future.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1505:AvoidChangingEnumerationsFlagsStatus", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

#### Code Coverage

- 10 validated Rule(s)
  - Code should be tested
  - New Types and Methods should be tested
  - Methods refactored should be tested
  - Assemblies and Namespaces should be tested
  - Types almost 100% tested should be 100% tested
  - Namespaces almost 100% tested should be 100% tested
  - Types that used to be 100% covered by tests should still be 100% covered
  - Types tagged with FullCoveredAttribute should be 100% covered
  - Types 100% covered should be tagged with FullCoveredAttribute
  - Methods should have a low C.R.A.P score

|  | Validated Rule: Code should be tested

• Rule Description: This rule lists methods not covered at all by test or partially covered by tests. When a type is 0% covered by tested, the type is matched instead of all its methods to reduce the number of issues. For each match, the rules estimates the technical debt, i.e the effort to write unit and integration tests for the method. The estimation is based on the effort to develop the code element multiplied by factors in the range ]0,1.3] based on • the method code size and complexity • the actual percentage coverage • the abstractness of types used, because relying on classes instead of interfaces makes the code more difficult to test • the method visibility because testing private or protected methods is more difficult than testing public and internal ones • the fields used by the method, because is is more complicated to write tests for methods that read mutable static fields whose changing state is shared across tests executions. • whether the method is considered JustMyCode or not because NotMyCode is often generated easier to get tested since tests can be generated as well. This rule is necessarily a large source of technical debt, since the code left untested is by definition part of the technical debt. This rule also estimates the annual interest, i.e the annual cost to let the code uncovered, based on the effort to develop the code element, multiplied by factors based on usage of the code element. When methods are aggregated within their parent type, the estimated debt and annual interest is aggregated as well.

• How to Fix Issues of this Rule: Write unit tests to test and cover the methods and their parent types matched by this rule.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1600:CodeShouldBeTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No code container matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: New Types and Methods should be tested

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule operates only on types and methods added or refactored since the baseline. This rule is executed only if some code coverage data is imported from some code coverage files. It is important to write code mostly covered by tests to achieve maintainable and non-error-prone code. In real-world, many code bases are poorly covered by tests. However it is not practicable to stop the development for months to refactor and write tests to achieve high code coverage ratio. Hence it is recommended that each time a method (or a type) gets added, the developer takes the time to write associated unit-tests to cover it. Doing so will help to increase significantly the maintainability of the code base. You'll notice that quickly, refactoring will also be driven by testability, and as a consequence, the overall code structure and design will increase as well. Issues of this rule have a High severity because they reflect an actual trend to not care about writing tests on refactored code.

• How to Fix Issues of this Rule: Write unit-tests to cover the code of most methods and types added since the baseline.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1601:NewMethodsShouldBeTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No code container matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: Methods refactored should be tested

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule operates only on methods added or refactored since the baseline. This rule is executed only if some code coverage data is imported from some code coverage files. It is important to write code mostly covered by tests to achieve maintainable and non-error-prone code. In real-world, many code bases are poorly covered by tests. However it is not practicable to stop the development for months to refactor and write tests to achieve high code coverage ratio. Hence it is recommended that each time a method (or a type) gets refactored, the developer takes the time to write associated unit-tests to cover it. Doing so will help to increase significantly the maintainability of the code base. You'll notice that quickly, refactoring will also be driven by testability, and as a consequence, the overall code structure and design will increase as well. Issues of this rule have a High severity because they reflect an actual trend to not care about writing tests on refactored code.

• How to Fix Issues of this Rule: Write unit-tests to cover the code of most methods and classes refactored.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1602:MethodsRefactoredShouldBeTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: Assemblies and Namespaces should be tested

• Rule Description: This rule lists assemblies and namespaces that are not covered at all by unit tests. If an assembly is matched its children namespaces are not matched. This rule goal is not to collide with the Code should be tested rule that lists uncovered code for each method and infer the effort to write unit tests (the Debt) and the annual cost to let the code untested (the Annual Interest). This rule goal is to inform of large code elements left untested. As a consequence the Debt per issue is only 4 minutes and the severity of the issues is Low.

• How to Fix Issues of this Rule: Write unit and integration tests to cover, even partially, code elements matched by this rule. Then use issues of the rules Code should be tested, New Types and Methods should be tested and Methods refactored should be tested to write more tests where it matters most, and eventually refactor some code to make it more testable.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1603:AssembliesNamespacesAndTypesShouldBeTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No code element parent matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: Types almost 100% tested should be 100% tested

• Rule Description: This rule is executed only if some code coverage data is imported from some code coverage files. Often covering the few percents of remaining uncovered code of a class, requires as much work as covering the first 90%. For this reason, often teams estimate that 90% coverage is enough. However untestable code usually means poorly written code which usually leads to error prone code. So it might be worth refactoring and making sure to cover the few uncovered lines of code because most tricky bugs might come from this small portion of hard-to-test code. Not all classes should be 100% covered by tests (like UI code can be hard to test) but you should make sure that most of the logic of your application is defined in some easy-to-test classes, 100% covered by tests. Issues of this rule have a High severity because as explained, such situation is bug-prone.

• How to Fix Issues of this Rule: Write more unit-tests dedicated to cover code not covered yet. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1604:TypesAlmost100PercentTestedShouldBe100PercentTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: Namespaces almost 100% tested should be 100% tested

• Rule Description: This rule is executed only if some code coverage data is imported from some code coverage files. Often covering the few percents of remaining uncovered code of one or several classes in a namespace requires as much work as covering the first 90%. For this reason, often teams estimate that 90% coverage is enough. However untestable code usually means poorly written code which usually leads to error prone code. So it might be worth refactoring and making sure to cover the few uncovered lines of code because most tricky bugs might come from this small portion of hard-to-test code. Not all classes should be 100% covered by tests (like UI code can be hard to test) but you should make sure that most of the logic of your application is defined in some easy-to-test classes, 100% covered by tests. Issues of this rule have a High severity because as explained, such situation is bug-prone.

• How to Fix Issues of this Rule: Write more unit-tests dedicated to cover code not covered yet in the namespace. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1605:NamespacesAlmost100PercentTestedShouldBe100PercentTested", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No namespace matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: Types that used to be 100% covered by tests should still be 100% covered

• Rule Description: This rule is executed only if a baseline for comparison is defined (diff mode). This rule is executed only if some code coverage data is imported from some code coverage files. Often covering 10% of remaining uncovered code of a class, requires as much work as covering the first 90%. For this reason, typically teams estimate that 90% coverage is enough. However untestable code usually means poorly written code which usually leads to error prone code. So it might be worth refactoring and making sure to cover the 10% remaining code because most tricky bugs might come from this small portion of hard-to-test code. Not all classes should be 100% covered by tests (like UI code can be hard to test) but you should make sure that most of the logic of your application is defined in some easy-to-test classes, 100% covered by tests. In this context, this rule warns when a type fully covered by tests is now only partially covered. Issues of this rule have a High severity because often, a type that used to be 100% and is not covered anymore is a bug-prone situation that should be carefully handled.

• How to Fix Issues of this Rule: Write more unit-tests dedicated to cover code not covered anymore. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring. You'll find code impossible to cover by unit-tests, like calls to MessageBox.Show(). An infrastructure must be defined to be able to mock such code at test-time.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1606:TypesThatUsedToBe100PercentCoveredByTestsShouldStillBe100PercentCovered", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: Types tagged with FullCoveredAttribute should be 100% covered

• Rule Description: This rule lists methods partially covered by tests, of types tagged with FullCoveredAttribute. This rule is executed only if some code coverage data is imported from some code coverage files. By using a FullCoveredAttribute, you can express in source code the intention that a class is 100% covered by tests, and should remain 100% covered in the future. If you don't want to link NDepend.API.dll, you can use your own attribute and adapt the source code of this rule. Benefits of using a FullCoveredAttribute are twofold: Not only the intention is expressed in source code, but it is also continuously checked by the present rule. Often covering 10% of remaining uncovered code of a class, requires as much work as covering the first 90%. For this reason, often teams estimate that 90% coverage is enough. However untestable code usually means poorly written code which usually means error prone code. So it might be worth refactoring and making sure to cover the 10% remaining code because most tricky bugs might come from this small portion of hard-to-test code. Not all classes should be 100% covered by tests (like UI code can be hard to test) but you should make sure that most of the logic of your application is defined in some easy-to-test classes, 100% covered by tests. Issues of this rule have a High severity because often, a type that used to be 100% and is not covered anymore is a bug-prone situation that should be carefully handled.

• How to Fix Issues of this Rule: Write more unit-tests dedicated to cover code of matched classes not covered yet. If you find some hard-to-test code, it is certainly a sign that this code is not well designed and hence, needs refactoring.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1607:TypesTaggedWithFullCoveredAttributeShouldBe100PercentCovered", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: Types 100% covered should be tagged with FullCoveredAttribute

• Rule Description: This rule is executed only if some code coverage data is imported from some code coverage files. By using an attribute class named FullCoveredAttribute, you can express in source code the intention that a class is 100% covered by tests, and should remain 100% covered in the future. Benefits of using a FullCoveredAttribute are twofold: Not only the intention is expressed in source code, but it is also continuously checked by the rule Types tagged with FullCoveredAttribute should be 100% covered. Issues of this rule have an Low severity because they don't reflect a problem, but provide an advice for potential improvement.

• How to Fix Issues of this Rule: Just tag types 100% covered by tests with the FullCoveredAttribute class that can be found in NDepend.API.dll, or by an attribute of yours with this name defined in any namespace in your own code.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1608:Types100PercentCoveredShouldBeTaggedWithFullCoveredAttribute", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

- To run this query import some Code Coverage Data..

|  | Validated Rule: Methods should have a low C.R.A.P score

• Rule Description: This rule is executed only if some code coverage data is imported from some code coverage files. So far this rule is disabled because other code coverage rules assess properly code coverage issues. Change Risk Analyzer and Predictor (i.e. CRAP) is a code metric that helps in pinpointing overly both complex and untested code. Is has been first defined here: http://www.artima.com/weblogs/viewpost.jsp?thread=215899 The Formula is: CRAP(m) = CC(m)^2 * (1 – cov(m)/100)^3 + CC(m) • where CC(m) is the cyclomatic complexity of the method m • and cov(m) is the percentage coverage by tests of the method m Matched methods cumulates two highly error prone code smells: • A complex method, difficult to develop and maintain. • Non 100% covered code, difficult to refactor without introducing any regression bug. The higher the CRAP score, the more painful to maintain and error prone is the method. An arbitrary threshold of 30 is fixed for this code rule as suggested by inventors. Notice that no amount of testing will keep methods with a Cyclomatic Complexity higher than 30, out of CRAP territory. Notice that this rule doesn't match too short method with less than 10 lines of code.

• How to Fix Issues of this Rule: In such situation, it is recommended to both refactor the complex method logic into several smaller and less complex methods (that might belong to some new types especially created), and also write unit-tests to full cover the refactored logic. You'll find code impossible to cover by unit-tests, like calls to MessageBox.Show(). An infrastructure must be defined to be able to mock such code at test-time.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1609:MethodsShouldHaveALowCRAPScore", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No method matched

- To run this query import some Code Coverage Data..

#### Dead Code

- 1 Rule(s) violated
  - Potentially Dead Methods
- 3 validated Rule(s)
  - Potentially Dead Types
  - Potentially Dead Fields
  - Wrong usage of IsNotDeadCodeAttribute

|  | Validated Rule: Potentially Dead Types

• Rule Description: This rule lists potentially dead types. A dead type is a type that can be removed because it is never used by the program. This rule lists not only types not used anywhere in code, but also types used only by types not used anywhere in code. This is why this rule comes with a column TypesusingMe and this is why there is a code metric named depth: • A depth value of 0 means the type is not used. • A depth value of 1 means the type is used only by types not used. • etc… By reading the source code of this rule, you'll see that by default, public types are not matched, because such type might not be used by the analyzed code, but still be used by client code, not analyzed by NDepend. This default behavior can be easily changed. Note that this rule doesn't match Entity Framework ModelSnapshot classes that are used ony by the EF infrastructure.

• How to Fix Issues of this Rule: Static analysis cannot provide an exact list of dead types, because there are several ways to use a type dynamically (like through reflection). For each type matched by this query, first investigate if the type is used somehow (like through reflection). If the type is really never used, it is important to remove it to avoid maintaining useless code. If you estimate the code of the type might be used in the future, at least comment it, and provide an explanatory comment about the future intentions. If a type is used somehow, but still is matched by this rule, you can tag it with the attribute IsNotDeadCodeAttribute found in NDepend.API.dll to avoid matching the type again. You can also provide your own attribute for this need, but then you'll need to adapt this code rule. Issues of this rule have a Debt equal to 15 minutes because it only takes a short while to investigate if a type can be safely discarded. The Annual Interest of issues of this rule, the annual cost to not fix such issue, is proportional to the type #lines of code, because the bigger the type is, the more it slows down maintenance.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1700:PotentiallyDeadTypes", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No type matched

|  | Rule Violated: ND1701 Potentially Dead Methods

• Rule Description: This rule lists potentially dead methods. A dead method is a method that can be removed because it is never called by the program. This rule lists not only methods not called anywhere in code, but also methods called only by methods not called anywhere in code. This is why this rule comes with a column MethodsCallingMe and this is why there is a code metric named depth: • A depth value of 0 means the method is not called. • A depth value of 1 means the method is called only by methods not called. • etc… By reading the source code of this rule, you'll see that by default, public methods are not matched, because such method might not be called by the analyzed code, but still be called by client code, not analyzed by NDepend. This default behavior can be easily changed.

• How to Fix Issues of this Rule: Static analysis cannot provide an exact list of dead methods, because there are several ways to invoke a method dynamically (like through reflection). For each method matched by this query, first investigate if the method is invoked somehow (like through reflection). If the method is really never invoked, it is important to remove it to avoid maintaining useless code. If you estimate the code of the method might be used in the future, at least comment it, and provide an explanatory comment about the future intentions. If a method is invoked somehow, but still is matched by this rule, you can tag it with the attribute IsNotDeadCodeAttribute found in NDepend.API.dll to avoid matching the method again. You can also provide your own attribute for this need, but then you'll need to adapt this code rule. Issues of this rule have a Debt equal to 10 minutes because it only takes a short while to investigate if a method can be safely discarded. On top of these 10 minutes, the depth of usage of such method adds up 3 minutes per unity because dead method only called by dead code takes a bit more time to be investigated. The Annual Interest of issues of this rule, the annual cost to not fix such issue, is proportional to the type #lines of code, because the bigger the method is, the more it slows down maintenance.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1701:PotentiallyDeadMethods", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

3 methods matched | Formatting: bold✱ means added ● means code was changed strike-bold means removed (since baseline)

3 methods | depth | MethodsCallingMe | Debt | Annual Interest | Full Name
--- | --- | --- | --- | --- | ---
ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors) | |m0|0| 0 | 0no method | |m0|0| 10min | 210min | TestClearstreamAPIEndpoint.Program .ValidateRemoteCertificate(Object ,X509Certificate,X509Chain ,SslPolicyErrors)
GetRefreshTokenAsync(Token) | |m0|1| 0 | 1no method | |m0|1| 10min | 042min | TestClearstreamAPIEndpoint.Program .GetRefreshTokenAsync(Token)
CallClearstreamPlaygroundApiAsyn c (Token) | |m0|2| 0 | 2no method | |m0|2| 10min | 128min | TestClearstreamAPIEndpoint.Program .CallClearstreamPlaygroundApiAsync (Token)

|  | Validated Rule: Potentially Dead Fields

• Rule Description: This rule lists potentially dead fields. A dead field is a field that can be removed because it is never used by the program. By reading the source code of this rule, you'll see that by default, public fields are not matched, because such field might not be used by the analyzed code, but still be used by client code, not analyzed by NDepend. This default behavior can be easily changed. Some others default rules in the Visibility group, warn about public fields. More restrictions are applied by this rule because of some by-design limitations. NDepend mostly analyzes compiled IL code, and the information that an enumeration value or a literal constant (which are fields) is used is lost in IL code. Hence by default this rule won't match such field.

• How to Fix Issues of this Rule: Static analysis cannot provide an exact list of dead fields, because there are several ways to assign or read a field dynamically (like through reflection). For each field matched by this query, first investigate if the field is used somehow (like through reflection). If the field is really never used, it is important to remove it to avoid maintaining a useless code element. If a field is used somehow, but still is matched by this rule, you can tag it with the attribute IsNotDeadCodeAttribute found in NDepend.API.dll to avoid matching the field again. You can also provide your own attribute for this need, but then you'll need to adapt this code rule. Issues of this rule have a Debt equal to 10 minutes because it only takes a short while to investigate if a method can be safely discarded. The Annual Interest of issues of this rule, the annual cost to not fix such issue, is set by default to 8 minutes per unused field matched.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1702:PotentiallyDeadFields", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No field matched

|  | Validated Rule: Wrong usage of IsNotDeadCodeAttribute

• Rule Description: The attribute NDepend.Attributes.IsNotDeadCodeAttribute is defined in NDepend.API.dll. This attribute is used to mean that a code element is not used directly, but is used somehow, like through reflection. This attribute is used in the dead code rules, Potentially dead Types, Potentially dead Methods and Potentially dead Fields. If you don't want to link NDepend.API.dll, you can use your own IsNotDeadCodeAttribute and adapt the source code of this rule, and the source code of the dead code rules. In this context, this code rule matches code elements (types, methods, fields) that are tagged with this attribute, but still used directly somewhere in the code.

• How to Fix Issues of this Rule: Just remove IsNotDeadCodeAttribute tagging of types, methods and fields matched by this rule because this tag is not useful anymore.

• How to Suppress an Issue of this Rule: In source code, tag the concerned code element with this attribute: [SuppressMessage("NDepend", "ND1703:WrongUsageOfIsNotDeadCodeAttribute", Justification="...")] This attribute requires the compilation symbol CODE_ANALYSIS to be set on each Visual Studio project relying on it. Without CODE_ANALYSIS symbol defined, the attribute is not compiled and the issues are not suppressed.

###

No member matched

#### Code Diff Summary

» Baseline : Baseline is same code base snapshot.

- 25 Queries
  - New assemblies
  - Assemblies removed
  - Assemblies where code was changed
  - New namespaces
  - Namespaces removed
  - Namespaces where code was changed
  - New types
  - Types removed
  - Types where code was changed
  - Heuristic to find types moved from one namespace or assembly to another
  - Types directly using one or several types changed
  - Types indirectly using one or several types changed
  - New methods
  - Methods removed
  - Methods where code was changed
  - Methods directly calling one or several methods changed
  - Methods indirectly calling one or several methods changed
  - New fields
  - Fields removed
  - Third party types that were not used and that are now used
  - Third party types that were used and that are not used anymore
  - Third party methods that were not used and that are now used
  - Third party methods that were used and that are not used anymore
  - Third party fields that were not used and that are now used
  - Third party fields that were used and that are not used anymore

|  | Code Query: New assemblies

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists assemblies that have been added since the baseline.

###

No assembly matched

|  | Code Query: Assemblies removed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists assemblies that have been removed since the baseline.

###

No assembly matched

|  | Code Query: Assemblies where code was changed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists assemblies in which, code has been changed since the baseline.

###

No assembly matched

|  | Code Query: New namespaces

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists namespaces that have been added since the baseline.

###

No namespace matched

|  | Code Query: Namespaces removed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists namespaces that have been removed since the baseline.

###

No namespace matched

|  | Code Query: Namespaces where code was changed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists namespaces in which, code has been changed since the baseline.

###

No namespace matched

|  | Code Query: New types

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists types that have been added since the baseline.

###

No type matched

|  | Code Query: Types removed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists types that have been removed since the baseline.

###

No type matched

|  | Code Query: Types where code was changed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists types in which, code has been changed since the baseline. To visualize changes in code, right-click a matched type and select: • Compare older and newer versions of source file • Compare older and newer versions decompiled with Reflector

###

No type matched

|  | Code Query: Heuristic to find types moved from one namespace or assembly to another

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists types moved from one namespace or assembly to another. The heuristic implemented consists in making a join LINQ query on type name (without namespace prefix), applied to the two sets of types added and types removed.

###

No type matched

|  | Code Query: Types directly using one or several types changed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists types unchanged since the baseline but that use directly some types where code has been changed since the baseline. For such matched type, the code hasen't been changed, but still the overall behavior might have been changed. The query result includes types changed directly used,

###

No type matched

|  | Code Query: Types indirectly using one or several types changed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists types unchanged since the baseline but that use directly or indirectly some types where code has been changed since the baseline. For such matched type, the code hasen't been changed, but still the overall behavior might have been changed. The query result includes types changed directly used, and the depth of usage of types indirectly used, depth of usage as defined in the documentation of DepthOfIsUsingAny() NDepend API method: https://www.ndepend.com/api/webframe.html#NDepend.API~NDepend.CodeModel.ExtensionMethodsSequenceUsage~DepthOfIsUsingAny.html

###

No type matched

|  | Code Query: New methods

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists methods that have been added since the baseline.

###

No method matched

|  | Code Query: Methods removed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists methods that have been removed since the baseline.

###

No method matched

|  | Code Query: Methods where code was changed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists methods in which, code has been changed since the baseline. To visualize changes in code, right-click a matched method and select: • Compare older and newer versions of source file • Compare older and newer versions decompiled with Reflector

###

No method matched

|  | Code Query: Methods directly calling one or several methods changed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists methods unchanged since the baseline but that call directly some methods where code has been changed since the baseline. For such matched method, the code hasen't been changed, but still the overall behavior might have been changed. The query result includes methods changed directly used,

###

No method matched

|  | Code Query: Methods indirectly calling one or several methods changed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists methods unchanged since the baseline but that use directly or indirectly some methods where code has been changed since the baseline. For such matched method, the code hasen't been changed, but still the overall behavior might have been changed. The query result includes methods changed directly used, and the depth of usage of methods indirectly used, depth of usage as defined in the documentation of DepthOfIsUsingAny() NDepend API method: https://www.ndepend.com/api/webframe.html#NDepend.API~NDepend.CodeModel.ExtensionMethodsSequenceUsage~DepthOfIsUsingAny.html

###

No method matched

|  | Code Query: New fields

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists fields that have been added since the baseline.

###

No field matched

|  | Code Query: Fields removed

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists fields that have been removed since the baseline.

###

No field matched

|  | Code Query: Third party types that were not used and that are now used

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists types defined in third-party assemblies, that were not used at baseline time, and that are now used.

###

No type matched

|  | Code Query: Third party types that were used and that are not used anymore

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists types defined in third-party assemblies, that were used at baseline time, and that are not used anymore.

###

No type matched

|  | Code Query: Third party methods that were not used and that are now used

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists methods defined in third-party assemblies, that were not used at baseline time, and that are now used.

###

No method matched

|  | Code Query: Third party methods that were used and that are not used anymore

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists methods defined in third-party assemblies, that were used at baseline time, and that are not used anymore.

###

No method matched

|  | Code Query: Third party fields that were not used and that are now used

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists fields defined in third-party assemblies, that were not used at baseline time, and that are now used.

###

No field matched

|  | Code Query: Third party fields that were used and that are not used anymore

• Query Description: This query is executed only if a baseline for comparison is defined (diff mode). This code query lists fields defined in third-party assemblies, that were used at baseline time, and that are not used anymore.

###

No field matched

#### Assemblies Dependencies

Assembly | Depends on | Is referenced by
--- | --- | ---
ClearstreamAPIConnector v1.0.0.0 | System.Runtime v7.0.0.0 ; System.Collections v7.0.0.0 ; System.Net.Http v7.0.0.0 ; System.Console v7.0.0.0 ; System.Security.Cryptography v7.0.0.0 ; System.Net.Primitives v7.0.0.0 ; System.Net.Security v7.0.0.0 ; System.Text.Json v7.0.0.0 ; System.Net.ServicePoint v7.0.0.0 ; System.Net.WebProxy v7.0.0.0 ; | -

#### Assemblies Build Order

1. ClearstreamAPIConnector

#### Assemblies Build Order

1. ClearstreamAPIConnector

#### Abstractness versus Instability Diagram

The Abstractness versus Instability Diagram helps to detect which assemblies are potentially painful to maintain (i.e concrete and stable) and which assemblies are potentially useless (i.e abstract and instable).

- Abstractness: If an assembly contains many abstract types (i.e interfaces and abstract classes) and few concrete types, it is considered as abstract.
- Instability: An assembly is considered stable if its types are used by a lot of types from other assemblies. In this context stable means painful to modify.

Online documentation:

- Definitions of related Code Metrics