Example #1
0
        public static bool Active <T>(int?id)
        {
            var state = StateManager.GetState(SessionProvider.SessionId);

            if (state == null)
            {
                return(false);
            }

            var primaryKey = StateManager.GetCorrelationId(SessionProvider.SessionId, "key");

            if (primaryKey == null)
            {
                return(false);
            }

            return(state.Path == typeof(T).Name && (int)primaryKey == id);
        }
Example #2
0
 public static object GetCorrelationId <T>(string name)
 {
     return(OnPath <T>() ? StateManager.GetCorrelationId(SessionProvider.SessionId, name) : null);
 }
Example #3
0
 public static object GetCorrelationId(string name)
 {
     return(StateManager.GetCorrelationId(SessionProvider.SessionId, name));
 }