Ejemplo n.º 1
0
 public UnifiedElement VisitCustomEventDeclaration(
     CustomEventDeclaration customEventDeclaration, object data)
 {
     return(UnifiedEventDefinition.Create(
                annotations: null,
                modifiers: LookupModifiers(customEventDeclaration.Modifiers),
                type: LookupType(customEventDeclaration.ReturnType),
                names: customEventDeclaration.Name.ToVariableIdentifier().ToSet <UnifiedIdentifier>(),
                adder: customEventDeclaration.AddAccessor.AcceptVisitor(this, data) as UnifiedPropertyDefinitionPart,
                remover: customEventDeclaration.RemoveAccessor.AcceptVisitor(this, data) as UnifiedPropertyDefinitionPart));
 }
Ejemplo n.º 2
0
        public UnifiedElement VisitEventDeclaration(
            EventDeclaration eventDeclaration, object data)
        {
            var names =
                eventDeclaration.Variables.Select(prop => prop.Name.ToVariableIdentifier())
                .ToSet <UnifiedIdentifier>();

            return(UnifiedEventDefinition.Create(
                       annotations: null,
                       modifiers: LookupModifiers(eventDeclaration.Modifiers),
                       type: LookupType(eventDeclaration.ReturnType),
                       names: names));
        }