28 references to LambdaConversionResult
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Statements.cs (12)
2017
var
reason = Conversions.IsAnonymousFunctionCompatibleWithType(anonymousFunction, targetType, this.Compilation);
2025
if (reason ==
LambdaConversionResult
.Success)
2032
if (reason ==
LambdaConversionResult
.BadTargetType)
2057
if (reason ==
LambdaConversionResult
.ExpressionTreeMustHaveDelegateTypeArgument)
2064
if (reason ==
LambdaConversionResult
.ExpressionTreeFromAnonymousMethod)
2071
if (reason ==
LambdaConversionResult
.MismatchedReturnType)
2084
if (reason ==
LambdaConversionResult
.MissingSignatureWithOutParameter)
2108
if (reason ==
LambdaConversionResult
.BadParameterCount)
2136
if (reason ==
LambdaConversionResult
.RefInImplicitlyTypedLambda)
2152
if (reason ==
LambdaConversionResult
.StaticTypeInImplicitlyTypedLambda)
2167
if (reason ==
LambdaConversionResult
.MismatchedParameterType)
2210
if (reason ==
LambdaConversionResult
.BindingFailed)
Binder\Semantics\Conversions\ConversionsBase.cs (16)
1467
private static
LambdaConversionResult
IsAnonymousFunctionCompatibleWithDelegate(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation, bool isTargetExpressionTree)
1482
return
LambdaConversionResult
.BadTargetType;
1490
return
LambdaConversionResult
.MismatchedReturnType;
1504
return
LambdaConversionResult
.BadParameterCount;
1521
return
LambdaConversionResult
.MismatchedParameterType;
1531
return
LambdaConversionResult
.RefInImplicitlyTypedLambda;
1562
return
LambdaConversionResult
.StaticTypeInImplicitlyTypedLambda;
1573
return
LambdaConversionResult
.MissingSignatureWithOutParameter;
1582
return
LambdaConversionResult
.BindingFailed;
1585
return
LambdaConversionResult
.Success;
1588
private static
LambdaConversionResult
IsAnonymousFunctionCompatibleWithExpressionTree(UnboundLambda anonymousFunction, NamedTypeSymbol type, CSharpCompilation compilation)
1608
return
LambdaConversionResult
.ExpressionTreeMustHaveDelegateTypeArgument;
1613
return
LambdaConversionResult
.ExpressionTreeFromAnonymousMethod;
1626
public static
LambdaConversionResult
IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation)
1640
return
LambdaConversionResult
.BadTargetType;
1653
return IsAnonymousFunctionCompatibleWithType((UnboundLambda)source, destination, compilation) ==
LambdaConversionResult
.Success;