Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Obsolete old APIs (in ref and impl assemblies) #10737

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
JeremyKuhne opened this issue Apr 8, 2025 · 0 comments
Open

Obsolete old APIs (in ref and impl assemblies) #10737

JeremyKuhne opened this issue Apr 8, 2025 · 0 comments
Labels
area-clipboard Issues related to DataObject and shared clipboard

Comments

@JeremyKuhne
Copy link
Member

JeremyKuhne commented Apr 8, 2025

#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.

    /// <summary>
    ///  Retrieves data from the <see cref="Clipboard"/> in the specified format.
    /// </summary>
    /// <exception cref="ThreadStateException">
    ///  The current thread is not in single-threaded apartment (STA) mode.
    /// </exception>
    [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);
@harshit7962 harshit7962 added the area-clipboard Issues related to DataObject and shared clipboard label Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-clipboard Issues related to DataObject and shared clipboard
Projects
None yet
Development

No branches or pull requests

2 participants