当前位置: 首页>>代码示例>>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;未经允许,请勿转载。