loop8ack / ExtensionPackTools

Import and export lists of Visual Studio extensions.
Other
79 stars 15 forks source link

`Extension.FromExtension` overload that takes an `IExtension` should be removed #52

Closed astrohart closed 2 years ago

astrohart commented 2 years ago

In the Extension.cs file that lives in the Models folder of the ExtensionManager.Shared project, the overload of the Extension.FromExtension method that takes an IExtension as its sole parameter should be removed.

It's dead code and not referenced anywhere. It's not necessary to worry about whether this code may be used in the future because it will be preserved through Git history.

Specifically, I mean remove the following method:

public static Extension FromIExtension(IExtension entry)
{
    return new Extension
    {
        ID = entry.Header.Identifier,
        Name = entry.Header.Name,
        MoreInfoUrl = entry.Header.MoreInfoUrl?.ToString()
    };
}

Personally, I am always an advocate of removing all dead code.

astrohart commented 2 years ago

Fixed. See PR #51

astrohart commented 2 years ago

Also, the statement using Microsoft.VisualStudio.ExtensionManager; can be removed from the top of the Extension.cs file. Did so. See commit 0dc16adaf95c002d2cb6548649e97140190656bf