Skip to content

Commit 618b497

Browse files
committed
Move some apis to be internal
1 parent e8cc918 commit 618b497

File tree

7 files changed

+22
-11
lines changed

7 files changed

+22
-11
lines changed

PSReadLine/ConsoleKeyChordConverter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Globalization;
88
using System.Linq;
99
using System.Runtime.InteropServices;
10+
using Microsoft.PowerShell.Internal;
1011

1112
namespace Microsoft.PowerShell
1213
{

PSReadLine/ConsoleLib.cs

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
using System.Globalization;
99
using System.Runtime.InteropServices;
1010
using System.Text;
11-
using Microsoft.PowerShell.Internal;
1211
using Microsoft.Win32.SafeHandles;
1312

14-
namespace Microsoft.PowerShell
13+
namespace Microsoft.PowerShell.Internal
1514
{
16-
public static class NativeMethods
15+
#pragma warning disable 1591
16+
17+
internal static class NativeMethods
1718
{
1819
public const uint MAPVK_VK_TO_VSC = 0x00;
1920
public const uint MAPVK_VSC_TO_VK = 0x01;
@@ -233,7 +234,7 @@ public override string ToString()
233234
}
234235
}
235236

236-
public struct COORD
237+
internal struct COORD
237238
{
238239
public short X;
239240
public short Y;
@@ -261,7 +262,7 @@ internal struct FONTSIGNATURE
261262
}
262263

263264
[StructLayout(LayoutKind.Sequential)]
264-
public struct CHARSETINFO
265+
internal struct CHARSETINFO
265266
{
266267
//From public\sdk\inc\wingdi.h
267268
internal uint ciCharset; // Character set value.
@@ -270,7 +271,7 @@ public struct CHARSETINFO
270271
}
271272

272273
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
273-
public struct TEXTMETRIC
274+
internal struct TEXTMETRIC
274275
{
275276
//From public\sdk\inc\wingdi.h
276277
public int tmHeight;
@@ -838,4 +839,6 @@ public void EndRender()
838839
}
839840
}
840841
}
842+
843+
#pragma warning restore 1591
841844
}

PSReadLine/Keys.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Microsoft.PowerShell
88
{
9-
public static class Keys
9+
internal static class Keys
1010
{
1111
public static ConsoleKeyInfo A = new ConsoleKeyInfo('a', ConsoleKey.A, false, false, false);
1212
public static ConsoleKeyInfo B = new ConsoleKeyInfo('b', ConsoleKey.B, false, false, false);

PSReadLine/Options.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Management.Automation;
99
using System.Reflection;
1010
using System.Threading;
11+
using Microsoft.PowerShell.Internal;
1112

1213
namespace Microsoft.PowerShell
1314
{

PSReadLine/PublicAPI.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
using System.Management.Automation.Language;
1010
using System.Management.Automation.Runspaces;
1111

12+
1213
namespace Microsoft.PowerShell
1314
{
1415
namespace Internal
1516
{
16-
/// <summary/>
17+
#pragma warning disable 1591
18+
1719
[SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
1820
public interface IPSConsoleReadLineMockableMethods
1921
{
20-
/// <summary/>
2122
void Ding();
22-
/// <summary/>
2323
CommandCompletion CompleteInput(string input, int cursorIndex, Hashtable options, System.Management.Automation.PowerShell powershell);
24-
/// <summary/>
2524
bool RunspaceIsRemote(Runspace runspace);
2625

2726
}
2827

28+
[SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
2929
public interface IConsole
3030
{
3131
uint GetConsoleInputMode();
@@ -55,6 +55,8 @@ public interface IConsole
5555
int LengthInBufferCells(char c);
5656
void EndRender();
5757
}
58+
59+
#pragma warning restore 1591
5860
}
5961

6062
/// <summary/>

PSReadLine/ScreenCapture.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using System.Runtime.InteropServices;
88
using System.Text;
99
using System.Windows.Forms;
10+
using Microsoft.PowerShell.Internal;
1011

1112
namespace Microsoft.PowerShell
1213
{

UnitTestPSReadLine/UnitTestPSReadLine.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
</Otherwise>
5656
</Choose>
5757
<ItemGroup>
58+
<Compile Include="..\PSReadLine\Keys.cs">
59+
<Link>Keys.cs</Link>
60+
</Compile>
5861
<Compile Include="AssemblyInfo.cs" />
5962
<Compile Include="BasicEditingTest.VI.cs" />
6063
<Compile Include="CompletionTest.cs" />

0 commit comments

Comments
 (0)