Skip to content

made ICompilerSettings and CSharpCodeProvider ctor public #55

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

Merged
merged 2 commits into from
Jul 13, 2018
Merged

made ICompilerSettings and CSharpCodeProvider ctor public #55

merged 2 commits into from
Jul 13, 2018

Conversation

trullock
Copy link
Contributor

@trullock trullock commented Jul 3, 2018

Its unclear why CompilationSettings doesn't allow falling back to the tooling installed on the dev environment, or to use a csc compiler from a different location that whats shipped with this assembly.

By making the ICompilerSettings interface public this becomes trivial.

I don't see any reason for this to be internal

@msftclas
Copy link

msftclas commented Jul 3, 2018

CLA assistant check
All CLA requirements met.

@Jinhuafei
Copy link
Contributor

@trullock The original goal for this package is to enable asp.net to leverage Roslyn compilers for dynamical compilation. In that context, it doesn't make sense to expose the non-default-constructor, since asp.net only uses default constructor.
Now I saw more and more developers using this package in non-web apps, it makes sense to expose that constructor.

@@ -4,7 +4,7 @@
using System;

namespace Microsoft.CodeDom.Providers.DotNetCompilerPlatform {
internal interface ICompilerSettings {
public interface ICompilerSettings {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add some comments?

@@ -18,8 +18,12 @@ public CSharpCodeProvider()
: this(null) {
}

// Constructor used for unit test purpose
internal CSharpCodeProvider(ICompilerSettings compilerSettings = null) {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also update VBCodeProvider?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. :)

@Jinhuafei Jinhuafei requested a review from HongGit July 9, 2018 19:05
@Jinhuafei Jinhuafei self-assigned this Jul 9, 2018
@Jinhuafei Jinhuafei merged commit fbd1ca3 into aspnet:master Jul 13, 2018
@trullock
Copy link
Contributor Author

Excellent. Can we get a 2.0.1 nuget of this soon?

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.

3 participants