-
-
Notifications
You must be signed in to change notification settings - Fork 229
Open
Labels
.NETPull requests that update .net codePull requests that update .net codeRepository MaintenancevNextBinary/Source/Behavioral Breaking Changes scheduled for the next Major release.Binary/Source/Behavioral Breaking Changes scheduled for the next Major release.
Description
Description
This is a bit of a misuse of the ObsoleteAttribute:
sentry-dotnet/src/Sentry/SentryClientExtensions.cs
Lines 98 to 110 in 216bbc5
| /// <summary> | |
| /// <para> | |
| /// Gets internal SentryOptions for integrations like Hangfire that don't support strong assembly names. | |
| /// </para> | |
| ///<remarks> | |
| /// *** This is not meant for external use !!! *** | |
| /// </remarks>> | |
| /// </summary> | |
| /// <param name="clientOrHub"></param> | |
| /// <returns></returns> | |
| [Obsolete("WARNING: This method is meant for internal usage only")] | |
| public static SentryOptions? GetInternalSentryOptions(this ISentryClient clientOrHub) => | |
| clientOrHub.GetSentryOptions(); |
We could potentially replace it with this:
[InternalApi("For internal integrations like Hangfire only")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static SentryOptions? GetInternalSentryOptions(this ISentryClient clientOrHub) =>
clientOrHub.GetSentryOptions();And then also ship a Roslyn Analyzer that warns if people use something decorated with InternalApiAttribute.
See also
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
.NETPull requests that update .net codePull requests that update .net codeRepository MaintenancevNextBinary/Source/Behavioral Breaking Changes scheduled for the next Major release.Binary/Source/Behavioral Breaking Changes scheduled for the next Major release.
Projects
Status
No status