Пример #1
0
        public void RecordRequest(string requestPath)
        {
            var existingEntry = Entries.FirstOrDefault(e => e.Path == requestPath);
            if (existingEntry != null) { existingEntry.Count++; return; }

            var newEntry = new RequestEntry()
            {
                Path = requestPath,
                Count = 1
            };
            Entries.Add(newEntry);
        }
Пример #2
0
        public void RecordRequest(string requestPath)
        {
            var existingEntry = Entries.FirstOrDefault(e => e.Path == requestPath);

            if (existingEntry != null)
            {
                existingEntry.Count++; return;
            }

            var newEntry = new RequestEntry()
            {
                Path  = requestPath,
                Count = 1
            };

            Entries.Add(newEntry);
        }