internal static object GetResult(DelegateAsyncResult inst)
 {
     if (inst.exception != null)
         throw inst.exception;
     else
         return inst.result;
 }
 internal static object GetResult(DelegateAsyncResult inst)
 {
     if (inst.exception != null)
     {
         throw inst.exception;
     }
     else
     {
         return(inst.result);
     }
 }
		public override IAsyncResult BeginGetResponse(AsyncCallback callback, object state)
		{
			GetResponseDelegate d = new GetResponseDelegate (GetAsyncResponse);
			DelegateAsyncResult result = new DelegateAsyncResult ();
			AsyncContext userContext = new AsyncContext (d, result, callback, state);
			result.AsyncResult = d.BeginInvoke (new AsyncCallback (DelegateAsyncResult.Callback), userContext);
			return result;
		}
			public AsyncContext (Delegate @delegate, DelegateAsyncResult delegateAsyncResult, AsyncCallback asyncCallback, object userState) {
				AsyncDelegate = @delegate;
				AsyncCallback = asyncCallback;
				AsyncState = userState;
				DelegateAsyncResult = delegateAsyncResult;
			}
 internal static void SetException(DelegateAsyncResult inst, Exception exception)
 {
     inst.completed = true;
     inst.exception = exception;
 }
 internal static void SetResult(DelegateAsyncResult inst, object result)
 {
     inst.completed = true;
     inst.result = result;
 }
 internal static void SetException(DelegateAsyncResult inst, Exception exception)
 {
     inst.completed = true;
     inst.exception = exception;
 }
 internal static void SetResult(DelegateAsyncResult inst, object result)
 {
     inst.completed = true;
     inst.result    = result;
 }