/// <summary> /// Creates an event symbol that can be used to describe an event declaration. /// </summary> public static IEventSymbol CreateEventSymbol(IList <AttributeData> attributes, Accessibility accessibility, SymbolModifiers modifiers, ITypeSymbol type, IEventSymbol explicitInterfaceSymbol, string name, IMethodSymbol addMethod = null, IMethodSymbol removeMethod = null, IMethodSymbol raiseMethod = null, IList <IParameterSymbol> parameterList = null) { var result = new CodeGenerationEventSymbol(null, attributes, accessibility, modifiers, type, explicitInterfaceSymbol, name, addMethod, removeMethod, raiseMethod, parameterList); CodeGenerationEventInfo.Attach(result, modifiers.IsUnsafe); return(result); }
/// <summary> /// Creates an event symbol that can be used to describe an event declaration. /// </summary> public static IEventSymbol CreateEventSymbol( ImmutableArray <AttributeData> attributes, Accessibility accessibility, DeclarationModifiers modifiers, ITypeSymbol type, ImmutableArray <IEventSymbol> explicitInterfaceImplementations, string name, IMethodSymbol?addMethod = null, IMethodSymbol?removeMethod = null, IMethodSymbol?raiseMethod = null ) { var result = new CodeGenerationEventSymbol( null, attributes, accessibility, modifiers, type, explicitInterfaceImplementations, name, addMethod, removeMethod, raiseMethod ); CodeGenerationEventInfo.Attach(result, modifiers.IsUnsafe); return(result); }