28 references to LambdaConversionResult
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Statements.cs (12)
2032
var
reason = Conversions.IsAnonymousFunctionCompatibleWithType(anonymousFunction, targetType, this.Compilation);
2040
if (reason ==
LambdaConversionResult
.Success)
2047
if (reason ==
LambdaConversionResult
.BadTargetType)
2072
if (reason ==
LambdaConversionResult
.ExpressionTreeMustHaveDelegateTypeArgument)
2079
if (reason ==
LambdaConversionResult
.ExpressionTreeFromAnonymousMethod)
2086
if (reason ==
LambdaConversionResult
.MismatchedReturnType)
2099
if (reason ==
LambdaConversionResult
.MissingSignatureWithOutParameter)
2123
if (reason ==
LambdaConversionResult
.BadParameterCount)
2151
if (reason ==
LambdaConversionResult
.MismatchedParameterRefKind)
2182
if (reason ==
LambdaConversionResult
.StaticTypeInImplicitlyTypedLambda)
2197
if (reason ==
LambdaConversionResult
.MismatchedParameterType)
2229
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;
1517
return
LambdaConversionResult
.MismatchedParameterRefKind;
1527
return
LambdaConversionResult
.MismatchedParameterType;
1560
return
LambdaConversionResult
.StaticTypeInImplicitlyTypedLambda;
1571
return
LambdaConversionResult
.MissingSignatureWithOutParameter;
1580
return
LambdaConversionResult
.BindingFailed;
1583
return
LambdaConversionResult
.Success;
1586
private static
LambdaConversionResult
IsAnonymousFunctionCompatibleWithExpressionTree(UnboundLambda anonymousFunction, NamedTypeSymbol type, CSharpCompilation compilation)
1606
return
LambdaConversionResult
.ExpressionTreeMustHaveDelegateTypeArgument;
1611
return
LambdaConversionResult
.ExpressionTreeFromAnonymousMethod;
1624
public static
LambdaConversionResult
IsAnonymousFunctionCompatibleWithType(UnboundLambda anonymousFunction, TypeSymbol type, CSharpCompilation compilation)
1638
return
LambdaConversionResult
.BadTargetType;
1651
return IsAnonymousFunctionCompatibleWithType((UnboundLambda)source, destination, compilation) ==
LambdaConversionResult
.Success;