/
githubmirror
/
aspnetcore
Обзор
Документация
Войти
/
githubmirror
/
aspnetcore
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Components/WebAssembly/testassets/HostedInAspNet.Server/BootResourceRequestLog.cs
26 строк
723 B
Marek Fišera
[Blazor] Prepare for custom cache removal (#61666)
08 май 2025, 18:58
Не верифицирован
08 май 2025, 18:58
a42059b
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Concurrent; namespace HostedInAspNet.Server; public class BootResourceRequestLog { private readonly ConcurrentBag<string> _requestPaths = new ConcurrentBag<string>(); public IReadOnlyCollection<string> RequestPathsWithNewContent => _requestPaths; public void AddRequest(string originalRequestPath, HttpResponse response) { if (response.StatusCode != StatusCodes.Status304NotModified) { _requestPaths.Add(originalRequestPath); } } public void Clear() { _requestPaths.Clear(); } }