Ejemplo n.º 1
0
 public static bool SetContextInCache(Context context)
 {
     lock (ClientSessionCache.locker)
     {
         ClientSessionInfo clientSessionInfo = ClientSessionCache.FromContext(context, false);
         if (clientSessionInfo == null)
         {
             return(false);
         }
         clientSessionInfo.GetContext(context);
         clientSessionInfo.KeepAlive();
         return(true);
     }
 }
Ejemplo n.º 2
0
        static public bool SetContextInCache(Context context)
        {
            lock (locker) {
                // Don't check the validity because the masterKey of the ClientSessionInfo
                // can still be null when this is called the first time
                ClientSessionInfo csi = FromContext(context, false);
                if (csi == null)
                {
                    return(false);
                }

                csi.GetContext(context);
                csi.KeepAlive();
                return(true);
            }
        }
Ejemplo n.º 3
0
        public static bool SetContextInCache(Context context)
        {
            lock (locker)
            {
                ClientSessionInfo clientSessionInfo = FromContext(context, checkValidity: false);
                if (clientSessionInfo == null)
                {
                    return(false);
                }
                clientSessionInfo.GetContext(context);
                clientSessionInfo.KeepAlive();
                return(true);

IL_0035:
                bool result;
                return(result);
            }
        }
        public static bool SetContextInCache(Context context)
        {
            object obj = ClientSessionCache.locker;
            bool   result;

            lock (obj)
            {
                ClientSessionInfo clientSessionInfo = ClientSessionCache.FromContext(context, false);
                if (clientSessionInfo == null)
                {
                    result = false;
                }
                else
                {
                    clientSessionInfo.GetContext(context);
                    clientSessionInfo.KeepAlive();
                    result = true;
                }
            }
            return(result);
        }