wx.NetMacros.RuntimeEnv Class Reference

List of all members.

Public Member Functions

object CreateInstance (Generator generator)
ConstructorInfo GetConstructor (MethodDescriptor md)
object GetDescriptor (string classnameOrMethodOrProperty)
MethodInfo GetMethod (MemberDescriptor mi)
ParameterInfo[] GetParameters (MethodDescriptor md)
PropertyInfo GetProperty (MemberDescriptor mi)
Type GetType (TypeDescriptor ti, bool considerAllAssembliesOfTheDomain)
Type GetType (TypeDescriptor ti)
void Invoke (SetterCall sc)
object Invoke (MethodCall mc)
 RuntimeEnv (params Assembly[] callableAssembles)

Properties

ICollection< Assembly > CallableAssemblies [get]


Detailed Description

A very simple execution environment for runable components of the .NET macro collection.

Constructor & Destructor Documentation

wx.NetMacros.RuntimeEnv.RuntimeEnv ( params Assembly[]  callableAssembles  ) 

Creates a runtime environment where all public ctors, methods, and properties of the listed assemblies can be called.

Parameters:
callableAssembles A collection of assemblies. All ctors, methods, and properties of these assemblies can be called/executed in this runtime environment.


Member Function Documentation

object wx.NetMacros.RuntimeEnv.CreateInstance ( Generator  generator  ) 

Creates an instance following the instructions included in the provided generator. This method will change MethodCall.Self and SetterCall.Self of all stters and modifiers of the generator: Self will be set to the newly created instance.

Parameters:
generator Activator call and subsequent setter and modifier calls that shall be executed to create the desired instance.
Returns:
The created instance.
Exceptions:
System.ArgumentExeption This will be thrown if some necessary properties of the method call are missing. This exception will arise for instance if the type is unknown.

ConstructorInfo wx.NetMacros.RuntimeEnv.GetConstructor ( MethodDescriptor  md  ) 

Returns the constructor information on the ctor of the signature that is represented by the argument.

Parameters:
md A descriptor of teh requested ctor defining a signature,

object wx.NetMacros.RuntimeEnv.GetDescriptor ( string  classnameOrMethodOrProperty  ) 

Tries to parse the given string as MethodDescriptor, MemberDescriptor, or TypeDescriptor and search for a corresponding code object in the assembles forming this runtime environment.

Parameters:
classnameOrMethodOrProperty 
Returns:
A TypeDescriptor, a MethodDescriptor, or a MemberDescriptor. The result is null if nothing can be parsed.

MethodInfo wx.NetMacros.RuntimeEnv.GetMethod ( MemberDescriptor  mi  ) 

Returns information on the method designated by the argument.

Parameters:
mi A member designator that is expected to designate a method.
Returns:
Information on the designated method or null if hte method has not been found.

ParameterInfo [] wx.NetMacros.RuntimeEnv.GetParameters ( MethodDescriptor  md  ) 

Returns a list of parameters of the method designated by the argument.

Parameters:
md Specifis the method or constructor whose parameters shall be returned.
Returns:

PropertyInfo wx.NetMacros.RuntimeEnv.GetProperty ( MemberDescriptor  mi  ) 

Returns information on the property designated by the argument.

Parameters:
mi A member designator that is expected to designate a property.
Returns:
Information on the designated method or null if hte property has not been found.

Type wx.NetMacros.RuntimeEnv.GetType ( TypeDescriptor  ti,
bool  considerAllAssembliesOfTheDomain 
)

Finds the type designated by the descriptor in the parameter list.

Parameters:
ti Name and namespace of the type to return.
considerAllAssembliesOfTheDomain With true, this method will search all known types. With false, only the assemblies of the callable assemblies will be searched.
Returns:
The designated type or null if non of the callable assemblies knows a type of the requested name.

Type wx.NetMacros.RuntimeEnv.GetType ( TypeDescriptor  ti  ) 

Finds the type designated by the descriptor in the parameter list.

Parameters:
ti Name and namespace of the type to return.
Returns:
The designated type or null if non of the callable assemblies knows a type of the requested name.

void wx.NetMacros.RuntimeEnv.Invoke ( SetterCall  sc  ) 

Executes a setter.

Parameters:
sc The setter (assignment to a property) that will be executed.
Exceptions:
System.ArgumentExeption This will be thrown if some necessary properties of the method call are missing. This exception will arise for instance if the type is unknown.

object wx.NetMacros.RuntimeEnv.Invoke ( MethodCall  mc  ) 

Executes a mathod.

Parameters:
mc The method to be executed.
Exceptions:
System.ArgumentExeption This will be thrown if some necessary properties of the method call are missing. This exception will arise for instance if the type is unknown.
Returns:
The object that results from the call. This is null for void methods.


Property Documentation

ICollection<Assembly> wx.NetMacros.RuntimeEnv.CallableAssemblies [get]

Returns a read-only collection of those assemblies forming the runtime environment. All public ctors, methods, and properties of these assembles my be accessed by actions executed by this runtime environment.


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads