MemberDescriptionclass

Wraps MemberInfo but with caching and sandboxing. Returned by `Sandbox.Internal.TypeLibrary` and `Sandbox.TypeDescription`.

objectMemberDescription
Namespace
Sandbox
Assembly
Sandbox.Reflection
Declaration
public class Sandbox.MemberDescription

Methods9

Showing 9 methods

protected void CaptureAttributes(System.Reflection.MemberInfo member)PROTECTED

ParameterTypeDescription
memberMemberInfo
Returns:void

public T GetCustomAttribute()PUBLIC

Returns the first of Attributes of the passed in type. Or null.

Returns:T

public Sandbox.DisplayInfo GetDisplayInfo()PUBLIC

Access the full DisplayInfo for this type. This is faster than creating the DisplayInfo every time we need it.

Returns:DisplayInfo

protected virtual int GetIdentityHash()PROTECTEDVIRTUAL

Generate a unique hash to identity this member.

Returns:int

public bool HasTag(string tag)PUBLIC

Returns true if Tags contains this tag

ParameterTypeDescription
tagstring
Returns:bool

protected void Init(System.Reflection.MemberInfo x)PROTECTED

ParameterTypeDescription
xMemberInfo
Returns:void

public bool IsNamed(string name)PUBLIC

Utility function to check whether this string matches this type. Will search name and classname.

ParameterTypeDescription
namestring
Returns:bool

Properties21

Showing 21 properties

public string[] Sandbox.MemberDescription.Aliases { get; set; }PUBLICGETSET

Aliases allow this to be found by alternative names.

Returns:string[]

public Sandbox.TypeDescription Sandbox.MemberDescription.DeclaringType { get; set; }PUBLICGETSET

The type that actually defined this member. This may be different from `Sandbox.MemberDescription.TypeDescription` if this member is inherited from a base class.

Returns:TypeDescription

public string Sandbox.MemberDescription.Description { get; set; }PUBLICGETSET

Description of this type member. This usually provided from the summary XML comment above the definition.

Returns:string

public string Sandbox.MemberDescription.Group { get; set; }PUBLICGETSET

The group - usually provided via the [Group] attribute

Returns:string

public string Sandbox.MemberDescription.Icon { get; set; }PUBLICGETSET

The icon for this, if provided via the [Icon] attribute

Returns:string

public int Sandbox.MemberDescription.Identity { get; set; }PUBLICGETSET

An integer that represents this member. Based off its type and name.

Returns:int

public bool Sandbox.MemberDescription.IsFamily { get; set; }PUBLICGETSET

Returns:bool

public virtual bool Sandbox.MemberDescription.IsField { get; set; }PUBLICVIRTUALGETSET

True if we're a field

Returns:bool

public virtual bool Sandbox.MemberDescription.IsMethod { get; set; }PUBLICVIRTUALGETSET

True if we're a method

Returns:bool

public virtual bool Sandbox.MemberDescription.IsProperty { get; set; }PUBLICVIRTUALGETSET

True if we're a property

Returns:bool

public bool Sandbox.MemberDescription.IsPublic { get; set; }PUBLICGETSET

True if publicly accessible

Returns:bool

public bool Sandbox.MemberDescription.IsStatic { get; set; }PUBLICGETSET

True if static

Returns:bool

public string Sandbox.MemberDescription.Name { get; set; }PUBLICGETSET

Name of this type member.

Returns:string

public int Sandbox.MemberDescription.Order { get; set; }PUBLICGETSET

The display order - usually provided via the [Order] attribute

Returns:int

public bool Sandbox.MemberDescription.ReadOnly { get; set; }PUBLICGETSET

If this is marked as [ReadOnly]

Returns:bool

public string Sandbox.MemberDescription.SourceFile { get; set; }PUBLICGETSET

The file containing this member

Returns:string

public int Sandbox.MemberDescription.SourceLine { get; set; }PUBLICGETSET

The line number of this member

Returns:int

public string[] Sandbox.MemberDescription.Tags { get; set; }PUBLICGETSET

Tags are usually provided via the [Tags] attribute

Returns:string[]

public string Sandbox.MemberDescription.Title { get; set; }PUBLICGETSET

Display name or title of this type member.

Returns:string

On this page

Methodsprotected System.Void CaptureAttributes(System.Reflection.MemberInfo member)public T GetCustomAttribute()public Sandbox.DisplayInfo GetDisplayInfo()protected virtual System.Int32 GetIdentityHash()public System.Boolean HasAttribute(System.Type t)public System.Boolean HasAttribute()public System.Boolean HasTag(System.String tag)protected System.Void Init(System.Reflection.MemberInfo x)public System.Boolean IsNamed(System.String name)Propertiespublic System.String[] Sandbox.MemberDescription.Aliases { get; set; }public System.Attribute[] Sandbox.MemberDescription.Attributes { get; set; }public Sandbox.TypeDescription Sandbox.MemberDescription.DeclaringType { get; set; }public System.String Sandbox.MemberDescription.Description { get; set; }public System.String Sandbox.MemberDescription.Group { get; set; }public System.String Sandbox.MemberDescription.Icon { get; set; }public System.Int32 Sandbox.MemberDescription.Identity { get; set; }public System.Boolean Sandbox.MemberDescription.IsFamily { get; set; }public virtual System.Boolean Sandbox.MemberDescription.IsField { get; set; }public virtual System.Boolean Sandbox.MemberDescription.IsMethod { get; set; }public virtual System.Boolean Sandbox.MemberDescription.IsProperty { get; set; }public System.Boolean Sandbox.MemberDescription.IsPublic { get; set; }public System.Boolean Sandbox.MemberDescription.IsStatic { get; set; }public System.String Sandbox.MemberDescription.Name { get; set; }public System.Int32 Sandbox.MemberDescription.Order { get; set; }public System.Boolean Sandbox.MemberDescription.ReadOnly { get; set; }public System.String Sandbox.MemberDescription.SourceFile { get; set; }public System.Int32 Sandbox.MemberDescription.SourceLine { get; set; }public System.String[] Sandbox.MemberDescription.Tags { get; set; }public System.String Sandbox.MemberDescription.Title { get; set; }public Sandbox.TypeDescription Sandbox.MemberDescription.TypeDescription { get; set; }Metadata