Ejemplo n.º 1
0
        internal static SwiftMetatype AssociatedTypeMetadataRequest(SwiftMetatype conformingType, SwiftProtocolWitnessTable witness,
                                                                    IntPtr protocolRequirementsBaseDescriptor, SwiftAssociatedTypeDescriptor assocDesc)
        {
            var response = swift_getAssociatedTypeWitness(SwiftMetadataRequest.Complete, witness, conformingType,
                                                          protocolRequirementsBaseDescriptor, assocDesc.Handle);

            if (response.ResponseState > 1)             // 0 and 1 are ok for us
                throw new SwiftRuntimeException($"Error retrieving associated type from protocol - returned {response.ResponseState}"); }
Ejemplo n.º 2
0
 static extern MetadataResponse swift_getAssociatedTypeWitness(SwiftMetadataRequest request, SwiftProtocolWitnessTable witness,
                                                               SwiftMetatype conformingType, IntPtr conformanceBaseDescriptor, IntPtr conformanceRequest);