C# Class Zetbox.API.Common.LinqExtensions

Mostrar archivo Open project: daszat/zetbox

Public Methods

Method Description
IsIgnorableCast ( Type operandType, Type targetType ) : bool

Checks whether the cast from operandType to targetType needs to be respected in a linq statement

Ignore Converts for all IExportable and IPersistenceObject casts. This may happen even if we don't yet know what the underlying type is. The database will catch that. Also remove casts to assignment compatible types, except when casting to Nullable<T>. The latter casts are necessary to keep operator methods happy, since they do not accept mixed nullability arguments.

IsIgnorableCastExpression ( this e ) : bool

See IsIgnorableCast(Type, Type)

Method Details

IsIgnorableCast() public static method

Checks whether the cast from operandType to targetType needs to be respected in a linq statement
Ignore Converts for all IExportable and IPersistenceObject casts. This may happen even if we don't yet know what the underlying type is. The database will catch that. Also remove casts to assignment compatible types, except when casting to Nullable<T>. The latter casts are necessary to keep operator methods happy, since they do not accept mixed nullability arguments.
public static IsIgnorableCast ( Type operandType, Type targetType ) : bool
operandType System.Type
targetType System.Type
return bool

IsIgnorableCastExpression() public static method

See IsIgnorableCast(Type, Type)
public static IsIgnorableCastExpression ( this e ) : bool
e this An expression to check.
return bool