/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/VisualStudio/IntegrationTest/Harness/XUnitShared/Threading/IdeSkippedDataRowTestCase.cs
66 строк
2 KB
David Barbet
Shorten file paths to prevent long path issues opening the slnx
10 дек 2025, 22:44
10 дек 2025, 22:44
7830fcf
Код
Авторство
О чём код?
// 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. namespace Xunit.Threading { using System; using System.ComponentModel; using Xunit.Abstractions; using Xunit.Harness; using Xunit.Sdk; public sealed class IdeSkippedDataRowTestCase : XunitSkippedDataRowTestCase { [EditorBrowsable(EditorBrowsableState.Never)] [Obsolete("Called by the deserializer; should only be called by deriving classes for deserialization purposes", error: true)] public IdeSkippedDataRowTestCase() { } public IdeSkippedDataRowTestCase(IMessageSink diagnosticMessageSink, TestMethodDisplay defaultMethodDisplay, TestMethodDisplayOptions defaultMethodDisplayOptions, ITestMethod testMethod, VisualStudioInstanceKey visualStudioInstanceKey, string skipReason, object?[]? testMethodArguments = null) : base(diagnosticMessageSink, defaultMethodDisplay, defaultMethodDisplayOptions, testMethod, skipReason, testMethodArguments) { VisualStudioInstanceKey = visualStudioInstanceKey; } public VisualStudioInstanceKey VisualStudioInstanceKey { get; private set; } protected override string GetDisplayName(IAttributeInfo factAttribute, string displayName) { var baseName = base.GetDisplayName(factAttribute, displayName); return $"{baseName} ({VisualStudioInstanceKey.Version})"; } protected override string GetUniqueID() { return $"{base.GetUniqueID()}_{VisualStudioInstanceKey.Version}"; } public override void Serialize(IXunitSerializationInfo data) { if (data is null) { throw new ArgumentNullException(nameof(data)); } base.Serialize(data); data.AddValue(nameof(VisualStudioInstanceKey), VisualStudioInstanceKey.SerializeToString()); } public override void Deserialize(IXunitSerializationInfo data) { if (data is null) { throw new ArgumentNullException(nameof(data)); } VisualStudioInstanceKey = VisualStudioInstanceKey.DeserializeFromString(data.GetValue<string>(nameof(VisualStudioInstanceKey))); base.Deserialize(data); } } }