Custom attribute that, when applied to an aspect class, specifies how many manual lines of code are avoided every time the aspect is used.
Namespace: PostSharp.Aspects
Assembly: PostSharp.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public sealed class LinesOfCodeAvoidedAttribute : AttributeRemarks
PostSharp uses this value to estimate the number of lines of handwritten code avoided by aspects. Without this attribute, PostSharp uses a default estimate based on the advices of the aspect. For composite aspects, you can give an estimate for each advice with the LinesOfCodeAvoided property of the advice custom attribute.
Constructors
| Name | Description |
|---|---|
| LinesOfCodeAvoidedAttribute(int) | Initializes a new instance of the LinesOfCodeAvoidedAttribute class. |
Properties
| Name | Description |
|---|---|
| Count | Gets the number of lines of code saved every time the aspect is applied to a target class. |