.AsyncQueueReader.End(result, out message);
}
return result.IsCompleted;
}
#endregion
#region Abort
///
/// Inserts processing on a communication object after it transitions to the closing state due to the invocation of a synchronous abort operation.
///
protected override void OnAbort()
{
_messageQueue.Close();
}
#endregion
#region Open
///
/// Inserts processing on a communication object after it transitions to the opening state due to the invocation of an asynchronous open operation.
///
/// The that specifies how long the on open operation has to complete before timing out.
/// The delegate that receives notification of the completion of the asynchronous on open operation.
/// An object, specified by the application, that contains state information associated with the asynchronous on open operation.
///
/// The that references the asynchronous on open operation.
///
///
/// is less than zero.
protected override IAsyncResult OnBeginOpen(TimeSpan timeout, AsyncCallback callback, object state)
{
OnOpen(timeout);
return new CompletedAsyncResult(callback, state);
}
///
/// Inserts processing on a communication object after it transitions into the opening state which must complete within a specified interval of time.
///
/// The that specifies how long the on open operation has to complete before timing out.
///
/// is less than zero.
/// The interval of time specified by that was allotted for the operation was exceeded before the operation was completed.
protected override void OnOpen(TimeSpan timeout)
{
_messageQueue.Open();
}
///
/// Completes an asynchronous operation on the open of a communication object.
///
/// The that is returned by a call to the method.
/// The interval of time specified by that was allotted for the operation was exceeded before the operation was completed.
protected override void OnEndOpen(IAsyncResult result)
{
CompletedAsyncResult.End(result);
}
#endregion
#region Close
///
/// Inserts processing after a communication object transitions to the closing state due to the invocation of an asynchronous close operation.
///
/// The that specifies how long the on close operation has to complete before timing out.
/// The delegate that receives notification of the completion of the asynchronous on close operation.
/// An object, specified by the application, that contains state information associated with the asynchronous on close operation.
///
/// The that references the asynchronous on close operation.
///
///
/// is less than zero.
protected override IAsyncResult OnBeginClose(TimeSpan timeout, AsyncCallback callback, object state)
{
OnClose(timeout);
return new CompletedAsyncResult(callback, state);
}
///
/// Inserts processing on a communication object after it transitions to the closing state due to the invocation of a synchronous close operation.
///
/// The that specifies how long the on close operation has to complete before timing out.
///
/// is less than zero.
protected override void OnClose(TimeSpan timeout)
{
_messageQueue.Close();
}
///
/// Completes an asynchronous operation on the close of a communication object.
///
/// The that is returned by a call to the method.
/// The interval of time specified by that was allotted for the operation was exceeded before the operation was completed.
protected override void OnEndClose(IAsyncResult result)
{
CompletedAsyncResult.End(result);
}
#endregion
#region GetProperty
///
/// Gets the property.
///
///
public override P GetProperty()
{
if(typeof(P) == typeof(FaultConverter))
{
return FaultConverter.GetDefaultFaultConverter(MessageVersion.Soap12WSAddressing10) as P;
}
return base.GetProperty
();
}
#endregion
#region Private members
private EndpointAddress _localAddress;
private InputQueue _messageQueue;
#endregion
}
}