Пример #1
0
 /// <remarks>
 /// Co-ordinates inlining property events, see <see cref="MethodBodyExecutableStatementVisitor.GetPostAssignmentStatements"/>
 /// Also see usages of IsDesignerGeneratedTypeWithInitializeComponent
 /// </remarks>
 public bool MayNeedToInlinePropertyAccess(SyntaxNode anyNodePossiblyWithinMethod, ISymbol potentialPropertySymbol)
 {
     return(potentialPropertySymbol != null && _typeContext.Any() && InMethodCalledInitializeComponent(anyNodePossiblyWithinMethod) && potentialPropertySymbol is IPropertySymbol prop && prop.IsWithEvents);
 }
Пример #2
0
 /// <remarks>
 /// Co-ordinates inlining property events, see <see cref="MethodBodyExecutableStatementVisitor.GetPostAssignmentStatements"/>
 /// Also see usages of IsDesignerGeneratedTypeWithInitializeComponent
 /// </remarks>
 public bool MustInlinePropertyWithEventsAccess(SyntaxNode anyNodePossiblyWithinMethod, ISymbol potentialPropertySymbol)
 {
     return(potentialPropertySymbol != null && _typeContext.Any() && _typeContext.MethodsWithHandles.AnyForPropertyName(potentialPropertySymbol.Name) && InMethodCalledInitializeComponent(anyNodePossiblyWithinMethod) && potentialPropertySymbol is IPropertySymbol prop && prop.IsWithEvents);
 }