You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Diagnostics.SymbolStore;
- using Microsoft.CodeAnalysis;
-
- namespace Discord.Net.SourceGenerators.Serialization
- {
- internal static class SymbolExtensions
- {
- public static IEnumerable<IPropertySymbol> GetProperties(
- this INamedTypeSymbol symbol,
- bool includeInherited)
- {
- var s = symbol;
- do
- {
- foreach (var member in s.GetMembers())
- if (member is IPropertySymbol property)
- yield return property;
-
- s = s.BaseType;
- }
- while (includeInherited && s != null);
- }
- }
- }
|