BeginExecute() абстрактный приватный Метод

abstract private BeginExecute ( AsyncCallback cb, object state ) : object
cb AsyncCallback
state object
Результат object
Пример #1
0
        private object BeginTimeoutOp(int timeout, IOp op, AsyncCallback cb, object state)
        {
            this.CheckDisposed();
            object obj2 = null;

            this.StartTimeoutTrack(timeout);
            try
            {
                obj2 = op.BeginExecute(cb, state);
            }
            catch (Exception exception)
            {
                NSTrace.WriteLineError("SocketEx.B (ex): " + exception.ToString());
                this.StopTimeoutTrack(exception);
                throw;
            }
            catch
            {
                NSTrace.WriteLineError("SocketEx.B (non cls ex): " + Environment.StackTrace);
                this.StopTimeoutTrack(this.NonCLSException);
                throw;
            }
            return(obj2);
        }
Пример #2
0
        object BeginTimeoutOp(int timeout, IOp op, AsyncCallback cb, object state)
        {
            CheckDisposed();

            object ret = null;
            StartTimeoutTrack(timeout);
            try
            {
                ret = op.BeginExecute(cb, state);
            }
            catch(Exception e)
            {
                NSTrace.WriteLineError("SocketEx.B (ex): " + e.ToString());
                StopTimeoutTrack(e);
                throw;
            }

            /*
            catch
            {
                NSTrace.WriteLineError("SocketEx.B (non cls ex): " + Environment.StackTrace);
                StopTimeoutTrack(NonCLSException);
                throw;
            }
            */
            return ret;
        }