当前位置: 首页>>代码示例>>C#>>正文


C# IceInternal.type方法代码示例

本文整理汇总了C#中IceInternal.type方法的典型用法代码示例。如果您正苦于以下问题:C# IceInternal.type方法的具体用法?C# IceInternal.type怎么用?C# IceInternal.type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IceInternal的用法示例。


在下文中一共展示了IceInternal.type方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CompareTo

    public override int CompareTo(IceInternal.EndpointI obj)
    {
        EndpointI p = null;

        try
        {
            p = (EndpointI)obj;
        }
        catch(System.InvalidCastException)
        {
            try
            {
                return type() < obj.type() ? -1 : 1;
            }
            catch(System.InvalidCastException)
            {
                Debug.Assert(false);
            }
        }

        if(this == p)
        {
            return 0;
        }

        return _endpoint.CompareTo(p._endpoint);
    }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:27,代码来源:EndpointI.cs

示例2: clone

 public IceInternal.EndpointFactory clone(IceInternal.ProtocolInstance instance)
 {
     return new EndpointFactoryI(new Instance(_instance.engine(), instance.type(), instance.protocol()));
 }
开发者ID:externl,项目名称:ice,代码行数:4,代码来源:EndpointI.cs

示例3: CompareTo

        //
        // Compare endpoints for sorting purposes
        //
        public override int CompareTo(IceInternal.EndpointI obj)
        {
            if(!(obj is EndpointI))
            {
                return type() < obj.type() ? -1 : 1;
            }

            EndpointI p = (EndpointI)obj;
            if(this == p)
            {
                return 0;
            }

            if(_timeout < p._timeout)
            {
                return -1;
            }
            else if(p._timeout < _timeout)
            {
                return 1;
            }

            if(!_compress && p._compress)
            {
                return -1;
            }
            else if(!p._compress && _compress)
            {
                return 1;
            }

            return base.CompareTo(p);
        }
开发者ID:externl,项目名称:ice,代码行数:36,代码来源:EndpointI.cs

示例4: ConnectionI

        internal ConnectionI(Communicator communicator, IceInternal.Instance instance,
                             IceInternal.ConnectionReaper reaper, IceInternal.Transceiver transceiver,
                             IceInternal.Connector connector, IceInternal.EndpointI endpoint, ObjectAdapter adapter)
        {
            _communicator = communicator;
            _instance = instance;
            _reaper = reaper;
            InitializationData initData = instance.initializationData();
            _transceiver = transceiver;
            _desc = transceiver.ToString();
            _type = transceiver.type();
            _connector = connector;
            _endpoint = endpoint;
            _adapter = adapter;
            _dispatcher = initData.dispatcher; // Cached for better performance.
            _logger = initData.logger; // Cached for better performance.
            _traceLevels = instance.traceLevels(); // Cached for better performance.
            _timer = instance.timer();
            _writeTimeout = new TimeoutCallback(this);
            _writeTimeoutScheduled = false;
            _writeStreamPos = -1;
            _readTimeout = new TimeoutCallback(this);
            _readTimeoutScheduled = false;
            _readStreamPos = -1;
            _warn = initData.properties.getPropertyAsInt("Ice.Warn.Connections") > 0;
            _warnUdp = initData.properties.getPropertyAsInt("Ice.Warn.Datagrams") > 0;
            _cacheBuffers = initData.properties.getPropertyAsIntWithDefault("Ice.CacheMessageBuffers", 1) == 1;
            _acmAbsoluteTimeoutMillis = 0;
            _nextRequestId = 1;
            _batchAutoFlush = initData.properties.getPropertyAsIntWithDefault("Ice.BatchAutoFlush", 1) > 0;
            _batchStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding, _batchAutoFlush);
            _batchStreamInUse = false;
            _batchRequestNum = 0;
            _batchRequestCompress = false;
            _batchMarker = 0;
            _readStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding);
            _readHeader = false;
            _writeStream = new IceInternal.BasicStream(instance, Util.currentProtocolEncoding);
            _dispatchCount = 0;
            _state = StateNotInitialized;

            _compressionLevel = initData.properties.getPropertyAsIntWithDefault("Ice.Compression.Level", 1);
            if(_compressionLevel < 1)
            {
                _compressionLevel = 1;
            }
            else if(_compressionLevel > 9)
            {
                _compressionLevel = 9;
            }

            ObjectAdapterI adapterImpl = _adapter as ObjectAdapterI;
            if(adapterImpl != null)
            {
                _servantManager = adapterImpl.getServantManager();
            }

            try
            {
                if(_endpoint.datagram())
                {
                    _acmTimeout = 0;
                }
                else
                {
                    if(adapterImpl != null)
                    {
                        _acmTimeout = adapterImpl.getACM();
                    }
                    else
                    {
                        _acmTimeout = _instance.clientACM();
                    }
                }

                if(adapterImpl != null)
                {
                    _threadPool = adapterImpl.getThreadPool();
                }
                else
                {
                    _threadPool = instance.clientThreadPool();
                }
                _threadPool.initialize(this);
            }
            catch(LocalException)
            {
                throw;
            }
            catch(System.Exception ex)
            {
                throw new SyscallException(ex);
            }
        }
开发者ID:sbesson,项目名称:zeroc-ice,代码行数:94,代码来源:ConnectionI.cs

示例5: clone

 public IceInternal.EndpointFactory clone(IceInternal.ProtocolInstance inst,
                                          IceInternal.EndpointFactory del)
 {
     Instance instance = new Instance(_instance.engine(), inst.type(), inst.protocol());
     return new EndpointFactoryI(instance, del != null ? del : _delegate.clone(instance, null));
 }
开发者ID:zhangwei5095,项目名称:ice,代码行数:6,代码来源:EndpointI.cs

示例6: CompareTo

        //
        // Compare endpoints for sorting purposes
        //
        public override int CompareTo(IceInternal.EndpointI obj)
        {
            if(!(obj is EndpointI))
            {
                return type() < obj.type() ? -1 : 1;
            }

            EndpointI p = (EndpointI)obj;
            if(this == p)
            {
                return 0;
            }

            return _delegate.CompareTo(p._delegate);
        }
开发者ID:zhangwei5095,项目名称:ice,代码行数:18,代码来源:EndpointI.cs

示例7: CompareTo

        //
        // Compare endpoints for sorting purposes
        //
        public override int CompareTo(IceInternal.EndpointI obj)
        {
            if(!(obj is EndpointI))
            {
                return type() < obj.type() ? -1 : 1;
            }
            
            EndpointI p = (EndpointI)obj;
            if(this == p)
            {
                return 0;
            }
            else
            {
                int r = base.CompareTo(p);
                if(r != 0)
                {
                    return r;
                }
            }

            if(_port < p._port)
            {
                return -1;
            }
            else if(p._port < _port)
            {
                return 1;
            }

            if(_timeout < p._timeout)
            {
                return -1;
            }
            else if(p._timeout < _timeout)
            {
                return 1;
            }

            if(!connectionId_.Equals(p.connectionId_))
            {
                return string.Compare(connectionId_, p.connectionId_, StringComparison.Ordinal);
            }

            if(!_compress && p._compress)
            {
                return -1;
            }
            else if(!p._compress && _compress)
            {
                return 1;
            }

            return string.Compare(_host, p._host, StringComparison.Ordinal);
        }
开发者ID:Radulfr,项目名称:zeroc-ice,代码行数:58,代码来源:EndpointI.cs


注:本文中的IceInternal.type方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。