public static void UnblockAllServices() { var services = MockDictionaryServices.GetServices(); foreach (var service in services) { var item = MockDictionaryServices.GetIdServiceByPath(service.Value); DeleteData(item); } }
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); }
public static bool BlockService(string servicePath) { var service = MockDictionaryServices.GetIdServiceByPath(servicePath); return(SaveData(service)); }