示例#1
0
        private object DoTimeoutOp(int timeout, IOp op)
        {
            this.CheckDisposed();
            object obj2 = null;

            this.StartTimeoutTrack(timeout);
            try
            {
                obj2 = op.Execute();
            }
            catch (Exception exception)
            {
                NSTrace.WriteLineError("SocketEx (ex): " + exception.ToString());
                this.StopTimeoutTrack(exception);
                throw;
            }
            catch
            {
                NSTrace.WriteLineError("SocketEx (non clas ex): " + Environment.StackTrace);
                this.StopTimeoutTrack(this.NonCLSException);
                throw;
            }
            this.StopTimeoutTrack(null);
            return(obj2);
        }
示例#2
0
        private object EndTimeoutOp(IOp op, IAsyncResult ar)
        {
            object obj2 = null;

            try
            {
                obj2 = op.EndExecute(ar);
            }
            catch (Exception exception)
            {
                NSTrace.WriteLineError("SocketEx.E (ex): " + exception.ToString());
                this.StopTimeoutTrack(exception);
                throw;
            }
            catch
            {
                NSTrace.WriteLineError("SocketEx.E (Non CLS ex): " + Environment.StackTrace);
                this.StopTimeoutTrack(this.NonCLSException);
                throw;
            }
            this.StopTimeoutTrack(null);
            return(obj2);
        }
示例#3
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);
        }
示例#4
0
        object EndTimeoutOp(IOp op, IAsyncResult ar)
        {
            object ret = null;
            try
            {
                ret = op.EndExecute(ar);
            }
            catch(Exception e)
            {
                NSTrace.WriteLineError("SocketEx.E (ex): " + e.ToString());
                StopTimeoutTrack(e);
                throw;
            }

            /*
            catch
            {
                NSTrace.WriteLineError("SocketEx.E (Non CLS ex): " + Environment.StackTrace);
                StopTimeoutTrack(NonCLSException);
                throw;
            }
            */
            StopTimeoutTrack(null);
            return ret;
        }
示例#5
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;
        }
示例#6
0
        object DoTimeoutOp(int timeout, IOp op)
        {
            CheckDisposed();

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

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