/// <summary> /// Gets the attributes for a <see cref="CodeAttributeTarget"/> or null. /// </summary> /// <param name="key">The target.</param> /// <returns>The attributes or null.</returns> public AttributeSetDefinition?this[CodeAttributeTarget key] { get => _attrs[(int)key];
/// <summary> /// Initializes a new <see cref="AttributeSetDefinition"/>. /// </summary> /// <param name="target">The target for this set.</param> /// <param name="attributes">Optional existing list of attributes.</param> public AttributeSetDefinition(CodeAttributeTarget target, List <AttributeDefinition>?attributes = null) { Target = target; Attributes = attributes ?? new List <AttributeDefinition>(); }