Skip to content

Add ObsoleteAttribute and EditorBrowsable(Never) to DynamicDependency.Condition #107104

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ public DynamicDependencyAttribute(DynamicallyAccessedMemberTypes memberTypes, st
public string? AssemblyName { get; }

/// <summary>
/// Gets or sets the condition in which the dependency is applicable, e.g. "DEBUG".
/// Gets or sets the condition in which the dependency is applicable.
/// </summary>
[System.Obsolete("This property is no longer supported.")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public string? Condition { get; set; }
}
}
2 changes: 2 additions & 0 deletions src/libraries/System.Runtime/ref/System.Runtime.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8856,6 +8856,8 @@ public DynamicDependencyAttribute(string memberSignature) { }
public DynamicDependencyAttribute(string memberSignature, string typeName, string assemblyName) { }
public DynamicDependencyAttribute(string memberSignature, System.Type type) { }
public string? AssemblyName { get { throw null; } }
[System.Obsolete("This property is no longer supported.")]
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
public string? Condition { get { throw null; } set { } }
public string? MemberSignature { get { throw null; } }
public System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes MemberTypes { get { throw null; } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

using Xunit;

#pragma warning disable CS0618

namespace System.Diagnostics.CodeAnalysis.Tests
{
public class DynamicDependencyAttributeTests
Expand Down Expand Up @@ -101,3 +103,4 @@ public void TestCondition()
}
}
}
#pragma warning restore CS0618