1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-30 05:15:59 +02:00

Removed 'internal' protection - it's all about [Friend] now

This commit is contained in:
Brian Fiete 2020-03-09 06:34:16 -07:00
parent 81af04a1ce
commit 14ac27c977
119 changed files with 1339 additions and 1388 deletions

View file

@ -5,11 +5,11 @@ using System.Collections.Generic;
namespace System.Diagnostics
{
internal delegate void UserCallBack(String data);
delegate void UserCallBack(String data);
class AsyncStreamReader
{
internal const int32 DefaultBufferSize = 1024; // Byte buffer size
private const int32 DefaultBufferSize = 1024; // Byte buffer size
private const int32 MinBufferSize = 128;
private Stream stream;
@ -41,12 +41,12 @@ namespace System.Diagnostics
// Cache the last position scanned in sb when searching for lines.
private int currentLinePos;
internal this(Process process, Stream stream, UserCallBack callback, Encoding encoding)
this(Process process, Stream stream, UserCallBack callback, Encoding encoding)
: this(process, stream, callback, encoding, DefaultBufferSize)
{
}
internal ~this()
~this()
{
for (var msg in messageQueue)
delete msg;
@ -57,7 +57,7 @@ namespace System.Diagnostics
// character encoding is set by encoding and the buffer size,
// in number of 16-bit characters, is set by bufferSize.
//
internal this(Process process, Stream stream, UserCallBack callback, Encoding encoding, int32 bufferSize)
this(Process process, Stream stream, UserCallBack callback, Encoding encoding, int32 bufferSize)
{
Debug.Assert(process != null && stream != null && encoding != null && callback != null, "Invalid arguments!");
Debug.Assert(stream.CanRead, "Stream must be readable!");
@ -116,7 +116,7 @@ namespace System.Diagnostics
}
// User calls BeginRead to start the asynchronous read
internal void BeginReadLine()
void BeginReadLine()
{
if (cancelOperation)
{
@ -134,7 +134,7 @@ namespace System.Diagnostics
}
}
internal void CancelOperation()
void CancelOperation()
{
cancelOperation = true;
}
@ -290,7 +290,7 @@ namespace System.Diagnostics
// Wait until we hit EOF. This is called from Process.WaitForExit
// We will lose some information if we don't do this.
internal void WaitUtilEOF()
void WaitUtilEOF()
{
if (eofEvent != null)
{

View file

@ -12,9 +12,9 @@ namespace System.Diagnostics
public class DataReceivedEventArgs : EventArgs
{
internal String _data;
String _data;
internal this(String data)
this(String data)
{
_data = data;
}

View file

@ -34,7 +34,7 @@ namespace System.Diagnostics
public static void AssertNotStack(Object obj)
{
#if BF_ENABLE_OBJECT_DEBUG_FLAGS
if ((obj != null) && (obj.GetFlags() & 8 != 0))
if ((obj != null) && (obj.[Friend]GetFlags() & 8 != 0))
Internal.FatalError("Assert failed", 1);
#endif
}

View file

@ -3,7 +3,7 @@ using System.Threading;
namespace System.Diagnostics
{
internal static class ProcessManager
static class ProcessManager
{
#if BF_PLATFORM_WINDOWS

View file

@ -14,10 +14,10 @@ namespace System.Diagnostics
//public Windows.Handle ErrorDialogParentHandle;
//public ProcessWindowStyle WindowStyle;
internal String mFileName = new String() ~ delete _;
internal String mArguments = new String() ~ delete _;
internal String mDirectory = new String() ~ delete _;
internal String mVerb = new String("Open") ~ delete _;
String mFileName = new String() ~ delete _;
String mArguments = new String() ~ delete _;
String mDirectory = new String() ~ delete _;
String mVerb = new String("Open") ~ delete _;
public Dictionary<String, String> mEnvironmentVariables ~ DeleteDictionaryAndKeysAndItems!(_);
@ -27,8 +27,8 @@ namespace System.Diagnostics
public bool RedirectStandardError { get { return mRedirectStandardError; } set { mRedirectStandardError = value; } };
public bool CreateNoWindow { get { return mCreateNoWindow; } set { mCreateNoWindow = value; } };
internal Encoding StandardOutputEncoding;
internal Encoding StandardErrorEncoding;
Encoding StandardOutputEncoding;
Encoding StandardErrorEncoding;
//public bool redirectStandardInput { get { return redirectStandardInput; } set { redirectStandardInput = value; } };
//public bool redirectStandardInput { get { return redirectStandardInput; } set { redirectStandardInput = value; } };

View file

@ -47,7 +47,7 @@ namespace System.Diagnostics
public Result<void> Start(ProcessStartInfo startInfo)
{
String fileName = startInfo.mFileName;
String fileName = startInfo.[Friend]mFileName;
Platform.BfpSpawnFlags spawnFlags = .None;
if (startInfo.ErrorDialog)
@ -55,8 +55,8 @@ namespace System.Diagnostics
if (startInfo.UseShellExecute)
{
spawnFlags |= .UseShellExecute;
if (!startInfo.mVerb.IsEmpty)
fileName = scope:: String(fileName, "|", startInfo.mVerb);
if (!startInfo.[Friend]mVerb.IsEmpty)
fileName = scope:: String(fileName, "|", startInfo.[Friend]mVerb);
}
if (startInfo.CreateNoWindow)
spawnFlags |= .NoWindow;
@ -75,7 +75,7 @@ namespace System.Diagnostics
Span<char8> envSpan = env;
Platform.BfpSpawnResult result = .Ok;
mSpawn = Platform.BfpSpawn_Create(fileName, startInfo.mArguments, startInfo.mDirectory, envSpan.Ptr, spawnFlags, &result);
mSpawn = Platform.BfpSpawn_Create(fileName, startInfo.[Friend]mArguments, startInfo.[Friend]mDirectory, envSpan.Ptr, spawnFlags, &result);
if ((mSpawn == null) || (result != .Ok))
return .Err;