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 Microsoft.CodeAnalysis;
- using Discord.Commands;
-
- namespace Discord.Analyzers
- {
- internal static class SymbolExtensions
- {
- private static readonly string _moduleBaseName = typeof(ModuleBase<>).Name;
-
- public static bool DerivesFromModuleBase(this ITypeSymbol symbol)
- {
- for (var bType = symbol.BaseType; bType != null; bType = bType.BaseType)
- {
- if (bType.MetadataName == _moduleBaseName)
- return true;
- }
- return false;
- }
- }
- }
|