///////////////////////////////////////////////////////////////////////////////// private void SetInterfacesOnAggregate(AggregateSymbol aggregate, Type type) { Type[] interfaces; if (type.GetTypeInfo().IsGenericType) { type = type.GetTypeInfo().GetGenericTypeDefinition(); } interfaces = type.GetTypeInfo().ImplementedInterfaces.ToArray(); // We wont be able to find the difference between Ifaces and // IfacesAll anymore - at runtime, the class implements all of its // Ifaces and IfacesAll, so theres no way to differentiate. // // This actually doesn't matter though - for conversions and methodcalls, // we don't really care where they've come from as long as we know the overall // set of IfacesAll. aggregate.SetIfaces(_bsymmgr.AllocParams(interfaces.Length, GetCTypeArrayFromTypes(interfaces))); aggregate.SetIfacesAll(aggregate.GetIfaces()); }