public SymbolImplementation BuildIndexerSetter(IndexerSymbol indexerSymbol) { AccessorNode setterNode = ((IndexerDeclarationNode)indexerSymbol.ParseContext).SetAccessor; BlockStatementNode accessorBody = setterNode.Implementation; return(BuildImplementation((ISymbolTable)indexerSymbol.Parent, indexerSymbol, accessorBody, /* addAllParameters */ true)); }
public SymbolImplementation BuildPropertySetter(PropertySymbol propertySymbol) { AccessorNode setterNode = ((PropertyDeclarationNode)propertySymbol.ParseContext).SetAccessor; BlockStatementNode accessorBody = setterNode.Implementation; return(BuildImplementation((ISymbolTable)propertySymbol.Parent, propertySymbol, accessorBody, /* addAllParameters */ true)); }
public SymbolImplementation BuildEventRemove(EventSymbol eventSymbol) { AccessorNode removeNode = ((EventDeclarationNode)eventSymbol.ParseContext).Property.GetAccessor; BlockStatementNode accessorBody = removeNode.Implementation; return(BuildImplementation((ISymbolTable)eventSymbol.Parent, eventSymbol, accessorBody, /* addParameters */ true)); }
public SymbolImplementation BuildPropertyGetter(PropertySymbol propertySymbol) { AccessorNode getterNode = ((PropertyDeclarationNode)propertySymbol.ParseContext).GetAccessor; if (getterNode == null) { return(null); } BlockStatementNode accessorBody = getterNode.Implementation; return(BuildImplementation((ISymbolTable)propertySymbol.Parent, propertySymbol, accessorBody, /* addAllParameters */ false)); }
public bool TryBuildPropertySetter(PropertySymbol propertySymbol, out SymbolImplementation symbolImplementation) { AccessorNode setterNode = propertySymbol.GetPropertyNode().SetAccessor; if (setterNode == null || setterNode.IsAutoProperty) { symbolImplementation = null; return(false); } BlockStatementNode accessorBody = setterNode.Implementation; symbolImplementation = BuildImplementation((ISymbolTable)propertySymbol.Parent, propertySymbol, accessorBody, addAllParameters: true); return(symbolImplementation != null); }