本文整理汇总了C#中Ice.proxyToProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Ice.proxyToProperty方法的具体用法?C# Ice.proxyToProperty怎么用?C# Ice.proxyToProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ice
的用法示例。
在下文中一共展示了Ice.proxyToProperty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: allTests
//.........这里部分代码省略.........
test(b1.ice_getEndpointSelection() == Ice.EndpointSelectionType.Random);
prop.setProperty(property, "Random");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getEndpointSelection() == Ice.EndpointSelectionType.Random);
prop.setProperty(property, "Ordered");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getEndpointSelection() == Ice.EndpointSelectionType.Ordered);
prop.setProperty(property, "");
property = propertyPrefix + ".CollocationOptimized";
test(b1.ice_isCollocationOptimized());
prop.setProperty(property, "0");
b1 = communicator.propertyToProxy(propertyPrefix);
test(!b1.ice_isCollocationOptimized());
prop.setProperty(property, "");
property = propertyPrefix + ".Context.c1";
test(!b1.ice_getContext().ContainsKey("c1"));
prop.setProperty(property, "TEST");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getContext()["c1"].Equals("TEST"));
property = propertyPrefix + ".Context.c2";
test(!b1.ice_getContext().ContainsKey("c2"));
prop.setProperty(property, "TEST");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getContext()["c2"].Equals("TEST"));
prop.setProperty(propertyPrefix + ".Context.c1", "");
prop.setProperty(propertyPrefix + ".Context.c2", "");
WriteLine("ok");
Write("testing proxyToProperty... ");
Flush();
b1 = communicator.stringToProxy("test");
b1 = b1.ice_collocationOptimized(true);
b1 = b1.ice_connectionCached(true);
b1 = b1.ice_preferSecure(false);
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));
Ice.ObjectPrx router = communicator.stringToProxy("router");
router = router.ice_collocationOptimized(false);
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);
Ice.ObjectPrx locator = communicator.stringToProxy("locator");
locator = locator.ice_collocationOptimized(true);
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.RouterPrxHelper.uncheckedCast(router));
b1 = b1.ice_locator(Ice.LocatorPrxHelper.uncheckedCast(locator));
Dictionary<string, string> proxyProps = communicator.proxyToProperty(b1, "Test");
test(proxyProps.Count == 21);
示例2: allTests
//.........这里部分代码省略.........
prop.setProperty(property, "1");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_isPreferSecure());
prop.setProperty(property, "");
property = propertyPrefix + ".ConnectionCached";
test(b1.ice_isConnectionCached());
prop.setProperty(property, "0");
b1 = communicator.propertyToProxy(propertyPrefix);
test(!b1.ice_isConnectionCached());
prop.setProperty(property, "");
property = propertyPrefix + ".EndpointSelection";
test(b1.ice_getEndpointSelection() == Ice.EndpointSelectionType.Random);
prop.setProperty(property, "Random");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getEndpointSelection() == Ice.EndpointSelectionType.Random);
prop.setProperty(property, "Ordered");
b1 = communicator.propertyToProxy(propertyPrefix);
test(b1.ice_getEndpointSelection() == Ice.EndpointSelectionType.Ordered);
prop.setProperty(property, "");
property = propertyPrefix + ".CollocationOptimized";
test(b1.ice_isCollocationOptimized());
prop.setProperty(property, "0");
b1 = communicator.propertyToProxy(propertyPrefix);
test(!b1.ice_isCollocationOptimized());
prop.setProperty(property, "");
prop.setProperty(property, "");
Console.Out.WriteLine("ok");
Console.Out.Write("testing proxyToProperty... ");
Console.Out.Flush();
b1 = communicator.stringToProxy("test");
b1 = b1.ice_collocationOptimized(true);
b1 = b1.ice_connectionCached(true);
b1 = b1.ice_preferSecure(false);
b1 = b1.ice_endpointSelection(Ice.EndpointSelectionType.Ordered);
b1 = b1.ice_locatorCacheTimeout(100);
Ice.ObjectPrx router = communicator.stringToProxy("router");
router = router.ice_collocationOptimized(false);
router = router.ice_connectionCached(true);
router = router.ice_preferSecure(true);
router = router.ice_endpointSelection(Ice.EndpointSelectionType.Random);
router = router.ice_locatorCacheTimeout(200);
Ice.ObjectPrx locator = communicator.stringToProxy("locator");
locator = locator.ice_collocationOptimized(true);
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_router(Ice.RouterPrxHelper.uncheckedCast(router));
b1 = b1.ice_locator(Ice.LocatorPrxHelper.uncheckedCast(locator));
Dictionary<string, string> proxyProps = communicator.proxyToProperty(b1, "Test");
test(proxyProps.Count == 18);
test(proxyProps["Test"].Equals("test -t"));
test(proxyProps["Test.CollocationOptimized"].Equals("1"));
test(proxyProps["Test.ConnectionCached"].Equals("1"));