Imported Upstream version 5.12.0.220

Former-commit-id: c477e03582759447177c6d4bf412cd2355aad476
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-04-24 09:31:23 +00:00
parent 8bd104cef2
commit 8fc30896db
1200 changed files with 29534 additions and 26161 deletions

View File

@@ -9,7 +9,15 @@ using System.Text;
using System.Threading;
using System.Threading.Tasks;
#if MONO
using System;
using System.IO;
namespace System.IO.CoreFX
#else
namespace System.IO
#endif
{
// Note: This class has an OS Limitation where the inotify API can miss events if a directory is created and immediately has
// changes underneath. This is due to the inotify* APIs not being recursive and needing to call inotify_add_watch on

View File

@@ -14,7 +14,15 @@ using FSEventStreamEventId = System.UInt64;
using CFRunLoopRef = System.IntPtr;
using Microsoft.Win32.SafeHandles;
#if MONO
using System;
using System.IO;
namespace System.IO.CoreFX
#else
namespace System.IO
#endif
{
public partial class FileSystemWatcher
{

View File

@@ -1,8 +1,15 @@
// 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.
#if MONO
using System;
using System.IO;
namespace System.IO.CoreFX
#else
namespace System.IO
#endif
{
public partial class FileSystemWatcher
{

View File

@@ -7,7 +7,15 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Threading;
#if MONO
using System;
using System.IO;
namespace System.IO.CoreFX
#else
namespace System.IO
#endif
{
public partial class FileSystemWatcher
{

View File

@@ -8,7 +8,15 @@ using System.Diagnostics.CodeAnalysis;
using System.Threading;
using System.Threading.Tasks;
#if MONO
using System;
using System.IO;
namespace System.IO.CoreFX
#else
namespace System.IO
#endif
{
/// <devdoc>
/// Listens to the system directory change notifications and
@@ -599,9 +607,15 @@ namespace System.IO
}
// Return the results.
#if MONO
return tcs.Task.Status == TaskStatus.RanToCompletion ?
tcs.Task.Result :
WaitForChangedResult.TimedOutResult;
#else
return tcs.Task.IsCompletedSuccessfully ?
tcs.Task.Result :
WaitForChangedResult.TimedOutResult;
#endif
}
/// <devdoc>

View File

@@ -197,6 +197,7 @@ namespace System.IO.Tests
/// EndInit will begin EnableRaisingEvents if we previously set EnableRaisingEvents=true
/// </summary>
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void EndInit_ResumesPausedEnableRaisingEvents()
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))
@@ -215,6 +216,7 @@ namespace System.IO.Tests
[Theory]
[InlineData(true)]
[InlineData(false)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void EndInit_ResumesPausedEnableRaisingEvents(bool setBeforeBeginInit)
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))

View File

@@ -25,6 +25,7 @@ namespace System.IO.Tests
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void FileSystemWatcher_NewFileInfoAction_TriggersNothing()
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))
@@ -38,6 +39,7 @@ namespace System.IO.Tests
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void FileSystemWatcher_FileInfoGetter_TriggersNothing()
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))
@@ -180,6 +182,7 @@ namespace System.IO.Tests
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void FileSystemWatcher_EnableRaisingEvents()
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))
@@ -292,6 +295,7 @@ namespace System.IO.Tests
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void FileSystemWatcher_NotifyFilter()
{
FileSystemWatcher watcher = new FileSystemWatcher();
@@ -370,6 +374,7 @@ namespace System.IO.Tests
[Fact]
[PlatformSpecific(TestPlatforms.OSX | TestPlatforms.Windows)] // Casing matters on Linux
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void FileSystemWatcher_OnCreatedWithMismatchedCasingGivesExpectedFullPath()
{
using (var dir = new TempDirectory(GetTestFilePath()))
@@ -463,6 +468,7 @@ namespace System.IO.Tests
[Fact]
[PlatformSpecific(TestPlatforms.Windows)] // Unix FSW don't trigger on a file rename.
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void FileSystemWatcher_Windows_OnRenameGivesExpectedFullPath()
{
using (var dir = new TempDirectory(GetTestFilePath()))
@@ -589,6 +595,7 @@ namespace System.IO.Tests
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void FileSystemWatcher_StopCalledOnBackgroundThreadDoesNotDeadlock()
{
// Check the case where Stop or Dispose (they do the same thing) is called from
@@ -614,6 +621,7 @@ namespace System.IO.Tests
}
[Fact]
[SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Not working")]
public void FileSystemWatcher_WatchingAliasedFolderResolvesToRealPathWhenWatching()
{
using (var testDirectory = new TempDirectory(GetTestFilePath()))