Beispiel #1
0
 /// <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];
Beispiel #2
0
 /// <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>();
 }