コード例 #1
0
        public static void ClearPingResult(int webSiteId)
        {
            var query = TableManager.CreateDeleteQuery(NameDict.PING_RESULT, NameDict.WEB_SITE_ID, webSiteId.ToString());

            if (DataBaseConnector.ExecuteNonQuery(query))
            {
                TableManager.ClearCache(NameDict.PING_RESULT);
                var        dict = GetOrCreateCache();
                PingResult tmp;
                if (dict.ContainsKey(webSiteId))
                {
                    dict.TryRemove(webSiteId, out tmp);
                }
                GetOrAddPingResult(webSiteId);
            }
        }