Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть Stop StreamContent class from calling Dispose on your Stream (e.g., leaveOpen: true)

  • David Anderson
  • 2023-07-29
  • 784
Stop StreamContent class from calling Dispose on your Stream (e.g., leaveOpen: true)
c#csharp.netdotnet
  • ok logo

Скачать Stop StreamContent class from calling Dispose on your Stream (e.g., leaveOpen: true) бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Stop StreamContent class from calling Dispose on your Stream (e.g., leaveOpen: true) или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку Stop StreamContent class from calling Dispose on your Stream (e.g., leaveOpen: true) бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео Stop StreamContent class from calling Dispose on your Stream (e.g., leaveOpen: true)

StreamContent will dispose the underlying stream and there isn't a leave open option to avoid it. I found out that this is by design. In my scenario I need the stream to remain open after using StreamContent with HttpClient and HttpRequestMessage.

It appears the Microsoft .NET Framework team fixed this in .NET Core 2.0 and later so that System.Net.Http.StreamContent does not dispose the underlying stream anymore, but it was not backported to .NET Framework 4.8 or earlier due to some scheduling problem or complexity.

In this problem walkthrough, I explain some scenarios of why this can be a problem and why creating additional temporary streams like MemoryStream or FileStream may not be a desirable solution. I workaround the problem by implementing a DelegateStream that prevents Dispose from being called on the underlying stream.

This is using the C# (CSharp) programming language and Microsoft .NET Framework 4.8.1.

• Source Code: https://github.com/DeadX07/DX7Dev/tre...
• StreamContent Docs: https://learn.microsoft.com/en-us/dot...)
• Feature Request to add a leaveOpen parameter to the StreamContent(Stream) constructor: https://github.com/dotnet/runtime/iss...
• The fix the .NET team made: https://github.com/dotnet/corefx/pull...

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]