Ejemplo n.º 1
0
        protected void CancelAsync(object userState)
        {
            WebClientAsyncResult result = (WebClientAsyncResult)mappings [userState];

            if (result == null)
            {
                return;
            }

            mappings.Remove(userState);
            result.Abort();
        }
Ejemplo n.º 2
0
        /// <include file='doc\ClientProtocol.uex' path='docs/doc[@for="ClientProtocol.CancelInvokeAsync"]/*' />
        /// <devdoc>
        ///    <para>[To be supplied.]</para>
        /// </devdoc>
        protected void CancelAsync(object userState)
        {
            if (userState == null)
            {
                userState = NullToken;
            }
            WebClientAsyncResult result = OperationCompleted(userState, new object[] { null }, null, true);

            if (result != null)
            {
                result.Abort();
            }
        }
Ejemplo n.º 3
0
        protected void CancelAsync(object userState)
        {
            if (userState == null)
            {
                userState = base.NullToken;
            }
            object[]             parameters = new object[1];
            WebClientAsyncResult result     = this.OperationCompleted(userState, parameters, null, true);

            if (result != null)
            {
                result.Abort();
            }
        }