Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9ce9eaa
Use System.IO.Pipes from CoreFX.
filipnavara Jul 14, 2018
33a0cb1
Path.IsPathRooted should not throw on invalid characters.
filipnavara Jul 15, 2018
fe362ce
Adjust test list.
filipnavara Jul 15, 2018
4f04909
Fix couple more of profiles.
filipnavara Jul 15, 2018
befa288
Add two Span overloads for Socket to fix compilation of PipeStream.Un…
filipnavara Jul 15, 2018
b85afb1
Update basic and build profiles.
filipnavara Jul 16, 2018
4744ed4
Disable Unix specific test.
filipnavara Jul 16, 2018
7048c7a
Revert Path.IsPathRooted to the NetFX behavior (which is different fr…
filipnavara Jul 16, 2018
6685bab
Fix test conditions on Linux.
filipnavara Jul 16, 2018
53f4715
Fix unreal profile.
filipnavara Jul 16, 2018
26083da
Add missing methods from System.IO.Pipes.
filipnavara Jul 17, 2018
2cf40dd
Reworked approach for the PipeSecurity constructor overloads.
filipnavara Jul 17, 2018
f3726e2
Remove non-existant files from .sources.
filipnavara Jul 17, 2018
071d739
[csproj] Update project files
monojenkins Jul 17, 2018
a8e2b40
Fix Windows build.
filipnavara Jul 17, 2018
607811d
Remove TransmissionMode setter.
filipnavara Jul 17, 2018
2fa4e8c
Bump corefx and remove duplicate code.
filipnavara Jul 18, 2018
a848456
Fix whitespace.
filipnavara Jul 18, 2018
0538c2e
Code style fixes.
filipnavara Jul 19, 2018
354db46
Remove unnecessary attribute.
filipnavara Jul 19, 2018
8fd1900
Add pipes_pns.sources and reference it from other .sources.
filipnavara Jul 19, 2018
46871e9
Revert unintentional change.
filipnavara Jul 19, 2018
03be151
Bump corefx and use UnixDomainSocketEndPoint from there.
filipnavara Jul 19, 2018
dca1fd3
Merge remote-tracking branch 'upstream/master' into corefx-pipes
monojenkins Jul 23, 2018
40001d4
Bump API snapshot submodule
monojenkins Jul 23, 2018
b9ea8b2
[csproj] Update project files
monojenkins Jul 23, 2018
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
11 changes: 9 additions & 2 deletions mcs/class/System.Core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ endif
REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,PFX_LEGACY_3_5,FEATURE_NETCORE
LIB_REFS = System
LIB_MCS_FLAGS = $(REFERENCE_SOURCES_FLAGS) -d:INSIDE_SYSCORE -d:LIBC -unsafe -nowarn:436
TXT_RESOURCE_STRINGS = ../referencesource/System.Core/System.Core.txt
TXT_RESOURCE_STRINGS =
RESX_RESOURCE_STRING = \
../../../external/corefx/src/System.Linq.Expressions/src/Resources/Strings.resx \
../../../external/corefx/src/System.Linq/src/Resources/Strings.resx \
../../../external/corefx/src/System.Linq.Parallel/src/Resources/Strings.resx \
../../../external/corefx/src/System.Linq.Queryable/src/Resources/Strings.resx
../../../external/corefx/src/System.Linq.Queryable/src/Resources/Strings.resx \
../../../external/corefx/src/System.IO.Pipes/src/Resources/Strings.resx \
../../../external/corefx/src/System.Net.Sockets/src/Resources/Strings.resx \
../../../external/corefx/src/System.Security.Cryptography.Algorithms/src/Resources/Strings.resx \
../../../external/corefx/src/System.Security.Cryptography.Cng/src/Resources/Strings.resx \
../../../external/corefx/src/System.Threading/src/Resources/Strings.resx \
../../../external/corefx/src/System.Collections/src/Resources/Strings.resx \
../../../external/corefx/src/System.IO.MemoryMappedFiles/src/Resources/Strings.resx

LIBRARY_WARN_AS_ERROR = yes

Expand Down
253 changes: 0 additions & 253 deletions mcs/class/System.Core/ReferenceSources/SR.cs

This file was deleted.

351 changes: 333 additions & 18 deletions mcs/class/System.Core/System.Core.csproj

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions mcs/class/System.Core/System.Core_xtest.dll.sources
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,24 @@
../../../external/corefx/src/System.Collections.Immutable/src/System/Collections/Immutable/*.cs
../../../external/corefx/src/System.Collections.Immutable/src/Validation/*.cs
corefx/SR.tests.cs

# System.IO.Pipes
#../../../external/corefx/src/System.IO.Pipes/tests/Interop.Unix.cs
../../../external/corefx/src/System.IO.Pipes/tests/PipeTest.cs
../../../external/corefx/src/System.IO.Pipes/tests/PipeTest.Read.cs
../../../external/corefx/src/System.IO.Pipes/tests/PipeTest.Write.cs
../../../external/corefx/src/System.IO.Pipes/tests/PipeTestBase.cs
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CreateClient.cs
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.CreateServer.cs
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Read.cs
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Specific.cs
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTest.Write.cs
../../../external/corefx/src/System.IO.Pipes/tests/AnonymousPipeTests/AnonymousPipeTestBase.cs
#../../../external/corefx/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.CreateClient.cs
#../../../external/corefx/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Read.cs
#../../../external/corefx/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Specific.cs
#../../../external/corefx/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Write.cs
#../../../external/corefx/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.Simple.cs
#../../../external/corefx/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.UnixDomainSockets.cs
../../../external/corefx/src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTestBase.cs

102 changes: 0 additions & 102 deletions mcs/class/System.Core/System.IO.Pipes/AnonymousPipeClientStream.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using Microsoft.Win32.SafeHandles;
using System.Diagnostics;
using System.Security;

namespace System.IO.Pipes
{
/// <summary>
/// Anonymous pipe server stream
/// </summary>
public sealed partial class AnonymousPipeServerStream : PipeStream
{
public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
: base (PipeDirection.In, 0)
{
throw new PlatformNotSupportedException();
}

// Creates the anonymous pipe.
private unsafe void Create (PipeDirection direction, HandleInheritability inheritability, int bufferSize)
{
throw new PlatformNotSupportedException();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace System.IO.Pipes
{
public sealed partial class AnonymousPipeServerStream
{
public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)
: this (direction, inheritability, bufferSize)
{
if (pipeSecurity != null) {
throw new PlatformNotSupportedException ();
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Microsoft.Win32.SafeHandles;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace System.IO.Pipes
{
public sealed partial class AnonymousPipeServerStream
{
public AnonymousPipeServerStream (PipeDirection direction, HandleInheritability inheritability, int bufferSize, PipeSecurity pipeSecurity)

Choose a reason for hiding this comment

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

I am not sure about the practices on Moni repo but this file should be exactly like the one in CoreFx except for this constructor, correct? If yes, perhaps it is better to have the constructors that don't exist in CoreFx on separate files so whenever new changes are picked up from CoreFx these constructors are not involved in the diff. Same for the other locations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These files don't mirror CoreFX (except for the Create methods that I am about to remove once/if dotnet/corefx#31118 is merged). The CoreFX files are linked directly by path (../../../external/corefx/src/[something]). The file names are TBD, not sure about the conventions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Specifically, the CoreFX files are referenced directly from various .sources files (and .csproj is generated from that). The .cs files that are left in the Mono repository fill in the missing pieces, in this case the constructors with the PipeStream parameter. Ideally these files should be as small as possible, which is not the case here just yet. It will probably take couple more iterations to get there (PRs on CoreFX upstream, PRs/cherry-picks to Mono's CoreFX forked repository and this PR).

Choose a reason for hiding this comment

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

Thanks for the explanation. I will keep an eye on this PR so I get more familiar with Mono.

: base (direction, bufferSize)
{
if (direction == PipeDirection.InOut) {
throw new NotSupportedException(SR.NotSupported_AnonymousPipeUnidirectional);
}
if (inheritability < HandleInheritability.None || inheritability > HandleInheritability.Inheritable) {
throw new ArgumentOutOfRangeException(nameof(inheritability), SR.ArgumentOutOfRange_HandleInheritabilityNoneOrInheritable);
}

Create(direction, inheritability, bufferSize, pipeSecurity);
}
}
}
154 changes: 0 additions & 154 deletions mcs/class/System.Core/System.IO.Pipes/AnonymousPipeServerStream.cs

This file was deleted.

Loading