Files
sbox-public/engine/Sandbox.Access/Rules/Reflection.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

66 lines
2.9 KiB
C#

using Microsoft.CodeAnalysis;
using System;
using System.Text.RegularExpressions;
namespace Sandbox;
internal static partial class Rules
{
internal static string[] Reflection = new[]
{
"System.Private.CoreLib/System.Reflection.CustomAttributeExtensions*",
"System.Private.CoreLib/System.Reflection.ICustomAttributeProvider*",
"System.Private.CoreLib/System.Reflection.BindingFlags*",
//
// Very basic interaction
//
"System.Private.CoreLib/System.Reflection.MemberInfo",
"System.Private.CoreLib/System.Reflection.MemberInfo.get_Name()",
"System.Private.CoreLib/System.Reflection.MemberInfo.get_Name()",
"System.Private.CoreLib/System.Reflection.MemberInfo.IsDefined( System.Type, System.Boolean )",
"System.Private.CoreLib/System.Reflection.MemberInfo.get_DeclaringType()",
//
// Very basic interaction
//
"System.Private.CoreLib/System.Reflection.PropertyInfo",
"System.Private.CoreLib/System.Reflection.PropertyInfo.GetSetMethod()",
"System.Private.CoreLib/System.Reflection.PropertyInfo.GetGetMethod()",
"System.Private.CoreLib/System.Reflection.PropertyInfo.get_CanWrite()",
"System.Private.CoreLib/System.Reflection.PropertyInfo.get_CanRead()",
"System.Private.CoreLib/System.Reflection.PropertyInfo.get_PropertyType()",
"System.Private.CoreLib/System.Reflection.PropertyInfo.op_Inequality( System.Reflection.PropertyInfo, System.Reflection.PropertyInfo )",
"System.Private.CoreLib/System.Reflection.PropertyInfo.op_Inequality( System.Reflection.PropertyInfo, System.Reflection.PropertyInfo )",
//
// Very basic interaction
//
"System.Private.CoreLib/System.Reflection.MethodInfo",
"System.Private.CoreLib/System.Reflection.MethodInfo.op_Equality*",
"System.Private.CoreLib/System.Reflection.MethodInfo.get_Name()",
//
// Very basic interaction
//
"System.Private.CoreLib/System.Reflection.ParameterInfo",
"System.Private.CoreLib/System.Reflection.ParameterInfo.get_Name*",
"System.Private.CoreLib/System.Reflection.ParameterInfo.get_DefaultValue()",
"System.Private.CoreLib/System.Reflection.ParameterInfo.get_IsOptional()",
"System.Private.CoreLib/System.Reflection.ParameterInfo.get_ParameterType()",
"System.Private.CoreLib/System.Reflection.ParameterInfo.get_IsIn()",
"System.Private.CoreLib/System.Reflection.ParameterInfo.get_IsOut()",
"System.Private.CoreLib/System.Reflection.ParameterInfo.GetCustomAttributesData()",
//
// Pretty safe, but still cautious
//
"System.Private.CoreLib/System.Reflection.CustomAttributeData",
"System.Private.CoreLib/System.Reflection.CustomAttributeData.get_AttributeType()",
"System.Private.CoreLib/System.Reflection.CustomAttributeData.get_NamedArguments()",
"System.Private.CoreLib/System.Reflection.CustomAttributeData.get_ConstructorArguments()",
"System.Private.CoreLib/System.Reflection.CustomAttributeTypedArgument*",
"System.Private.CoreLib/System.Reflection.CustomAttributeNamedArgument*",
};
}