예제 #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));
 }