26 references to InterceptedMethodType
Microsoft.Maui.Controls.BindingSourceGen (26)
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)
165 private static Result<LambdaExpressionSyntax> GetLambda(InvocationExpressionSyntax invocation, InterceptedMethodType methodType) 170 InterceptedMethodType.SetBinding => argumentList[1].Expression, 171 InterceptedMethodType.Create => argumentList[0].Expression,
InvocationParser.cs (13)
21 internal Result<InterceptedMethodType> ParseInvocation(InvocationExpressionSyntax invocationSyntax, CancellationToken t) 31 private Result<InterceptedMethodType> VerifyCorrectOverloadBindingCreate(InvocationExpressionSyntax invocation, CancellationToken t) 42 return Result<InterceptedMethodType>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(invocation.GetLocation())); 56 return Result<InterceptedMethodType>.Failure(DiagnosticsFactory.GetterIsNotLambda(firstArgument.GetLocation())); 60 return Result<InterceptedMethodType>.Success(InterceptedMethodType.Create); 63 private Result<InterceptedMethodType> VerifyCorrectOverloadSetBinding(InvocationExpressionSyntax invocation, CancellationToken t) 78 return Result<InterceptedMethodType>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(invocation.GetLocation())); 91 return Result<InterceptedMethodType>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(invocation.GetLocation())); 100 { Name: "Func", ContainingNamespace.Name: "System" } => Result<InterceptedMethodType>.Failure(DiagnosticsFactory.GetterIsNotLambda(secondArgument.GetLocation())), 101 _ => Result<InterceptedMethodType>.Failure(DiagnosticsFactory.SuboptimalSetBindingOverload(secondArgument.GetLocation())), 106 return Result<InterceptedMethodType>.Success(InterceptedMethodType.SetBinding);