コード例 #1
0
 private static ImmutableHashSet <string> GetMembers(ITypeSymbol namedType)
 {
     return(MembersExtractor.GetAllMembers(namedType)
            .Where(x => x switch
     {
         IPropertySymbol property => property.IsStatic == false,
         IFieldSymbol field => field.IsImplicitlyDeclared == false && field.IsStatic == false,
         _ => false
     })
コード例 #2
0
 private static IReadOnlyList <MemberSymbolInfo> GetMembers(ITypeSymbol namedType, string namePrefix = null)
 {
     return(MembersExtractor.GetAllMembers(namedType)
            .Where(x => x switch
     {
         IPropertySymbol property => property.IsStatic == false && property.IsIndexer == false,
         IFieldSymbol field => field.IsImplicitlyDeclared == false && field.IsStatic == false,
         _ => false
     })