-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from christianhelle/fix-nswag-options
Fix DialogPage issue in OptionsFactory
- Loading branch information
Showing
8 changed files
with
117 additions
and
10 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
namespace ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Options | ||
using Microsoft.VisualStudio.Shell; | ||
|
||
namespace ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Options | ||
{ | ||
public interface IOptionsFactory | ||
{ | ||
TOptions Create<TOptions, TDialogPage>() | ||
where TOptions : class; | ||
TOptions Create<TOptions, TDialogPage>() | ||
where TOptions : class | ||
where TDialogPage : DialogPage; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,9 +1,12 @@ | ||
namespace ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Options | ||
using Microsoft.VisualStudio.Shell; | ||
|
||
namespace ChristianHelle.DeveloperTools.CodeGenerators.ApiClient.Options | ||
{ | ||
public class OptionsFactory : IOptionsFactory | ||
{ | ||
public TOptions Create<TOptions, TDialogPage>() | ||
where TOptions : class | ||
public TOptions Create<TOptions, TDialogPage>() | ||
where TOptions : class | ||
where TDialogPage : DialogPage | ||
=> VsPackage.Instance.GetDialogPage(typeof(TDialogPage)) as TOptions; | ||
} | ||
} |