I have seen the attributes [DebuggerNonUserCode]and [ExcludeFromCodeCoverage]resources and other SO questions on the exclusion of the code coverage statistics, and wanted to know if it is possible to automatically add this attribute to the code classes are generated by the Entity Framework, using .NET 4.0.
[DebuggerNonUserCode]
[ExcludeFromCodeCoverage]
Should there also be a class level, or could it be at a level diagram.Designer.cs, why do we need one attribute for all the code generated by this diagram?
diagram.Designer.cs
, . T4 . , .
( Entity Framework) , , , .
, , - T4 ( @Craig Stuntz answer):
using System.Diagnostics.CodeAnalysis;
[ExcludeFromCodeCoverage] getters, seters Factory, :
#>get
#>set
Template_FactoryMethodComment
.
, Tangible T4 VS.
, , , , " ", , , .