Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@@ -68,8 +68,9 @@ namespace MonoTests.System.IO.IsolatedStorageTest {
public void Constructor_StringMode ()
{
string test = "string-filemode";
IsolatedStorageFileStream isfs = new IsolatedStorageFileStream (test, FileMode.Create);
CheckCommonDetails (test, isfs, true, true);
using (var isfs = new IsolatedStorageFileStream (test, FileMode.Create)) {
CheckCommonDetails (test, isfs, true, true);
}
}
[Test]
@@ -83,8 +84,9 @@ namespace MonoTests.System.IO.IsolatedStorageTest {
public void Constructor_StringModeAccess ()
{
string test = "string-filemode-fileaccess";
IsolatedStorageFileStream isfs = new IsolatedStorageFileStream (test, FileMode.Create, FileAccess.ReadWrite);
CheckCommonDetails (test, isfs, true, true);
using (var isfs = new IsolatedStorageFileStream (test, FileMode.Create, FileAccess.ReadWrite)) {
CheckCommonDetails (test, isfs, true, true);
}
}
[Test]
@@ -98,22 +100,24 @@ namespace MonoTests.System.IO.IsolatedStorageTest {
public void Constructor_StringModeAccessShare ()
{
string test = "string-filemode-fileaccess-fileshare";
IsolatedStorageFileStream isfs = new IsolatedStorageFileStream (test, FileMode.Create, FileAccess.Write, FileShare.Read);
CheckCommonDetails (test, isfs, false, true);
using (var isfs = new IsolatedStorageFileStream (test, FileMode.Create, FileAccess.Write, FileShare.Read)) {
CheckCommonDetails (test, isfs, false, true);
}
}
[Test]
[ExpectedException (typeof (IsolatedStorageException))]
public void Handle ()
{
IsolatedStorageFileStream isfs = new IsolatedStorageFileStream ("handle", FileMode.Create);
IntPtr p = isfs.Handle;
using (var isfs = new IsolatedStorageFileStream ("handle", FileMode.Create)) {
IntPtr p = isfs.Handle;
}
}
[Test]
public void RootPath ()
{
new IsolatedStorageFileStream ("/rootpath", FileMode.Create);
new IsolatedStorageFileStream ("/rootpath", FileMode.Create).Close ();
}
[Test]