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

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


            AwaitableMethod = new AwaitableMethod(this);
            MethodType      = NetworkMethodType.AsyncResult;
            _method         = new SessionMethodAsyncResult(this);
        }
示例#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);
        }
示例#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);
            }
        }