Beispiel #1
0
 public static bool IsOverrideOrInterfaceImplementation(this IParameterSymbol @this)
 {
     if (@this == null)
     {
         throw new ArgumentNullException(nameof(@this));
     }
     return(@this.OverriddenAndImplementedInterfaceMembers().Any()); //.Count() > 1; //1 for self
 }
Beispiel #2
0
        public static IEnumerable <AttributeData> DeclaredAndInheritedAttributes(this IParameterSymbol @this)
        {
            if (@this == null)
            {
                throw new ArgumentNullException(nameof(@this));
            }

            return(@this
                   .Concat(@this.OverriddenAndImplementedInterfaceMembers())
                   .SelectMany(s => s.GetAttributes()));
        }