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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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. :)

/// <summary>
/// Creates an instance using the given ICompilerSettings
/// </summary>
/// <param name="compilerSettings"></param>
public CSharpCodeProvider(ICompilerSettings compilerSettings = null) {
_compilerSettings = compilerSettings == null ? CompilationSettingsHelper.CSC2 : compilerSettings;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System;

namespace Microsoft.CodeDom.Providers.DotNetCompilerPlatform {
internal interface ICompilerSettings {
string CompilerFullPath { get; }

// TTL in seconds
int CompilerServerTimeToLive { get; }
/// <summary>
/// Provides settings for the C# and VB CodeProviders
/// </summary>
public interface ICompilerSettings {

/// <summary>
/// The full path to csc.exe or vbc.exe
/// </summary>
string CompilerFullPath { get; }

/// <summary>
/// TTL in seconds
/// </summary>
int CompilerServerTimeToLive { get; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ public VBCodeProvider()
: this(null) {
}

// Constructor used for unit test purpose
internal VBCodeProvider(ICompilerSettings compilerSettings = null) {
/// <summary>
/// Creates an instance using the given ICompilerSettings
/// </summary>
/// <param name="compilerSettings"></param>
public VBCodeProvider(ICompilerSettings compilerSettings = null) {
_compilerSettings = compilerSettings == null ? CompilationSettingsHelper.VBC2 : compilerSettings;
}

Expand Down