5 implementations of IPathPart
Microsoft.Maui.Controls.BindingSourceGen (5)
PathPart.cs (5)
8public sealed record InaccessibleMemberAccess(TypeDescription ContainingType, TypeDescription memberType, AccessorKind Kind, string MemberName, bool IsValueType = false) : IPathPart 22public record MemberAccess(string MemberName, bool IsValueType = false) : IPathPart 33public sealed record IndexAccess(string DefaultMemberName, object Index, bool IsValueType = false) : IPathPart 46public sealed record ConditionalAccess(IPathPart Part) : IPathPart 56public sealed record Cast(TypeDescription TargetType) : IPathPart
52 references to IPathPart
Microsoft.Maui.Controls.BindingSourceGen (52)
AccessExpressionBuilder.cs (1)
7 public static string ExtendExpression(string previousExpression, IPathPart nextPart, uint bindingId, bool shouldUseUnsafePropertySetter = false)
BindingCodeWriter.cs (3)
390 foreach (var part in binding.Path) 416 static IPathPart MaybeWrapInConditionalAccess(IPathPart part, bool forceConditonalAccess)
BindingInvocationDescription.cs (1)
10 EquatableArray<IPathPart> Path,
BindingSourceGenerator.cs (1)
121 Path: new EquatableArray<IPathPart>([.. pathParseResult.Value]),
BindingTransformer.cs (5)
17 private static EquatableArray<IPathPart> TransformPath(BindingInvocationDescription BindingInvocationDescription) 19 var newPath = new List<IPathPart>(); 20 foreach (var pathPart in BindingInvocationDescription.Path) 39 return new EquatableArray<IPathPart>(newPath.ToArray()); 41 static bool PreviousPartIsReferenceType(IPathPart previousPathPart) =>
PathParser.cs (31)
18 internal Result<List<IPathPart>> ParsePath(CSharpSyntaxNode? expressionSyntax) 22 IdentifierNameSyntax _ => Result<List<IPathPart>>.Success(new List<IPathPart>()), 35 private Result<List<IPathPart>> HandleMemberAccessExpression(MemberAccessExpressionSyntax memberAccess) 49 return Result<List<IPathPart>>.Failure(DiagnosticsFactory.UnableToResolvePath(memberAccess.GetLocation())); 57 IPathPart part = symbol.IsAccessible() 62 return Result<List<IPathPart>>.Success(result.Value); 65 private Result<List<IPathPart>> HandleElementAccessExpression(ElementAccessExpressionSyntax elementAccess) 83 return Result<List<IPathPart>>.Success(result.Value); 86 private Result<List<IPathPart>> HandleConditionalAccessExpression(ConditionalAccessExpressionSyntax conditionalAccess) 102 return Result<List<IPathPart>>.Success(expressionResult.Value); 105 private Result<List<IPathPart>> HandleMemberBindingExpression(MemberBindingExpressionSyntax memberBinding) 110 IPathPart part = new MemberAccess(member, !isReferenceType); 113 return Result<List<IPathPart>>.Success(new List<IPathPart>([part])); 116 private Result<List<IPathPart>> HandleElementBindingExpression(ElementBindingExpressionSyntax elementBinding) 129 return Result<List<IPathPart>>.Success(elementAccessResult.Value); 132 private Result<List<IPathPart>> HandleBinaryExpression(BinaryExpressionSyntax asExpression) 144 return Result<List<IPathPart>>.Failure(DiagnosticsFactory.UnableToResolvePath(castTo.GetLocation())); 149 return Result<List<IPathPart>>.Success(leftResult.Value); 152 private Result<List<IPathPart>> HandleCastExpression(CastExpressionSyntax castExpression) 163 return Result<List<IPathPart>>.Failure(DiagnosticsFactory.UnableToResolvePath(castExpression.GetLocation())); 168 return Result<List<IPathPart>>.Success(result.Value); 171 private Result<List<IPathPart>> HandleDefaultCase() 173 return Result<List<IPathPart>>.Failure(DiagnosticsFactory.UnableToResolvePath(_context.Node.GetLocation())); 176 private Result<List<IPathPart>> CreateIndexAccess(ISymbol? elementAccessSymbol, ITypeSymbol? typeSymbol, SeparatedSyntaxList<ArgumentSyntax> argumentList, Location location) 180 return Result<List<IPathPart>>.Failure(DiagnosticsFactory.UnableToResolvePath(location)); 187 return Result<List<IPathPart>>.Failure(DiagnosticsFactory.UnableToResolvePath(indexExpression.GetLocation())); 192 IPathPart part = new IndexAccess(name, indexValue, !isReferenceType); 194 return Result<List<IPathPart>>.Success(new List<IPathPart>([part]));
PathPart.cs (7)
3public interface IPathPart : IEquatable<IPathPart> 12 public bool Equals(IPathPart other) 25 public bool Equals(IPathPart other) 37 public bool Equals(IPathPart other) 46public sealed record ConditionalAccess(IPathPart Part) : IPathPart 50 public bool Equals(IPathPart other) 60 public bool Equals(IPathPart other)
Setter.cs (3)
7 IEnumerable<IPathPart> path, 23 foreach (var part in path) 56 public static string BuildAssignmentStatement(string accessAccumulator, IPathPart? lastPart, uint bindingId, string assignedValueExpression = "value") =>