Exemple #1
0
        public Session()
        {
            Interlocked.Increment(ref NextSessionId);
            SessionId = NextSessionId;

            AwaitableMethod = new AwaitableMethod(this);
            MethodType = NetworkMethodType.AsyncResult;
            _method = new SessionMethodAsyncResult(this);
        }
Exemple #2
0
        public Session()
        {
            Interlocked.Increment(ref NextSessionId);
            SessionId = NextSessionId;


            AwaitableMethod = new AwaitableMethod(this);
            MethodType      = NetworkMethodType.AsyncResult;
            _method         = new SessionMethodAsyncResult(this);
        }
Exemple #3
0
        public Session(NetworkMethodType methodType)
        {
            Interlocked.Increment(ref NextSessionId);
            SessionId = NextSessionId;

            AwaitableMethod = new AwaitableMethod(this);
            MethodType = methodType;

            if (MethodType == NetworkMethodType.AsyncResult)
                _method = new SessionMethodAsyncResult(this);

            if (MethodType == NetworkMethodType.AsyncEvent)
                _method = new SessionMethodAsyncEvent(this);
        }
Exemple #4
0
        public Session(NetworkMethodType methodType)
        {
            Interlocked.Increment(ref NextSessionId);
            SessionId = NextSessionId;


            AwaitableMethod = new AwaitableMethod(this);
            MethodType      = methodType;

            if (MethodType == NetworkMethodType.AsyncResult)
            {
                _method = new SessionMethodAsyncResult(this);
            }

            if (MethodType == NetworkMethodType.AsyncEvent)
            {
                _method = new SessionMethodAsyncEvent(this);
            }
        }