s&
newspaper
About
info
About s&box
newspaper
Latest News
published_with_changes
Changes
map
Roadmap
monitoring
Metrics
games
Games
sports_esports
Browse Games
rocket
Discover Games
business_center
Workshop
sports_esports
Games
landscape
Maps
chair
Models
texture
Materials
apparel
Clothing
construction
More..
forum
Forum
docs
Docs
docs
Documentation
dashboard
Api Reference
school
Tutorials
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
TypeDescription
chevron_left
Classes
class
TypeDescription
search
Properties
data_object
Aliases
data_object
BaseType
data_object
ClassName
data_object
DeclaredMembers
data_object
Description
data_object
Fields
data_object
FullName
data_object
GenericArguments
data_object
Group
data_object
Icon
data_object
Identity
data_object
Interfaces
data_object
IsAbstract
data_object
IsClass
data_object
IsEnum
data_object
IsGenericType
data_object
IsInterface
data_object
IsStatic
data_object
IsValid
data_object
IsValueType
data_object
Members
data_object
Methods
data_object
Name
data_object
Namespace
data_object
Order
data_object
Properties
data_object
SourceFile
data_object
SourceLine
data_object
Tags
data_object
TargetType
data_object
Title
Methods
functions
Create
functions
CreateGeneric
functions
GetAttribute
functions
GetAttributes
functions
GetMethod
functions
GetProperty
functions
GetStaticMethod
functions
GetStaticProperty
functions
GetStaticValue
functions
GetValue
functions
HasAttribute
functions
HasTag
functions
IsNamed
functions
MakeGenericType
functions
SetStaticValue
functions
SetValue
Static Methods
functions
PaintComponentIcon
TypeDescription
Describes a type. We use this class to wrap and return <see cref="T:System.Type">System.Type</see>'s that are safe to interact with. Returned by Sandbox.Internal.TypeLibrary.
class
Sandbox
.
sealed
Sandbox.Reflection
data_object
Properties
31
Aliases
String[]
BaseType
TypeDescription
The base type. This can return null if the type isn't in the type library!
ClassName
string
A string representing this class name. Historically this was provided by [Library( classname )]. If no special name is provided, this will be type.Name.
DeclaredMembers
MemberDescription[]
Members (methods, properties, etc) declared by exactly this type, and not inherited.
Description
string
Fields
FieldDescription[]
All fields on this type.
FullName
string
Full name of this type.
GenericArguments
Type[]
If we're a generic type this will return our generic parameters.
Group
string
Icon
string
Identity
int
An integer that represents this type. Based off the class name.
Interfaces
Type[]
If we implement any interfaces they will be here
IsAbstract
bool
Gets a value indicating whether the System.Type is abstract and must be overridden.
IsClass
bool
True if the target type is a class
IsEnum
bool
True if the target type is an enum
IsGenericType
bool
True if we're a generic type
IsInterface
bool
True if the target type is an interface
IsStatic
bool
True if the target type is static
IsValid
bool
Whether the class is valid or not, i.e. whether the type still exists.
IsValueType
bool
True if the target type is a value
Members
MemberDescription[]
All members (methods, properties, etc) of this type.
Methods
MethodDescription[]
All methods of this type.
Name
string
Name of this type.
Namespace
string
Namespace of this type.
Order
int
Properties
PropertyDescription[]
All properties of this type.
SourceFile
string
The file containing this member
SourceLine
int
The line number of this member
Tags
String[]
Tags are set via the [Tag] attribute
TargetType
Type
The type this class describes.
Title
string
functions
Methods
16
Create
(
args
)
T
Create an instance of this class, return it as a T. If it can't be cast to a T we won't create it and will return null.
CreateGeneric
(
typeArgs
,
args
)
T
Create an instance of this class using generic arguments We're going to assume you know what you're doing here and let it throw any exceptions it wants.
GetAttribute
(
inherited
)
T
Returns the first attribute of given type, if any are present.
GetAttributes
(
inherited
)
IEnumerable`1
Returns all attributes of given type, if any are present.
GetMethod
(
name
)
MethodDescription
Get a method by name (will not find static methods)
GetProperty
(
name
)
PropertyDescription
Get property by name (will not find static properties)
GetStaticMethod
(
name
)
MethodDescription
Get a method by name (will not find static methods)
GetStaticProperty
(
name
)
PropertyDescription
Get static property by name
GetStaticValue
(
name
)
object
Get value by field or property name, and which type the member is declared to store (will not find static members)
GetValue
(
instance
,
name
)
object
Get value by field or property name (will not find static members)
HasAttribute
(
inherited
)
bool
Returns true if the class has this attribute
HasTag
(
tag
)
bool
True if we have this tag.
IsNamed
(
name
,
exactFullName
)
bool
Returns true if this is named the passed name, either through classname, target class name or an alias
MakeGenericType
(
inargs
)
Type
For generic type definitions, create a type by substituting the given types for each type parameter. Returns null if any of the type arguments violate the generic constraints.
SetStaticValue
(
name
,
value
)
bool
Set static value by field or property name
SetValue
(
instance
,
name
,
value
)
bool
Set value by field or property name (will not set static members)
functions
Static Methods
1
PaintComponentIcon
(
td
,
rect
,
opacity
)
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.