public override InterfaceType ToInterfaceType()
{
if (Type.IsGenericType)
{
// convert args of things like Generic Collections
Type genericType = Type.GetGenericTypeDefinition();
var genericArguments = Type.GetGenericArguments().Select(t => new MemoryImplementationType(t, IftFactory, _typeChecker).ToInterfaceType().Type).ToArray();
return IftFactory(genericType.MakeGenericType(genericArguments));
}
else
{
// TODO: #1570 using wrong suffix
var ifTypeName = Type.FullName.Replace("Memory" + Helper.ImplementationSuffix, String.Empty);
return IftFactory(Type.GetType(ifTypeName + ", " + typeof(ObjectClass).Assembly.FullName, true));
}
}