/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/Test/Core/Compilation/TestStrongNameFileSystem.cs
26 строк
1 KB
Jared Parsons
Rationalize how temporary directory works today (#68226)
04 авг 2023, 01:52
Не верифицирован
04 авг 2023, 01:52
bed4560
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.IO; namespace Microsoft.CodeAnalysis.Test.Utilities { internal sealed class TestStrongNameFileSystem : StrongNameFileSystem { internal Func<string, byte[]> ReadAllBytesFunc { get; set; } internal Func<string, FileMode, FileAccess, FileShare, FileStream> CreateFileStreamFunc { get; set; } internal TestStrongNameFileSystem(string? signingTempPath) : base(signingTempPath) { ReadAllBytesFunc = base.ReadAllBytes; CreateFileStreamFunc = base.CreateFileStream; } internal override byte[] ReadAllBytes(string fullPath) => ReadAllBytesFunc(fullPath); internal override FileStream CreateFileStream(string filePath, FileMode fileMode, FileAccess fileAccess, FileShare fileShare) => CreateFileStreamFunc(filePath, fileMode, fileAccess, fileShare); } }