本文整理汇总了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);
}
}
示例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;
}
}
}
}
}