mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
* Add ValidateMemberAttribute, analyzer and test
* Use attribute on DirtyFields methods
* Defer member lookup
* Additional test case
* Add support for collection types
* Poke tests
* Revert "Add support for collection types"
This reverts commit 2b8f5534bd.
* break, not continue
* Cheaper attribute check with AttributeHelper
* Clean up unused helper method
---------
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
17 lines
359 B
C#
17 lines
359 B
C#
using Microsoft.CodeAnalysis;
|
|
|
|
namespace Robust.Analyzers;
|
|
|
|
public static class ITypeSymbolExtensions
|
|
{
|
|
public static IEnumerable<ITypeSymbol> GetBaseTypesAndThis(this ITypeSymbol type)
|
|
{
|
|
var current = type;
|
|
while (current != null)
|
|
{
|
|
yield return current;
|
|
current = current.BaseType;
|
|
}
|
|
}
|
|
}
|