コード例 #1
0
 public static IEnumerable <T> GetKnownAttributes <T>(ISymbol symbol) where T : Attribute
 {
     return(symbol.GetAttributes().Select(x => AttributeConverter.ConvertAttribute(x)).OfType <T>());
 }
コード例 #2
0
 public static IEnumerable <Attribute> GetKnownAttributes(ISymbol symbol)
 {
     return(symbol.GetAttributes().Select(x => AttributeConverter.ConvertAttribute(x)).Where(x => x != null));
 }