Files
RobustToolbox/Robust.Shared/Reflection/ReflectAttribute.cs
Acruid 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00

38 lines
1.4 KiB
C#

using System;
namespace Robust.Shared.Reflection
{
/// <summary>
/// Controls additional info about discoverability from the <see cref="IReflectionManager"/>.
/// Note that this attribute is implicit.
/// Values are assumed to be their default if this attribute is not specified.
/// </summary>
/// <seealso cref="IReflectionManager"/>
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class ReflectAttribute : Attribute
{
/// <summary>
/// Default value for <see cref="Discoverable"/> if the attribute is not specified.
/// </summary>
public const bool DEFAULT_DISCOVERABLE = true;
/// <summary>
/// Controls whether this type can be seen by the <see cref="IReflectionManager"/>.
/// If this is false it cannot be, and will be ignored.
/// </summary>
/// <value><see cref="DEFAULT_DISCOVERABLE"/></value>
/// <seealso cref="ReflectAttribute(bool)"/>
public bool Discoverable { get; }
/// <summary>
/// Controls whether or not the type can be discovered.
/// </summary>
/// <param name="discoverable">The value that will be assigned to <see cref="Discoverable"/>. True is yes, false is no.</param>
/// <seealso cref="Discoverable"/>
public ReflectAttribute(bool discoverable)
{
Discoverable = discoverable;
}
}
}