Exemplo n.º 1
0
        /// <summary>
        /// Add the attribute list to the <see cref="TypeParameterSyntax"/>.
        /// </summary>
        /// <param name="member">The <see cref="TypeParameterSyntax"/>.</param>
        /// <param name="attributeList">The <see cref="AttributeListSyntax"/>.</param>
        /// <returns>The <paramref name="member"/> with <paramref name="attributeList"/> added.</returns>
        public static TypeParameterSyntax WithAttributeList(this TypeParameterSyntax member, AttributeListSyntax attributeList)
        {
            if (member is null)
            {
                throw new System.ArgumentNullException(nameof(member));
            }

            if (attributeList is null)
            {
                throw new System.ArgumentNullException(nameof(attributeList));
            }

            return(member.WithAttributeLists(member.AttributeLists.Add(attributeList)));
        }
Exemplo n.º 2
0
 public static TypeParameterSyntax WithoutAttributes(this TypeParameterSyntax self)
 {
     return(self.WithAttributeLists(default(SyntaxList <AttributeListSyntax>)));
 }