private TypeReference GetInvokeTypeRef(ILCryptoInvokeType invokeType, TypeReference typeRef, BuildModule targetModule)
 {
     return(new TypeReference(
                invokeType.TypeName,
                _mainTypeNamespace,
                typeRef.ResolutionScope,
                false));
 }
        private TypeSignature GetInvokeTypeSig(ILCryptoInvokeType invokeType, TypeSignature typeSig, BuildModule targetModule)
        {
            switch (typeSig.ElementCode)
            {
            case TypeElementCode.GenericType:
            {
                return(new GenericTypeReference(
                           GetInvokeTypeRef(invokeType, typeSig.DeclaringType, targetModule),
                           typeSig.GenericArguments));
            }

            case TypeElementCode.DeclaringType:
            {
                return(GetInvokeTypeRef(invokeType, (TypeReference)typeSig, targetModule));
            }

            default:
                return(typeSig);
            }
        }