コード例 #1
0
        SLSimpleType ToProtocol(SLImportModules modules, SwiftProtocolListType protocol)
        {
            if (protocol.Protocols.Count > 1)
            {
                throw new NotSupportedException("Protocol lists > 1 not supported (yet).");
            }
            SwiftClassType cl = protocol.Protocols [0];

            return(ToClass(modules, cl));
        }
コード例 #2
0
        bool MustBeInOut(SwiftType st)
        {
            SwiftProtocolListType protList = st as SwiftProtocolListType;

            if (protList != null)
            {
                if (protList.Protocols.Count > 1)
                {
                    throw ErrorHelper.CreateError(ReflectorError.kTypeMapBase + 14, "Protocol lists of size > 1 aren't supported. Yet.");
                }
                return(MustBeInOut(protList.Protocols [0]));
            }
            if (st.IsClass)
            {
                return(false);
            }
            return(typeMapper.MustForcePassByReference(st));
        }