コード例 #1
0
ファイル: LocatorInfo.cs プロジェクト: motuii/ice
        public Ice.LocatorRegistryPrx getLocatorRegistry()
        {
            lock (this)
            {
                if (_locatorRegistry != null)
                {
                    return(_locatorRegistry);
                }
            }

            //
            // Do not make locator calls from within sync.
            //
            Ice.LocatorRegistryPrx locatorRegistry = _locator.getRegistry();
            if (locatorRegistry == null)
            {
                return(null);
            }

            lock (this)
            {
                //
                // The locator registry can't be located. We use ordered
                // endpoint selection in case the locator returned a proxy
                // with some endpoints which are prefered to be tried first.
                //
                _locatorRegistry = locatorRegistry.Clone(clearLocator: true, endpointSelectionType: EndpointSelectionType.Ordered);
                return(_locatorRegistry);
            }
        }
コード例 #2
0
ファイル: LocatorI.cs プロジェクト: xingx001/ice
 public LocatorI(LookupI lookup, Ice.LocatorRegistryPrx registry)
 {
     _lookup   = lookup;
     _registry = registry;
 }