|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace AsyncServiceLibrary
{
public class CustomAsyncResult<TState> : IAsyncResult
{
private CustomState<TState> MyState;
private IAsyncResult ExternalServiceResult;
public CustomAsyncResult(IAsyncResult externalServiceResult, CustomState<TState> myState)
{
this.ExternalServiceResult = externalServiceResult;
this.MyState = myState;
}
public IAsyncResult ExternalAsyncResult
{
get { return this.ExternalServiceResult; }
}
public CustomState<TState> CustomState
{
get { return this.MyState; }
}
#region IAsyncResult Members
public object AsyncState
{
get { return this.MyState.WcfState; }
}
public WaitHandle AsyncWaitHandle
{
get { return ExternalServiceResult.AsyncWaitHandle; }
}
public bool CompletedSynchronously
{
get { return ExternalServiceResult.CompletedSynchronously; }
}
public bool IsCompleted
{
get { return ExternalServiceResult.IsCompleted; }
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.