Table of Contents

Class TypeSymbolExtensions

Namespace
ProjGraph.Lib.EntityFramework.Infrastructure.Extensions
Assembly
ProjGraph.Lib.EntityFramework.dll

Provides extension methods for working with ITypeSymbol and INamedTypeSymbol objects.

public static class TypeSymbolExtensions
Inheritance
TypeSymbolExtensions
Inherited Members

Methods

IsCollectionType(INamedTypeSymbol)

Determines whether the specified INamedTypeSymbol represents a collection type.

public static bool IsCollectionType(this INamedTypeSymbol type)

Parameters

type INamedTypeSymbol

The named type symbol to check.

Returns

bool

true if the type is a collection type; otherwise, false.

IsEfValueType(ITypeSymbol)

Determines whether the specified ITypeSymbol represents a value type for EF purposes.

public static bool IsEfValueType(this ITypeSymbol type)

Parameters

type ITypeSymbol

The type symbol to check.

Returns

bool

true if the type is a value type; otherwise, false.

IsNullable(ITypeSymbol)

Determines whether the specified ITypeSymbol is nullable.

public static bool IsNullable(this ITypeSymbol type)

Parameters

type ITypeSymbol

The type symbol to check.

Returns

bool

true if the type is nullable; otherwise, false.

IsSystemOrPrimitiveType(INamedTypeSymbol)

Determines whether the specified INamedTypeSymbol represents a system or primitive type.

public static bool IsSystemOrPrimitiveType(this INamedTypeSymbol type)

Parameters

type INamedTypeSymbol

The named type symbol to check.

Returns

bool

true if the type is a system or primitive type; otherwise, false.