StyleCop.CSharp by StyleCop contributors, Andy Reeves, Chris Dahlberg

<PackageReference Include="StyleCop.CSharp" Version="6.2.0" />

.NET API 245,760 bytes

 CsElement

public abstract class CsElement : CodeUnit, ICodeElement
Describes a single element in a C# code file.

Gets the element's access modifier.

Gets the actual visibility of this element outside of the current class, taking into account the access of the element's parent.

public object AnalyzerTag { get; set; }

Gets or sets the analyzer tag.

public ICollection<Attribute> Attributes { get; }

Gets the list of attributes attached to the element.

Gets the collection of child elements beneath this element.

Gets the collection of child elements one level under this element, if any.

public Declaration Declaration { get; }

Gets the element declaration.

public CodeDocument Document { get; }

Gets the document that contains this element.

Gets the collection of tokens in the element.

public ElementType ElementType { get; }

Gets the type of the element.

public string FullNamespaceName { get; }

Gets the full name of the element.

public string FullyQualifiedName { get; }

Gets the fully qualified name of the element.

public bool Generated { get; }

Gets a value indicating whether the element resides within a block of generated code.

public XmlHeader Header { get; }

Gets the Xml header for the element.

public string Name { get; }

Gets the name of the element.

protected string QualifiedName { get; protected set; }

Gets or sets the fully qualified name of the element.

public bool Unsafe { get; }

Gets a value indicating whether the element resides within a block of unsafe code, or whether the element declares itself as unsafe.

public ICollection<Violation> Violations { get; }

Gets the violations found in this element.

public bool AddViolation(Violation violation)

Adds one violation to this element.

public virtual void ClearAnalyzerTags()

Clears the analyzer tags for this element.

public void WalkElement<T>(CodeWalkerElementVisitor<T> elementCallback, CodeWalkerStatementVisitor<T> statementCallback, CodeWalkerExpressionVisitor<T> expressionCallback, CodeWalkerQueryClauseVisitor<T> queryClauseCallback, T context)

Walks through the code units in the element.

public void WalkElement<T>(CodeWalkerElementVisitor<T> elementCallback, CodeWalkerStatementVisitor<T> statementCallback, CodeWalkerExpressionVisitor<T> expressionCallback, T context)

Walks through the code units in the element.

public void WalkElement<T>(CodeWalkerElementVisitor<T> elementCallback, CodeWalkerStatementVisitor<T> statementCallback, T context)

Walks through the code units in the element.

public void WalkElement<T>(CodeWalkerElementVisitor<T> elementCallback, T context)

Walks through the code units in the element.

public void WalkElement(CodeWalkerElementVisitor<object> elementCallback, CodeWalkerStatementVisitor<object> statementCallback, CodeWalkerExpressionVisitor<object> expressionCallback, CodeWalkerQueryClauseVisitor<object> queryClauseCallback)

Walks through the code units in the element.

public void WalkElement(CodeWalkerElementVisitor<object> elementCallback, CodeWalkerStatementVisitor<object> statementCallback, CodeWalkerExpressionVisitor<object> expressionCallback)

Walks through the code units in the element.

public void WalkElement(CodeWalkerElementVisitor<object> elementCallback, CodeWalkerStatementVisitor<object> statementCallback)

Walks through the code units in the element.

public void WalkElement(CodeWalkerElementVisitor<object> elementCallback)

Walks through the code units in the element.