Skip to content
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

Add alternative Use extension method to MarkdownPipelineBuilder that receives an object instance #213

Merged

Conversation

augustoproiete
Copy link
Contributor

@augustoproiete augustoproiete commented Feb 21, 2018

This PR adds an overload of the MarkdownPipelineBuilder.Use<T> method that receives an instance of an IMarkdownExtension, for the cases where the extension has a constructor requiring parameters and cannot be instantiated by the existing Use<T> method.

Syntax looks like this:

var pipeline = new MarkdownPipelineBuilder()
	.Use(new MyAwesomeExtension("param1", "param2")) // <== here
	.UseAdvancedExtensions()
	.Build();

@xoofx
Copy link
Owner

xoofx commented Feb 23, 2018

Thanks!

@augustoproiete augustoproiete deleted the add-new-use-extension-with-instance branch February 23, 2018 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants