コード例 #1
0
        public static SecureChatDataContext CreateReuse()
        {
            if (_context_static == null)
            {
                return(SecureChatDataContext.Create());
            }

            _context_static._useCount++;
            return(_context_static);
        }
コード例 #2
0
 new public void Dispose()
 {
     if (this._useCount > 0)
     {
         this._useCount--;
     }
     else
     {
         _context_static = this._outerContext;
         base.Dispose();
     }
 }