IEnumerable<ICompletionData> HandleAccessorContext()
{
var unit = ParseStub("get; }", false);
var node = unit.GetNodeAt(location, cn => !(cn is CSharpTokenNode));
if (node is Accessor) {
node = node.Parent;
}
var contextList = new CompletionDataWrapper(this);
if (node is PropertyDeclaration) {
contextList.AddCustom("get");
contextList.AddCustom("set");
AddKeywords(contextList, accessorModifierKeywords);
} else if (node is CustomEventDeclaration) {
contextList.AddCustom("add");
contextList.AddCustom("remove");
} else {
return null;
}
return contextList.Result;
}