On Mon, Dec 6, 2010 at 2:03 PM, impworks <hazar...@gmail.com> wrote:
> Is there any way to programmatically turn a type described by
> TypeDefinition to an array of that type?
TypeDefinition type = GetTypeDefinition ();
TypeReference array = new ArrayType (type);
Alternatively, you can use the MakeArrayType extension method in Cecil.Rocks.
Jb
On Mon, Dec 6, 2010 at 3:27 PM, Timwi <ti...@gmx.net> wrote:
> All of this could probably be simply explained in an XML comment on
> the classes in Mono.Cecil, but Jb refuses to add any of those without
> explaining to us why.
This is not really accurate.
The piece of text you just wrote would perfectly fit on a doc, be it
in the wiki or in a xml doc. I already said in the past that I don't
like inline XML comments.
I'm definitely not against having an API documentation using monodoc
which stores the documentation outside of the source.
Jb
--
--
mono-cecil
To be fair, Timwi already said he was willing to help with the doc.
> JB could you go more into detail on how you see things working? I for one
> would be happy to help out.
I'll see about generating monodoc stubs and check them in. Everyone
could contribute to it then.
Jb
--
--
mono-cecil
The following code implies that both list_t and Someclass are defined
in another module, and thus, require to be imported.
ModuleDefinition module = ...;
var list_t = module.Import (list_t_definition);
var some_class = module.Import (some_class_definition);
var list_some_class = new GenericInstanceType (list_t);
list_come_class.GenericArguments.Add (some_class);
Jb
For those you have fast accessors:
module.TypeSystem.Void
For instance.
Jb