CodeTypeRefExtensions Class
Useful extension methods for CodeTypeRef
Assembly: Microsoft.AspNet.Scaffolding.12.0 (in Microsoft.AspNet.Scaffolding.12.0.dll)
The CodeTypeRefExtensions type exposes the following members.
| Name | Description | |
|---|---|---|
![]() ![]() | IsMatchForReflectionType | Returns true if the given CodeTypeRef matches the specified .NET type, false otherwise. If the codeTypeRef represents a nullable type and the type passed in is corresponding underlying type (ex: codeTypeRef is int? and type is int), that's considered a match. Passing in nullable .NET type for type is not expected to work. This requires that codeTypeRef is attached to a parent code element otherwise an InvalidOperationException is thrown. |
![]() ![]() | IsPrimitiveType | Returns true if the given CodeTypeRef represents a primitive .NET type, e.g., byte, bool, float, etc, otherwise false. Handles nullable primitive types as well. |
Show:
