27 references to InterceptedMethodType
Microsoft.Maui.Controls.BindingSourceGen (27)
BindingCodeWriter.cs (9)
262
if (binding.MethodType ==
InterceptedMethodType
.SetBinding)
282
private static string GetEpilog(
InterceptedMethodType
interceptedMethodType) =>
285
InterceptedMethodType
.SetBinding => "bindableObject.SetBinding(bindableProperty, binding);",
286
InterceptedMethodType
.Create => "return binding;",
290
private static string GetShouldUseSetterCall(
InterceptedMethodType
interceptedMethodType) =>
293
InterceptedMethodType
.SetBinding => "ShouldUseSetter(mode, bindableProperty)",
294
InterceptedMethodType
.Create => "ShouldUseSetter(mode)",
303
InterceptedMethodType
.SetBinding => $"public static void SetBinding{id}",
304
InterceptedMethodType
.Create => $"public static BindingBase Create{id}",
BindingInvocationDescription.cs (1)
14
InterceptedMethodType
MethodType);
BindingSourceGenerator.cs (3)
142
private static Result<LambdaExpressionSyntax> GetLambda(InvocationExpressionSyntax invocation,
InterceptedMethodType
methodType)
147
InterceptedMethodType
.SetBinding => argumentList[1].Expression,
148
InterceptedMethodType
.Create => argumentList[0].Expression,
InvocationParser.cs (14)
21
internal Result<
InterceptedMethodType
> ParseInvocation(InvocationExpressionSyntax invocationSyntax, CancellationToken t)
31
private Result<
InterceptedMethodType
> VerifyCorrectOverloadBindingCreate(InvocationExpressionSyntax invocation, CancellationToken t)
39
return Result<
InterceptedMethodType
>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(invocation.GetLocation()));
53
return Result<
InterceptedMethodType
>.Failure(DiagnosticsFactory.GetterIsNotLambda(firstArgument.GetLocation()));
57
return Result<
InterceptedMethodType
>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(firstArgument.GetLocation()));
61
return Result<
InterceptedMethodType
>.Success(
InterceptedMethodType
.Create);
64
private Result<
InterceptedMethodType
> VerifyCorrectOverloadSetBinding(InvocationExpressionSyntax invocation, CancellationToken t)
79
return Result<
InterceptedMethodType
>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(invocation.GetLocation()));
92
return Result<
InterceptedMethodType
>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(invocation.GetLocation()));
101
{ Name: "Func", ContainingNamespace.Name: "System" } => Result<
InterceptedMethodType
>.Failure(DiagnosticsFactory.GetterIsNotLambda(secondArgument.GetLocation())),
102
_ => Result<
InterceptedMethodType
>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(secondArgument.GetLocation())),
107
return Result<
InterceptedMethodType
>.Success(
InterceptedMethodType
.SetBinding);