Skip to content

Commit fbd1ca3

Browse files
trullockJinhuafei
authored andcommitted
made ICompilerSettings and CSharpCodeProvider ctor public (#55)
* made ICompilerSettings interface public and the constructor on CSharpCodeProvider also public * Made VBCodeProvider's internal ctor public, added comments to ICompilerSettings
1 parent 1f4a542 commit fbd1ca3

3 files changed

Lines changed: 25 additions & 10 deletions

File tree

src/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/CSharpCodeProvider.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ public CSharpCodeProvider()
1818
: this(null) {
1919
}
2020

21-
// Constructor used for unit test purpose
22-
internal CSharpCodeProvider(ICompilerSettings compilerSettings = null) {
21+
22+
/// <summary>
23+
/// Creates an instance using the given ICompilerSettings
24+
/// </summary>
25+
/// <param name="compilerSettings"></param>
26+
public CSharpCodeProvider(ICompilerSettings compilerSettings = null) {
2327
_compilerSettings = compilerSettings == null ? CompilationSettingsHelper.CSC2 : compilerSettings;
2428
}
2529

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
// Copyright (c) .NET Foundation. All rights reserved.
22
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
33

4-
using System;
5-
64
namespace Microsoft.CodeDom.Providers.DotNetCompilerPlatform {
7-
internal interface ICompilerSettings {
8-
string CompilerFullPath { get; }
95

10-
// TTL in seconds
11-
int CompilerServerTimeToLive { get; }
6+
/// <summary>
7+
/// Provides settings for the C# and VB CodeProviders
8+
/// </summary>
9+
public interface ICompilerSettings {
10+
11+
/// <summary>
12+
/// The full path to csc.exe or vbc.exe
13+
/// </summary>
14+
string CompilerFullPath { get; }
15+
16+
/// <summary>
17+
/// TTL in seconds
18+
/// </summary>
19+
int CompilerServerTimeToLive { get; }
1220
}
1321
}

src/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/VBCodeProvider.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ public VBCodeProvider()
1818
: this(null) {
1919
}
2020

21-
// Constructor used for unit test purpose
22-
internal VBCodeProvider(ICompilerSettings compilerSettings = null) {
21+
/// <summary>
22+
/// Creates an instance using the given ICompilerSettings
23+
/// </summary>
24+
/// <param name="compilerSettings"></param>
25+
public VBCodeProvider(ICompilerSettings compilerSettings = null) {
2326
_compilerSettings = compilerSettings == null ? CompilationSettingsHelper.VBC2 : compilerSettings;
2427
}
2528

0 commit comments

Comments
 (0)