private object InstantiateType (Type type)
{
object o;
// Returns null if the type isn't a collection type.
o = InstantiateCollectionType (type);
if (o == null)
o = Activator.CreateInstance (type);
// TODO: Why did I need this?
// INativeEventObjectWrapper evo = o as INativeEventObjectWrapper;
// if (evo != null)
// NativeMethods.event_object_ref (evo.NativeHandle);
return o;
}