protected override void ReadSymbol(IEventSymbol eventSymbol) { var @event = new Event(eventSymbol.Type, eventSymbol.Name) { IsAbstract = eventSymbol.IsAbstract, IsOverride = eventSymbol.IsOverride, IsInternal = eventSymbol.DeclaredAccessibility.HasFlag(Accessibility.Internal), Documentation = new DocumentationComment(eventSymbol.GetDocumentationCommentXml()) }; _events.AddEvent(@event); }
public override void VisitEventFieldDeclaration(EventFieldDeclarationSyntax node) { var eventDeclaration = node.Declaration; var @event = new Event( (ITypeSymbol)_semantic.GetSymbolInfo(eventDeclaration.Type).Symbol, eventDeclaration.Variables.ToString()) { IsOverride = node.Modifiers.Any(x => x.IsKind(SyntaxKind.OverrideKeyword)), IsAbstract = node.Modifiers.Any(x => x.IsKind(SyntaxKind.AbstractKeyword)) }; _events.AddEvent(@event); }
public void AddEvent(Event @event) => _events.AddEvent(@event);
/// <summary> /// two events are equal if they have the same name. /// </summary> /// <param name="first"></param> /// <param name="second"></param> /// <returns></returns> protected virtual bool IsEqual(Event first, Event second) { return first.Name == second.Name; }