本文整理汇总了C#中IceInternal.Instance.proxyFactory方法的典型用法代码示例。如果您正苦于以下问题:C# Instance.proxyFactory方法的具体用法?C# Instance.proxyFactory怎么用?C# Instance.proxyFactory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IceInternal.Instance
的用法示例。
在下文中一共展示了Instance.proxyFactory方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ObjectAdapterI
//.........这里部分代码省略.........
{
InitializationException ex = new InitializationException();
ex.reason = "invalid proxy options `" + proxyOptions + "' for object adapter `" + _name + "'";
throw ex;
}
_acm = new ACMConfig(properties, communicator.getLogger(), _name + ".ACM", instance_.serverACM());
{
int defaultMessageSizeMax = instance.messageSizeMax() / 1024;
int num = properties.getPropertyAsIntWithDefault(_name + ".MessageSizeMax", defaultMessageSizeMax);
if(num < 1 || num > 0x7fffffff / 1024)
{
_messageSizeMax = 0x7fffffff;
}
else
{
_messageSizeMax = num * 1024; // Property is in kilobytes, _messageSizeMax in bytes
}
}
try
{
int threadPoolSize = properties.getPropertyAsInt(_name + ".ThreadPool.Size");
int threadPoolSizeMax = properties.getPropertyAsInt(_name + ".ThreadPool.SizeMax");
if(threadPoolSize > 0 || threadPoolSizeMax > 0)
{
_threadPool = new ThreadPool(instance_, _name + ".ThreadPool", 0);
}
if(router == null)
{
router = RouterPrxHelper.uncheckedCast(
instance_.proxyFactory().propertyToProxy(_name + ".Router"));
}
if(router != null)
{
_routerInfo = instance_.routerManager().get(router);
if(_routerInfo != null)
{
//
// Make sure this router is not already registered with another adapter.
//
if(_routerInfo.getAdapter() != null)
{
Ice.AlreadyRegisteredException ex = new Ice.AlreadyRegisteredException();
ex.kindOfObject = "object adapter with router";
ex.id = instance_.identityToString(router.ice_getIdentity());
throw ex;
}
//
// Add the router's server proxy endpoints to this object
// adapter.
//
EndpointI[] endpoints = _routerInfo.getServerEndpoints();
for(int i = 0; i < endpoints.Length; ++i)
{
_routerEndpoints.Add(endpoints[i]);
}
_routerEndpoints.Sort(); // Must be sorted.
//
// Remove duplicate endpoints, so we have a list of unique endpoints.
//
for(int i = 0; i < _routerEndpoints.Count-1;)