private Array GetVector <T>()
{
int count = PropVariantNativeMethods.PropVariantGetElementCount(this);
if (count <= 0)
{
return(null);
}
lock (_padlock)
{
if (_vectorActions == null)
{
_vectorActions = GenerateVectorActions();
}
}
Action <PropVariant, Array, uint> action;
if (!_vectorActions.TryGetValue(typeof(T), out action))
{
throw new InvalidCastException("");
}
Array array = new T[count];
for (uint i = 0; i < count; i++)
{
action(this, array, i);
}
return(array);
}