UnityGame/Library/PackageCache/com.unity.test-framework/UnityEditor.TestRunner/UnityTestProtocol/TesRunDataHolder.cs
2024-10-27 10:53:47 +03:00

31 lines
851 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace UnityEditor.TestRunner.UnityTestProtocol
{
[Obsolete("No longer in use")]
public interface ITestRunDataHolder
{
IList<TestRunData> TestRunDataList { get; }
}
[Obsolete("No longer in use")]
public class TestRunDataHolder: ScriptableSingleton<TestRunDataHolder>, ISerializationCallbackReceiver, ITestRunDataHolder
{
[SerializeField]
private TestRunData[] TestRunData;
public IList<TestRunData> TestRunDataList { get; private set; } = new List<TestRunData>();
public void OnBeforeSerialize()
{
TestRunData = TestRunDataList.ToArray();
}
public void OnAfterDeserialize()
{
TestRunDataList = TestRunData.ToList();
}
}
}