representation of an event
Наследование: Member
Пример #1
0
 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);
 }
Пример #2
0
 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);
 }
Пример #3
0
 public void AddEvent(Event @event) => _events.AddEvent(@event);
Пример #4
0
 /// <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;
 }