This project has moved and is read-only. For the latest updates, please go here.

Importing types instead of instances

Jan 3, 2009 at 5:38 PM
Hi guys,

Since the metadata chapter is missing from docs, how would one import types instead of instances?
I mean I'd like to see something like:

public IEnumerable<Type> Something { get; set;}

Is it possible right now?
Jan 4, 2009 at 7:04 AM
Edited Jan 4, 2009 at 7:04 AM
If what you are trying to do is export / import Types over Instances, you can do that. To do so you would use a property export as in below.

For example.

public class PartExportsType {
  public Type SomeType {get;set;}

  public Type AnotherType {get;set;}

public class PartImportsSomeType {
  public IEnumerable< Type> Something {get;set;} 

PartExportsType contains two type exports with the contract of "Something".
PartImportsSomeType imports the collection of available "Something" exports.

Hope this helps.