27 references to InterceptedMethodType
Microsoft.Maui.Controls.BindingSourceGen (27)
BindingCodeWriter.cs (9)
266
if (binding.MethodType ==
InterceptedMethodType
.SetBinding)
286
private static string GetEpilog(
InterceptedMethodType
interceptedMethodType) =>
289
InterceptedMethodType
.SetBinding => "bindableObject.SetBinding(bindableProperty, binding);",
290
InterceptedMethodType
.Create => "return binding;",
294
private static string GetShouldUseSetterCall(
InterceptedMethodType
interceptedMethodType) =>
297
InterceptedMethodType
.SetBinding => "ShouldUseSetter(mode, bindableProperty)",
298
InterceptedMethodType
.Create => "ShouldUseSetter(mode)",
307
InterceptedMethodType
.SetBinding => $"public static void SetBinding{id}",
308
InterceptedMethodType
.Create => $"public static BindingBase Create{id}",
BindingInvocationDescription.cs (1)
13
InterceptedMethodType
MethodType);
BindingSourceGenerator.cs (3)
134
private static Result<LambdaExpressionSyntax> GetLambda(InvocationExpressionSyntax invocation,
InterceptedMethodType
methodType)
139
InterceptedMethodType
.SetBinding => argumentList[1].Expression,
140
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);