/// <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); }
private static bool GetIsUnsafe(CodeGenerationEventInfo info) { return(info != null && info._isUnsafe); }
public static void Attach(IEventSymbol @event, bool isUnsafe) { var info = new CodeGenerationEventInfo(isUnsafe); s_eventToInfoMap.Add(@event, info); }