28 references to LambdaConversionResult
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Statements.cs (12)
2020
var
reason = Conversions.IsAnonymousFunctionCompatibleWithType(anonymousFunction, targetType, this.Compilation);
2028
if (reason ==
LambdaConversionResult
.Success)
2035
if (reason ==
LambdaConversionResult
.BadTargetType)
2060
if (reason ==
LambdaConversionResult
.ExpressionTreeMustHaveDelegateTypeArgument)
2067
if (reason ==
LambdaConversionResult
.ExpressionTreeFromAnonymousMethod)
2074
if (reason ==
LambdaConversionResult
.MismatchedReturnType)
2087
if (reason ==
LambdaConversionResult
.MissingSignatureWithOutParameter)
2111
if (reason ==
LambdaConversionResult
.BadParameterCount)
2139
if (reason ==
LambdaConversionResult
.RefInImplicitlyTypedLambda)
2155
if (reason ==
LambdaConversionResult
.StaticTypeInImplicitlyTypedLambda)
2170
if (reason ==
LambdaConversionResult
.MismatchedParameterType)
2213
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;