-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added functionality for configuring default naming options for differ…
…ent catalogs. Breaking change: Added NugetFeedPluginCatalogOptions and changed NugetFeedPluginCatalog to use the options class instead of NugetPluginCatalogOptions.
- Loading branch information
1 parent
c728a0f
commit 39a45a2
Showing
15 changed files
with
363 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Weikio.PluginFramework.Catalogs.NuGet/NugetFeedPluginCatalogOptions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using NuGet.Common; | ||
using Weikio.PluginFramework.Abstractions; | ||
using Weikio.PluginFramework.Catalogs.NuGet.PackageManagement; | ||
using Weikio.PluginFramework.TypeFinding; | ||
|
||
namespace Weikio.PluginFramework.Catalogs.NuGet | ||
{ | ||
public class NugetFeedPluginCatalogOptions | ||
{ | ||
/// <summary> | ||
/// Gets or sets the function which is used to create the logger for Nuget activities | ||
/// </summary> | ||
public Func <ILogger> LoggerFactory { get; set; } = Defaults.LoggerFactory; | ||
|
||
/// <summary> | ||
/// Gets or sets the <see cref="TypeFinderOptions"/>. | ||
/// </summary> | ||
public TypeFinderOptions TypeFinderOptions { get; set; } = new TypeFinderOptions(); | ||
|
||
/// <summary> | ||
/// Gets or sets how the plugin names and version should be defined. <seealso cref="PluginNameOptions"/>. | ||
/// </summary> | ||
public PluginNameOptions PluginNameOptions { get; set; } = Defaults.PluginNameOptions; | ||
|
||
public static class Defaults | ||
{ | ||
/// <summary> | ||
/// Gets or sets the default function which is used to create the logger for PluginLoadContextOptions | ||
/// </summary> | ||
public static Func<ILogger> LoggerFactory { get; set; } = () => new ConsoleLogger(); | ||
|
||
public static PluginNameOptions PluginNameOptions { get; set; } = new PluginNameOptions(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.