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


C# IceInternal.exception方法代码示例

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


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

示例1: connectors_async

 public override void connectors_async(Ice.EndpointSelectionType selType, IceInternal.EndpointI_connectors cb)
 {
     try
     {
         _configuration.checkConnectorsException();
         _endpoint.connectors_async(selType, new ConnectorsCallback(cb));
     }
     catch(Ice.LocalException ex)
     {
         cb.exception(ex);
     }
 }
开发者ID:Crysty-Yui,项目名称:ice,代码行数:12,代码来源:EndpointI.cs

示例2: asyncRequestCanceled

        public void asyncRequestCanceled(IceInternal.OutgoingAsyncBase outAsync, Ice.LocalException ex)
        {
            //
            // NOTE: This isn't called from a thread pool thread.
            //

            lock(this)
            {
                if(_state >= StateClosed)
                {
                    return; // The request has already been or will be shortly notified of the failure.
                }

                OutgoingMessage o = _sendStreams.FirstOrDefault(m => m.outAsync == outAsync);
                if(o != null)
                {
                    if(o.requestId > 0)
                    {
                        _asyncRequests.Remove(o.requestId);
                    }

                    if(ex is Ice.ConnectionTimeoutException)
                    {
                        setState(StateClosed, ex);
                    }
                    else
                    {
                        //
                        // If the request is being sent, don't remove it from the send streams,
                        // it will be removed once the sending is finished.
                        //
                        if(o == _sendStreams.First.Value)
                        {
                            o.canceled();
                        }
                        else
                        {
                            o.canceled();
                            _sendStreams.Remove(o);
                        }
                        if(outAsync.exception(ex))
                        {
                            outAsync.invokeExceptionAsync();
                        }
                    }
                    return;
                }

                if(outAsync is IceInternal.OutgoingAsync)
                {
                    foreach(KeyValuePair<int, IceInternal.OutgoingAsyncBase> kvp in _asyncRequests)
                    {
                        if(kvp.Value == outAsync)
                        {
                            if(ex is Ice.ConnectionTimeoutException)
                            {
                                setState(StateClosed, ex);
                            }
                            else
                            {
                                _asyncRequests.Remove(kvp.Key);
                                if(outAsync.exception(ex))
                                {
                                    outAsync.invokeExceptionAsync();
                                }
                            }
                            return;
                        }
                    }
                }
            }
        }
开发者ID:zhangwei5095,项目名称:ice,代码行数:72,代码来源:ConnectionI.cs


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