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

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

.NET API 245,760 bytes

 ICodePartExtensions

public static class ICodePartExtensions
Extension methods for the ICodePart class.
public static CsElement FindParentElement(this ICodePart part)

Gets the element that contains this code unit, if there is one.

public static Expression FindParentExpression(this ICodePart part)

Gets the expression that contains this code part, if there is one.

public static Statement FindParentStatement(this ICodePart part)

Gets the statement that contains this code unit, if there is one.