mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
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:
committed by
GitHub
parent
e16e0f4bd0
commit
c0d4e34089
15
Robust.Shared/Analyzers/FriendAttribute.cs
Normal file
15
Robust.Shared/Analyzers/FriendAttribute.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user