NDepend.API Documentation
SimpleNameLike Method
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqNaming Class : SimpleNameLike Method
This NDepend.CodeModel.ICodeElement object.
The regular expression is defined with the System.Text.RegularExpressions syntax.
The regular expression string can be suffixed with "\i" to specify the ignore case option.
Returns true if this codeElement.NDepend.CodeModel.ICodeElement.SimpleName string matches the regular expression regexString. This method can only be called in a ICQLinqExecutionContext, otherwise the extension method NDepend.CodeModel.ExtensionMethodsNaming.NDepend.CodeModel.ExtensionMethodsNaming.WithFullNameLike<TCodeElement> must be called instead.
Syntax
[Extension()]
public static bool SimpleNameLike( 
   ICodeElement codeElement,
   string regexString
)

Parameters

codeElement
This NDepend.CodeModel.ICodeElement object.
regexString
The regular expression is defined with the System.Text.RegularExpressions syntax.
The regular expression string can be suffixed with "\i" to specify the ignore case option.
Exceptions
ExceptionDescription
This extension method cannot be called from a program consuming NDepend.API. In such context, the method NDepend.CodeModel.ExtensionMethodsNaming.NDepend.CodeModel.ExtensionMethodsNaming.WithSimpleNameLike<TCodeElement> must be called instead.
Remarks
In the context of a CQLinq compiled query, this method has a constant time complexity.
Requirements

Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed

See Also

Reference

ExtensionMethodsCQLinqNaming Class
ExtensionMethodsCQLinqNaming Members
FullName Property
WithSimpleNameLike<TCodeElement> Method
WithSimpleName<TCodeElement> Method
WithSimpleNameIn<TCodeElement> Method
WithSimpleNameNotIn<TCodeElement> Method
WithSimpleNameWildcardMatch<TCodeElement> Method
ToSimpleNameLikePredicate Method