Example #1
0
        public static void UnblockAllServices()
        {
            var services = MockDictionaryServices.GetServices();

            foreach (var service in services)
            {
                var item = MockDictionaryServices.GetIdServiceByPath(service.Value);
                DeleteData(item);
            }
        }
Example #2
0
        public static bool ServiceIsBlocked(string servicePath)
        {
            var cache   = RedisConnectorHelper.Connection.GetDatabase(1);
            var service = MockDictionaryServices.GetIdServiceByPath(servicePath);

            if (string.IsNullOrEmpty(service.Key))
            {
                return(false);
            }

            var returnValue = !cache.StringGet(service.Key).IsNull;

            return(returnValue);
        }
Example #3
0
        public static bool BlockService(string servicePath)
        {
            var service = MockDictionaryServices.GetIdServiceByPath(servicePath);

            return(SaveData(service));
        }