NDepend.API Documentation
CreateA Method (ExtensionMethodsCQLinqDependency)
NDepend.Reserved.CQLinq Namespace > ExtensionMethodsCQLinqDependency Class : CreateA Method
This method.
The NDepend.CodeModel.ICodeElement.FullName of the instantiated type.
The string createdTypeFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several types are matched by createdTypeFullName, this method has a creates an instance of any behavior.
Returns true if method is calling a constructor of a type, whose NDepend.CodeModel.ICodeElement.FullName is createdTypeFullName. This method can only be called in a ICQLinqExecutionContext, otherwise the method NDepend.CodeModel.IMethod.NDepend.CodeModel.IMethod.CreateA must be used instead.
Syntax
[Extension()]
public static bool CreateA( 
   IMethod method,
   string createdTypeFullName
)

Parameters

method
This method.
createdTypeFullName
The NDepend.CodeModel.ICodeElement.FullName of the instantiated type.
The string createdTypeFullName can contain wildcard '*' characters but cannot be just a single wildcard string "*".
If one or several types are matched by createdTypeFullName, this method has a creates an instance of any behavior.

Return Value

createdType being a NDepend.CodeModel.IType whose NDepend.CodeModel.ICodeElement.FullName is createdTypeFullName:
Returns true if method is creating an instance of createdType, otherwise returns false.
Exceptions
ExceptionDescription
This extension method cannot be called from a program consuming NDepend.API. In such context, the method NDepend.CodeModel.IMethod.NDepend.CodeModel.IMethod.CreateA must be used instead.
Remarks
If one or several types are matched by createdTypeFullName, they will be listed in NDepend.CodeQuery.IQueryExecutionSuccessResult.TargetCodeElements.
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

ExtensionMethodsCQLinqDependency Class
ExtensionMethodsCQLinqDependency Members
CreateA Method
ThatCreateA Method
ThatCreateAny Method
ThatIndirectlyCreateAny Method
DepthOfCreateA Method
DepthOfCreateAny Method
DepthOfCreateA Method
IndirectlyCreateA Method