dotnet / dotnet/wpf

Obsolete old APIs (in ref and impl assemblies)

Open
#10,737 0 comments 0 reactions 0 assignees View on GitHub
area-clipboard
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

#10544 exposes the new APIs but does not obsolete the GetData* APIs.

See WinForms obsoletions here https://github.com/dotnet/winforms/blob/89978450ea81fbaffb3e41ab3a2e131aba22e09f/src/System.Windows.Forms/System/Windows/Forms/OLE/Clipboard.cs#L135-L147 and here https://github.com/dotnet/winforms/blob/89978450ea81fbaffb3e41ab3a2e131aba22e09f/src/System.Windows.Forms/System/Windows/Forms/OLE/DataObject.cs#L108-L127.

``` C#
///
/// Retrieves data from the in the specified format.
///
///
/// The current thread is not in single-threaded apartment (STA) mode.
///
[Obsolete(
Obsoletions.ClipboardGetDataMessage,
error: false,
DiagnosticId = Obsoletions.ClipboardGetDataDiagnosticId,
UrlFormat = Obsoletions.SharedUrlFormat)]
public static object? GetData(string format) =>
string.IsNullOrWhiteSpace(format) ? null : GetData(format, autoConvert: false);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.