Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make TraitCollection serializable in all supported TFMs #3963

Merged
merged 1 commit into from Aug 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/Microsoft.TestPlatform.ObjectModel/TraitCollection.cs
Expand Up @@ -11,9 +11,7 @@ namespace Microsoft.VisualStudio.TestPlatform.ObjectModel;
/// <summary>
/// Class that holds collection of traits
/// </summary>
#if NETFRAMEWORK // REVIEW ME: This could be enabled for netcore and netstandard
[Serializable]
#endif
public class TraitCollection : IEnumerable<Trait>
{
internal const string TraitPropertyId = "TestObject.Traits";
Expand All @@ -27,9 +25,7 @@ public class TraitCollection : IEnumerable<Trait>
#pragma warning restore 618
typeof(TestObject));

#if NETFRAMEWORK // REVIEW ME: This could be enabled for netcore and netstandard
[NonSerialized]
#endif
private readonly TestObject _testObject;

internal TraitCollection(TestObject testObject)
Expand Down