Add Friend classes to C# with the help of Analyzers and Attributes. (#1928)

* Add Friend classes to C# with the help of Analyzers and Attributes.

* Revert to netstandard2.0

* Use LINQ instead of ^1 for array

* Address review.
Oops, forgot to push.
This commit is contained in:
Vera Aguilera Puerto
2021-08-06 09:50:22 +02:00
committed by GitHub
parent e16e0f4bd0
commit c0d4e34089
3 changed files with 123 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
using System;
namespace Robust.Shared.Analyzers
{
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct)]
public class FriendAttribute : Attribute
{
public readonly Type[] Friends;
public FriendAttribute(params Type[] friends)
{
Friends = friends;
}
}
}