Skip to content

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

Open
@JeremyKuhne

Description

@JeremyKuhne

#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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-clipboardIssues related to DataObject and shared clipboard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions