Пример #1
0
 static void AddInheritedMembers(
     ITypeSymbol symbol,
     INamespaceOrTypeSymbol type,
     Dictionary <string, string?> dict,
     IReadOnlyList <string> typeParameterNames,
     IApiFilter apiFilter
     )
 {
     foreach (var m in type.GetMembers()
              .Where(m => !(m is INamedTypeSymbol))
              .Where(
                  m => apiFilter.CanVisitApi(
                      m,
                      symbol.Equals(type) ||
                      !symbol.IsSealed ||
                      symbol.TypeKind != TypeKind.Struct
                      )
                  )
              .Where(x => x.IsInheritable()))
     {
         var id = symbol.ToString()?.Trim();
         if (id != null)
         {
             dict.TryAdd(id, type.Equals(symbol) ? null : m.ToDisplayString());
         }
     }
 }