本文整理汇总了C#中System.Net.Security.LazyAsyncResult.InvokeCallback方法的典型用法代码示例。如果您正苦于以下问题:C# LazyAsyncResult.InvokeCallback方法的具体用法?C# LazyAsyncResult.InvokeCallback怎么用?C# LazyAsyncResult.InvokeCallback使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Net.Security.LazyAsyncResult
的用法示例。
在下文中一共展示了LazyAsyncResult.InvokeCallback方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckCompletionBeforeNextSend
//
// This will check and logically complete the auth handshake.
//
private void CheckCompletionBeforeNextSend(byte[] message, LazyAsyncResult lazyResult)
{
//If we are done don't go into send.
if (HandshakeComplete)
{
if (!_remoteOk)
{
throw new AuthenticationException(SR.Format(SR.net_io_header_id, "MessageId", _framer.ReadHeader.MessageId, FrameHeader.HandshakeDoneId), null);
}
if (lazyResult != null)
{
lazyResult.InvokeCallback();
}
return;
}
// Not yet done, get a new blob and send it if any.
StartSendBlob(message, lazyResult);
}
示例2: CheckCompletionBeforeNextReceive
//
// This will check and logically complete the auth handshake.
//
private void CheckCompletionBeforeNextReceive(LazyAsyncResult lazyResult)
{
if (HandshakeComplete && _remoteOk)
{
// We are done with success.
if (lazyResult != null)
{
lazyResult.InvokeCallback();
}
return;
}
StartReceiveBlob(lazyResult);
}