當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Ice.encodingVersionToString方法代碼示例

本文整理匯總了TypeScript中ice.Ice.encodingVersionToString方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Ice.encodingVersionToString方法的具體用法?TypeScript Ice.encodingVersionToString怎麽用?TypeScript Ice.encodingVersionToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ice.Ice的用法示例。


在下文中一共展示了Ice.encodingVersionToString方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: allTests


//.........這裏部分代碼省略.........
        b1 = b1.ice_endpointSelection(Ice.EndpointSelectionType.Ordered);
        b1 = b1.ice_locatorCacheTimeout(100);
        b1 = b1.ice_invocationTimeout(1234);
        b1 = b1.ice_encodingVersion(new Ice.EncodingVersion(1, 0));

        let router = communicator.stringToProxy("router");
        router = router.ice_connectionCached(true);
        router = router.ice_preferSecure(true);
        router = router.ice_endpointSelection(Ice.EndpointSelectionType.Random);
        router = router.ice_locatorCacheTimeout(200);
        router = router.ice_invocationTimeout(1500);

        let locator = communicator.stringToProxy("locator");
        locator = locator.ice_connectionCached(false);
        locator = locator.ice_preferSecure(true);
        locator = locator.ice_endpointSelection(Ice.EndpointSelectionType.Random);
        locator = locator.ice_locatorCacheTimeout(300);
        locator = locator.ice_invocationTimeout(1500);

        locator = locator.ice_router(Ice.RouterPrx.uncheckedCast(router));
        b1 = b1.ice_locator(Ice.LocatorPrx.uncheckedCast(locator));

        const proxyProps = communicator.proxyToProperty(b1, "Test");
        test(proxyProps.size === 21);
        test(proxyProps.get("Test") === "test -t -e 1.0");
        test(proxyProps.get("Test.CollocationOptimized") === "0");
        test(proxyProps.get("Test.ConnectionCached") === "1");
        test(proxyProps.get("Test.PreferSecure") === "0");
        test(proxyProps.get("Test.EndpointSelection") === "Ordered");
        test(proxyProps.get("Test.LocatorCacheTimeout") === "100");
        test(proxyProps.get("Test.InvocationTimeout") === "1234");

        test(proxyProps.get("Test.Locator") === "locator -t -e " +
                Ice.encodingVersionToString(Ice.currentEncoding()));
        test(proxyProps.get("Test.Locator.CollocationOptimized") === "0");
        test(proxyProps.get("Test.Locator.ConnectionCached") === "0");
        test(proxyProps.get("Test.Locator.PreferSecure") === "1");
        test(proxyProps.get("Test.Locator.EndpointSelection") === "Random");
        test(proxyProps.get("Test.Locator.LocatorCacheTimeout") === "300");
        test(proxyProps.get("Test.Locator.InvocationTimeout") === "1500");

        test(proxyProps.get("Test.Locator.Router") === "router -t -e " +
                Ice.encodingVersionToString(Ice.currentEncoding()));
        test(proxyProps.get("Test.Locator.Router.CollocationOptimized") === "0");
        test(proxyProps.get("Test.Locator.Router.ConnectionCached") === "1");
        test(proxyProps.get("Test.Locator.Router.PreferSecure") === "1");
        test(proxyProps.get("Test.Locator.Router.EndpointSelection") === "Random");
        test(proxyProps.get("Test.Locator.Router.LocatorCacheTimeout") === "200");
        test(proxyProps.get("Test.Locator.Router.InvocationTimeout") === "1500");

        out.writeLine("ok");

        out.write("testing ice_getCommunicator... ");
        test(base.ice_getCommunicator() === communicator);
        out.writeLine("ok");

        out.write("testing proxy methods... ");
        test(communicator.identityToString(
            base.ice_identity(Ice.stringToIdentity("other")).ice_getIdentity()) === "other");
        test(Ice.identityToString(
            base.ice_identity(Ice.stringToIdentity("other")).ice_getIdentity()) === "other");
        test(base.ice_facet("facet").ice_getFacet() === "facet");
        test(base.ice_adapterId("id").ice_getAdapterId() === "id");
        test(base.ice_twoway().ice_isTwoway());
        test(base.ice_oneway().ice_isOneway());
        test(base.ice_batchOneway().ice_isBatchOneway());
開發者ID:zeroc-ice,項目名稱:ice-debian-packaging,代碼行數:67,代碼來源:Client.ts


注:本文中的ice.Ice.encodingVersionToString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。