internal static IPackage GetPackage(MemoryStream stream, int index, Type packageType)
{
IPackage retVal = null;
object[] parms = { stream, index };
Type[] constructorSignature = { typeof(MemoryStream), typeof(int) };
if (packageType != null)
{
ConstructorInfo constructor = packageType.GetConstructor(constructorSignature);
object obj = constructor.Invoke(parms);
retVal = obj as IPackage;
}
return retVal;
}