CodeTypeRefExtensions Class

Useful extension methods for CodeTypeRef

System.Object
  Microsoft.AspNet.Scaffolding.CodeTypeRefExtensions

Namespace:  Microsoft.AspNet.Scaffolding
Assembly:  Microsoft.AspNet.Scaffolding.12.0 (in Microsoft.AspNet.Scaffolding.12.0.dll)

public static class CodeTypeRefExtensions

The CodeTypeRefExtensions type exposes the following members.

  NameDescription
Public methodStatic memberIsMatchForReflectionTypeReturns 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.
Public methodStatic memberIsPrimitiveTypeReturns true if the given CodeTypeRef represents a primitive .NET type, e.g., byte, bool, float, etc, otherwise false. Handles nullable primitive types as well.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: