TypeLibraryclass
Methods50
Showing 50 methods
public T GetAttribute(System.Type t)
Get single attribute of type, from type
| Parameter | Type | Description |
|---|---|---|
| t | Type | — |
T—public System.Type[] GetGenericArguments(System.Type genericType)
Performs `System.Type.GetGenericArguments` with access control checks. Will throw if any arguments aren't in the whitelist.
| Parameter | Type | Description |
|---|---|---|
| genericType | Type | Constructed generic type to get the arguments of |
public System.Collections.Generic.IReadOnlyList`1<Sandbox.TypeDescription> GetGenericTypes(System.Type type, System.Type[] types)
Get a list of types that implement this generic type
| Parameter | Type | Description |
|---|---|---|
| type | Type | — |
| types | Type[] | — |
public Sandbox.MemberDescription GetMemberByIdent(int ident)
Find a `Sandbox.MemberDescription` by its `Sandbox.MemberDescription.Identity`
| Parameter | Type | Description |
|---|---|---|
| ident | int | — |
public System.Collections.Generic.IReadOnlyList`1<System.ValueTuple`2<Sandbox.MethodDescription,T>> GetMethodsWithAttribute(bool onlyStatic = True)
Find all methods with given attribute, optionally non static
| Parameter | Type | Description |
|---|---|---|
| onlyStatic = True | bool | — |
public Sandbox.PropertyDescription[] GetPropertyDescriptions(object obj, bool onlyOwn = False)
Get a list of properties on the target object. To do this we'll just call GetDescription( obj.GetType() ) and return .Properties. Will return an empty array if we can't access these properties.
| Parameter | Type | Description |
|---|---|---|
| obj | object | — |
| onlyOwn = False | bool | — |
public object GetPropertyValue(object target, string name)
Try to get a value from a property on an object
| Parameter | Type | Description |
|---|---|---|
| target | object | — |
| name | string | — |
object—public Sandbox.TypeDescription GetTypeByIdent(int ident)
Find a TypeDescription by name
| Parameter | Type | Description |
|---|---|---|
| ident | int | — |
public int GetTypeIdent(System.Type type)
Get hash of a type.
| Parameter | Type | Description |
|---|---|---|
| type | Type | — |
int—public bool HasAttribute(System.Type type)
Return true if this type contains this attribute
| Parameter | Type | Description |
|---|---|---|
| type | Type | — |
bool—public bool SetProperty(object target, string name, object value)
Set a named property on given object. Will perform extra magic for string inputs and try to convert to target property type.
| Parameter | Type | Description |
|---|---|---|
| target | object | The target object to set a named property on. |
| name | string | Name of the property to set. |
| value | object | Value for the property. |
boolWhether the property was set or not.No results match this filter.