Interface IRuntimeTypeInfo
Contract for a dynamic TypeInfo.
Inherited Members
Namespace: Kephas.Runtime
Assembly: Kephas.Core.dll
Syntax
public interface IRuntimeTypeInfo : ITypeInfo, IRuntimeElementInfo, IElementInfo, IExpando, IDynamicMetaObjectProvider, IIndexable, IAttributeProvider
Properties
| Improve this Doc View SourceDefaultValue
Gets the default value of the type.
Declaration
object DefaultValue { get; }
Property Value
Type | Description |
---|---|
System.Object | The default value. |
Fields
Gets the fields.
Declaration
IDictionary<string, IRuntimeFieldInfo> Fields { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, IRuntimeFieldInfo> | The fields. |
Kind
Gets the runtime type kind.
Declaration
RuntimeTypeKind Kind { get; }
Property Value
Type | Description |
---|---|
RuntimeTypeKind | The runtime type kind. |
Members
Gets the members.
Declaration
IDictionary<string, IRuntimeElementInfo> Members { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, IRuntimeElementInfo> | The members. |
Methods
Gets the methods.
Declaration
IDictionary<string, ICollection<IRuntimeMethodInfo>> Methods { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, System.Collections.Generic.ICollection<IRuntimeMethodInfo>> | The methods. |
Properties
Gets the properties.
Declaration
IDictionary<string, IRuntimePropertyInfo> Properties { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, IRuntimePropertyInfo> | The properties. |
Type
Gets the underlying Type.
Declaration
Type Type { get; }
Property Value
Type | Description |
---|---|
System.Type | The type. |
TypeInfo
Gets the underlying TypeInfo.
Declaration
TypeInfo TypeInfo { get; }
Property Value
Type | Description |
---|---|
System.Reflection.TypeInfo | The type. |
Methods
| Improve this Doc View SourceGetValue(Object, String)
Gets the value of the property with the specified name.
Declaration
object GetValue(object instance, string propertyName)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance | The instance. |
System.String | propertyName | Name of the property. |
Returns
Type | Description |
---|---|
System.Object | The value of the specified property. |
Remarks
If a property with the provided name is not found, an exception occurs.
Invoke(Object, String, IEnumerable<Object>)
Invokes the specified method on the provided instance.
Declaration
object Invoke(object instance, string methodName, IEnumerable<object> args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance | The instance. |
System.String | methodName | Name of the method. |
System.Collections.Generic.IEnumerable<System.Object> | args | The arguments. |
Returns
Type | Description |
---|---|
System.Object | The invocation result. |
SetValue(Object, String, Object)
Sets the value of the property with the specified name.
Declaration
void SetValue(object instance, string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance | The instance. |
System.String | propertyName | Name of the property. |
System.Object | value | The value. |
Remarks
If a property with the provided name is not found, an exception occurs.
TryGetValue(Object, String, out Object)
Gets the value of the property with the specified name.
Declaration
bool TryGetValue(object instance, string propertyName, out object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance | The instance. |
System.String | propertyName | Name of the property. |
System.Object | value | The property value. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the property is found. |
TryInvoke(Object, String, IEnumerable<Object>, out Object)
Tries to invokes the specified method on the provided instance.
Declaration
bool TryInvoke(object instance, string methodName, IEnumerable<object> args, out object result)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance | The instance. |
System.String | methodName | Name of the method. |
System.Collections.Generic.IEnumerable<System.Object> | args | The arguments. |
System.Object | result | The invocation result. |
Returns
Type | Description |
---|---|
System.Boolean | A boolean value indicating whether the invocation was successful or not. |
TrySetValue(Object, String, Object)
Tries to set the value of the property with the specified name.
Declaration
bool TrySetValue(object instance, string propertyName, object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | instance | The instance. |
System.String | propertyName | Name of the property. |
System.Object | value | The value. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
If a property with the provided name is not found, the method just returns.
Also, the method just returns if the instance passed is null
.