private static bool OpenComplete(IAsyncResult result)
 {
     OpenOnceManager.OpenOnceManagerAsyncResult <T> asyncState = (OpenOnceManager.OpenOnceManagerAsyncResult <T>)result.AsyncState;
     asyncState.openOnceManager.EndOpen(result);
     return(asyncState.BeginOperation());
 }
 private static bool OperationComplete(IAsyncResult result)
 {
     OpenOnceManager.OpenOnceManagerAsyncResult <T> asyncState = (OpenOnceManager.OpenOnceManagerAsyncResult <T>)result.AsyncState;
     asyncState.operationResult = asyncState.endOperation(result, out asyncState.output);
     return(true);
 }
 public static bool End(IAsyncResult result, out T output)
 {
     OpenOnceManager.OpenOnceManagerAsyncResult <T> openOnceManagerAsyncResult = AsyncResult.End <OpenOnceManager.OpenOnceManagerAsyncResult <T> >(result);
     output = openOnceManagerAsyncResult.output;
     return(openOnceManagerAsyncResult.operationResult);
 }