You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
parent
e49d6f06c0
commit
536cd135cc
@@ -30,10 +30,10 @@ Global
|
||||
{BF4F9507-8FBD-45EA-81C9-3ED89C052C91}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{BF4F9507-8FBD-45EA-81C9-3ED89C052C91}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{BF4F9507-8FBD-45EA-81C9-3ED89C052C91}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{FAF5D1E4-BA43-4663-8429-C069066D75CB}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{FAF5D1E4-BA43-4663-8429-C069066D75CB}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{FAF5D1E4-BA43-4663-8429-C069066D75CB}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
{FAF5D1E4-BA43-4663-8429-C069066D75CB}.Release|Any CPU.Build.0 = netcoreapp-Release|Any CPU
|
||||
{FAF5D1E4-BA43-4663-8429-C069066D75CB}.Debug|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{FAF5D1E4-BA43-4663-8429-C069066D75CB}.Debug|Any CPU.Build.0 = netcoreapp-Windows_NT-Debug|Any CPU
|
||||
{FAF5D1E4-BA43-4663-8429-C069066D75CB}.Release|Any CPU.ActiveCfg = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{FAF5D1E4-BA43-4663-8429-C069066D75CB}.Release|Any CPU.Build.0 = netcoreapp-Windows_NT-Release|Any CPU
|
||||
{750200D5-661A-42AA-9E1F-2A151F5AEE74}.Debug|Any CPU.ActiveCfg = netcoreapp-Debug|Any CPU
|
||||
{750200D5-661A-42AA-9E1F-2A151F5AEE74}.Debug|Any CPU.Build.0 = netcoreapp-Debug|Any CPU
|
||||
{750200D5-661A-42AA-9E1F-2A151F5AEE74}.Release|Any CPU.ActiveCfg = netcoreapp-Release|Any CPU
|
||||
|
@@ -2,7 +2,8 @@
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\dir.props" />
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>4.1.0.0</AssemblyVersion>
|
||||
<AssemblyVersion>4.1.1.0</AssemblyVersion>
|
||||
<AssemblyKey>MSFT</AssemblyKey>
|
||||
<IsNETCoreApp>true</IsNETCoreApp>
|
||||
<IsUAP>true</IsUAP>
|
||||
</PropertyGroup>
|
||||
|
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BuildConfigurations>
|
||||
<BuildConfigurations>
|
||||
netcoreapp-Windows_NT;
|
||||
netcoreapp-Unix;
|
||||
uap-Windows_NT;
|
||||
netcoreapp;
|
||||
</BuildConfigurations>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -139,4 +139,7 @@
|
||||
<data name="IsolatedStorage_Scope_U_R_M" xml:space="preserve">
|
||||
<value>Invalid scope, expected User, User|Roaming or Machine.</value>
|
||||
</data>
|
||||
</root>
|
||||
<data name="PlatformNotSupported_CAS" xml:space="preserve">
|
||||
<value>Code Access Security is not supported on this platform.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
@@ -6,8 +6,10 @@
|
||||
<ProjectGuid>{FAF5D1E4-BA43-4663-8429-C069066D75CB}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<!-- Default configurations to help VS understand the options -->
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Release|AnyCPU'" />
|
||||
<ItemGroup>
|
||||
@@ -24,34 +26,37 @@
|
||||
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageException.Serialization.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'uap'">
|
||||
<Compile Include="System\IO\IsolatedStorage\Helper.Win32.Unix.cs" />
|
||||
<Compile Include="System\IO\IsolatedStorage\Helper.Win32Unix.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'uap' AND '$(TargetsWindows)' == 'true'">
|
||||
<Compile Include="System\IO\IsolatedStorage\Helper.Win32.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'uap' AND '$(TargetsUnix)' == 'true'">
|
||||
<Compile Include="System\IO\IsolatedStorage\Helper.Unix.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'uap'">
|
||||
<Compile Include="System\IO\IsolatedStorage\Helper.WinRT.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="System.IO.IsolatedStorage.builds" />
|
||||
<Reference Include="System.Diagnostics.Debug" />
|
||||
<Reference Include="System.Diagnostics.Tools" />
|
||||
<Reference Include="System.IO.FileSystem" />
|
||||
<Reference Include="System.IO.FileSystem.AccessControl" />
|
||||
<Reference Include="System.Linq" />
|
||||
<Reference Include="System.Resources.ResourceManager" />
|
||||
<Reference Include="System.Runtime" />
|
||||
<Reference Include="System.Runtime.Extensions" />
|
||||
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
|
||||
<Reference Include="System.Security.AccessControl" />
|
||||
<Reference Include="System.Security.Cryptography.Algorithms" />
|
||||
<Reference Include="System.Security.Cryptography.Primitives" />
|
||||
<Reference Include="System.Security.Principal.Windows" />
|
||||
<Reference Include="System.Threading" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetsWindows)' == 'true' AND '$(TargetGroup)' != 'uap'">
|
||||
<Reference Include="System.IO.FileSystem.AccessControl" />
|
||||
<Reference Include="System.Security.AccessControl" />
|
||||
<Reference Include="System.Security.Principal.Windows" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'uap'">
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="Windows" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="ApiCompatBaseline.txt" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
||||
</Project>
|
14
external/corefx/src/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Unix.cs
vendored
Normal file
14
external/corefx/src/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Unix.cs
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// 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.
|
||||
|
||||
namespace System.IO.IsolatedStorage
|
||||
{
|
||||
internal static partial class Helper
|
||||
{
|
||||
internal static void CreateDirectory(string path, IsolatedStorageScope scope)
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,9 +2,6 @@
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.Security.AccessControl;
|
||||
using System.Security.Principal;
|
||||
|
||||
@@ -12,36 +9,6 @@ namespace System.IO.IsolatedStorage
|
||||
{
|
||||
internal static partial class Helper
|
||||
{
|
||||
internal static string GetDataDirectory(IsolatedStorageScope scope)
|
||||
{
|
||||
// This is the relevant special folder for the given scope plus "IsolatedStorage".
|
||||
// It is meant to replicate the behavior of the VM ComIsolatedStorage::GetRootDir().
|
||||
|
||||
// (note that Silverlight used "CoreIsolatedStorage" for a directory name and did not support machine scope)
|
||||
|
||||
string dataDirectory = null;
|
||||
|
||||
if (IsMachine(scope))
|
||||
{
|
||||
// SpecialFolder.CommonApplicationData -> C:\ProgramData
|
||||
dataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
|
||||
}
|
||||
else if (IsRoaming(scope))
|
||||
{
|
||||
// SpecialFolder.ApplicationData -> C:\Users\Joe\AppData\Roaming
|
||||
dataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
}
|
||||
else
|
||||
{
|
||||
// SpecialFolder.LocalApplicationData -> C:\Users\Joe\AppData\Local
|
||||
dataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
}
|
||||
|
||||
dataDirectory = Path.Combine(dataDirectory, IsolatedStorageDirectoryName);
|
||||
|
||||
return dataDirectory;
|
||||
}
|
||||
|
||||
internal static void CreateDirectory(string path, IsolatedStorageScope scope)
|
||||
{
|
||||
if (Directory.Exists(path))
|
||||
@@ -49,7 +16,7 @@ namespace System.IO.IsolatedStorage
|
||||
|
||||
DirectoryInfo info = Directory.CreateDirectory(path);
|
||||
|
||||
if (IsMachine(scope) && RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
if (IsMachine(scope))
|
||||
{
|
||||
// Need to emulate COMIsolatedStorage::CreateDirectoryWithDacl(), which gives the following rights:
|
||||
//
|
||||
@@ -97,47 +64,5 @@ namespace System.IO.IsolatedStorage
|
||||
info.SetAccessControl(security);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void GetDefaultIdentityAndHash(out object identity, out string hash, char separator)
|
||||
{
|
||||
// NetFX (desktop CLR) IsolatedStorage uses identity from System.Security.Policy.Evidence to build
|
||||
// the folder structure on disk. It would use the "best" available evidence in this order:
|
||||
//
|
||||
// 1. Publisher (Authenticode)
|
||||
// 2. StrongName
|
||||
// 3. Url (CodeBase)
|
||||
// 4. Site
|
||||
// 5. Zone
|
||||
//
|
||||
// For CoreFX StrongName and Url are the only relevant types. By default evidence for the Domain comes
|
||||
// from the Assembly which comes from the EntryAssembly(). We'll emulate the legacy default behavior
|
||||
// by pulling directly from EntryAssembly.
|
||||
//
|
||||
// Note that it is possible that there won't be an EntryAssembly, which is something NetFX doesn't
|
||||
// have to deal with and shouldn't be likely on CoreFX due to a single AppDomain. Without Evidence
|
||||
// to pull from we'd have to dig into the use case to try and find a reasonable solution should we
|
||||
// run into this in the wild.
|
||||
|
||||
Assembly assembly = Assembly.GetEntryAssembly();
|
||||
|
||||
if (assembly == null)
|
||||
throw new IsolatedStorageException(SR.IsolatedStorage_Init);
|
||||
|
||||
AssemblyName assemblyName = assembly.GetName();
|
||||
Uri codeBase = new Uri(assembly.CodeBase);
|
||||
|
||||
hash = IdentityHelper.GetNormalizedStrongNameHash(assemblyName);
|
||||
if (hash != null)
|
||||
{
|
||||
hash = "StrongName" + separator + hash;
|
||||
identity = assemblyName;
|
||||
}
|
||||
else
|
||||
{
|
||||
hash = IdentityHelper.GetNormalizedUriHash(codeBase);
|
||||
hash = "Url" + separator + hash;
|
||||
identity = codeBase;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
149
external/corefx/src/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
vendored
Normal file
149
external/corefx/src/System.IO.IsolatedStorage/src/System/IO/IsolatedStorage/Helper.Win32Unix.cs
vendored
Normal file
@@ -0,0 +1,149 @@
|
||||
// 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 System.Reflection;
|
||||
using System.Security;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.IO.IsolatedStorage
|
||||
{
|
||||
internal static partial class Helper
|
||||
{
|
||||
internal static string GetDataDirectory(IsolatedStorageScope scope)
|
||||
{
|
||||
// This is the relevant special folder for the given scope plus "IsolatedStorage".
|
||||
// It is meant to replicate the behavior of the VM ComIsolatedStorage::GetRootDir().
|
||||
|
||||
// (note that Silverlight used "CoreIsolatedStorage" for a directory name and did not support machine scope)
|
||||
|
||||
string dataDirectory = null;
|
||||
|
||||
if (IsMachine(scope))
|
||||
{
|
||||
// SpecialFolder.CommonApplicationData -> C:\ProgramData
|
||||
dataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
|
||||
}
|
||||
else if (IsRoaming(scope))
|
||||
{
|
||||
// SpecialFolder.ApplicationData -> C:\Users\Joe\AppData\Roaming
|
||||
dataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
}
|
||||
else
|
||||
{
|
||||
// SpecialFolder.LocalApplicationData -> C:\Users\Joe\AppData\Local
|
||||
dataDirectory = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
|
||||
}
|
||||
|
||||
dataDirectory = Path.Combine(dataDirectory, IsolatedStorageDirectoryName);
|
||||
|
||||
return dataDirectory;
|
||||
}
|
||||
|
||||
internal static void GetDefaultIdentityAndHash(out object identity, out string hash, char separator)
|
||||
{
|
||||
// NetFX (desktop CLR) IsolatedStorage uses identity from System.Security.Policy.Evidence to build
|
||||
// the folder structure on disk. It would use the "best" available evidence in this order:
|
||||
//
|
||||
// 1. Publisher (Authenticode)
|
||||
// 2. StrongName
|
||||
// 3. Url (CodeBase)
|
||||
// 4. Site
|
||||
// 5. Zone
|
||||
//
|
||||
// For CoreFX StrongName and Url are the only relevant types. By default evidence for the Domain comes
|
||||
// from the Assembly which comes from the EntryAssembly(). We'll emulate the legacy default behavior
|
||||
// by pulling directly from EntryAssembly.
|
||||
//
|
||||
// Note that it is possible that there won't be an EntryAssembly, which is something NetFX doesn't
|
||||
// have to deal with and shouldn't be likely on CoreFX due to a single AppDomain. Without Evidence
|
||||
// to pull from we'd have to dig into the use case to try and find a reasonable solution should we
|
||||
// run into this in the wild.
|
||||
|
||||
Assembly assembly = Assembly.GetEntryAssembly();
|
||||
|
||||
if (assembly == null)
|
||||
throw new IsolatedStorageException(SR.IsolatedStorage_Init);
|
||||
|
||||
AssemblyName assemblyName = assembly.GetName();
|
||||
Uri codeBase = new Uri(assembly.CodeBase);
|
||||
|
||||
hash = IdentityHelper.GetNormalizedStrongNameHash(assemblyName);
|
||||
if (hash != null)
|
||||
{
|
||||
hash = "StrongName" + separator + hash;
|
||||
identity = assemblyName;
|
||||
}
|
||||
else
|
||||
{
|
||||
hash = "Url" + separator + IdentityHelper.GetNormalizedUriHash(codeBase);
|
||||
identity = codeBase;
|
||||
}
|
||||
}
|
||||
|
||||
internal static string GetRandomDirectory(string rootDirectory, IsolatedStorageScope scope)
|
||||
{
|
||||
string randomDirectory = GetExistingRandomDirectory(rootDirectory);
|
||||
if (string.IsNullOrEmpty(randomDirectory))
|
||||
{
|
||||
using (Mutex m = CreateMutexNotOwned(rootDirectory))
|
||||
{
|
||||
if (!m.WaitOne())
|
||||
{
|
||||
throw new IsolatedStorageException(SR.IsolatedStorage_Init);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
randomDirectory = GetExistingRandomDirectory(rootDirectory);
|
||||
if (string.IsNullOrEmpty(randomDirectory))
|
||||
{
|
||||
// Someone else hasn't created the directory before we took the lock
|
||||
randomDirectory = Path.Combine(rootDirectory, Path.GetRandomFileName(), Path.GetRandomFileName());
|
||||
CreateDirectory(randomDirectory, scope);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
m.ReleaseMutex();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return randomDirectory;
|
||||
}
|
||||
|
||||
internal static string GetExistingRandomDirectory(string rootDirectory)
|
||||
{
|
||||
// Look for an existing random directory at the given root
|
||||
// (a set of nested directories that were created via Path.GetRandomFileName())
|
||||
|
||||
// Older versions of the desktop framework created longer (24 character) random paths and would
|
||||
// migrate them if they could not find the new style directory.
|
||||
|
||||
if (!Directory.Exists(rootDirectory))
|
||||
return null;
|
||||
|
||||
foreach (string directory in Directory.GetDirectories(rootDirectory))
|
||||
{
|
||||
if (Path.GetFileName(directory)?.Length == 12)
|
||||
{
|
||||
foreach (string subdirectory in Directory.GetDirectories(directory))
|
||||
{
|
||||
if (Path.GetFileName(subdirectory)?.Length == 12)
|
||||
{
|
||||
return subdirectory;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static Mutex CreateMutexNotOwned(string pathName)
|
||||
{
|
||||
return new Mutex(initiallyOwned: false, name: @"Global\" + IdentityHelper.GetStrongHashSuitableForObjectName(pathName));
|
||||
}
|
||||
}
|
||||
}
|
@@ -2,7 +2,6 @@
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System;
|
||||
using System.Security;
|
||||
using Windows.ApplicationModel;
|
||||
using Windows.Storage;
|
||||
@@ -20,18 +19,22 @@ namespace System.IO.IsolatedStorage
|
||||
|
||||
if (IsMachine(scope))
|
||||
{
|
||||
dataDirectory = ApplicationData.Current.SharedLocalFolder.Path;
|
||||
// Getting the shared local folder isn't possible if the policy for
|
||||
// "Allow a Windows app to share application data between users".
|
||||
dataDirectory = ApplicationData.Current.SharedLocalFolder?.Path;
|
||||
|
||||
if (dataDirectory == null)
|
||||
{
|
||||
throw new IsolatedStorageException(SR.IsolatedStorage_Scope_Invalid);
|
||||
}
|
||||
}
|
||||
if (!IsRoaming(scope))
|
||||
{
|
||||
dataDirectory = ApplicationData.Current.LocalFolder.Path;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!IsRoaming(scope))
|
||||
{
|
||||
dataDirectory = ApplicationData.Current.LocalFolder.Path;
|
||||
}
|
||||
else
|
||||
{
|
||||
dataDirectory = ApplicationData.Current.RoamingFolder.Path;
|
||||
}
|
||||
dataDirectory = ApplicationData.Current.RoamingFolder.Path;
|
||||
}
|
||||
|
||||
dataDirectory = Path.Combine(dataDirectory, IsolatedStorageDirectoryName);
|
||||
@@ -64,5 +67,12 @@ namespace System.IO.IsolatedStorage
|
||||
hash = "Url" + separator + hash;
|
||||
identity = codeBase;
|
||||
}
|
||||
|
||||
internal static string GetRandomDirectory(string rootDirectory, IsolatedStorageScope scope)
|
||||
{
|
||||
// We didn't create random directories for UAP/UWP in the past. As the root locations are
|
||||
// scoped beneath app isolated folders we don't need the extra layer of obfuscation.
|
||||
return rootDirectory;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2,9 +2,6 @@
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Security;
|
||||
using System.Threading;
|
||||
|
||||
namespace System.IO.IsolatedStorage
|
||||
{
|
||||
internal static partial class Helper
|
||||
@@ -17,7 +14,8 @@ namespace System.IO.IsolatedStorage
|
||||
|
||||
/// <summary>
|
||||
/// The full root directory is the relevant special folder from Environment.GetFolderPath() plus "IsolatedStorage"
|
||||
/// and a set of random directory names if not roaming.
|
||||
/// and a set of random directory names if not roaming. (The random directories aren't created for WinRT as
|
||||
/// the FolderPath locations for WinRT are app isolated already.)
|
||||
///
|
||||
/// Examples:
|
||||
///
|
||||
@@ -53,71 +51,6 @@ namespace System.IO.IsolatedStorage
|
||||
return s_userRootDirectory;
|
||||
}
|
||||
|
||||
internal static string GetRandomDirectory(string rootDirectory, IsolatedStorageScope scope)
|
||||
{
|
||||
string randomDirectory = GetExistingRandomDirectory(rootDirectory);
|
||||
if (string.IsNullOrEmpty(randomDirectory))
|
||||
{
|
||||
using (Mutex m = CreateMutexNotOwned(rootDirectory))
|
||||
{
|
||||
if (!m.WaitOne())
|
||||
{
|
||||
throw new IsolatedStorageException(SR.IsolatedStorage_Init);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
randomDirectory = GetExistingRandomDirectory(rootDirectory);
|
||||
if (string.IsNullOrEmpty(randomDirectory))
|
||||
{
|
||||
// Someone else hasn't created the directory before we took the lock
|
||||
randomDirectory = Path.Combine(rootDirectory, Path.GetRandomFileName(), Path.GetRandomFileName());
|
||||
CreateDirectory(randomDirectory, scope);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
m.ReleaseMutex();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return randomDirectory;
|
||||
}
|
||||
|
||||
internal static string GetExistingRandomDirectory(string rootDirectory)
|
||||
{
|
||||
// Look for an existing random directory at the given root
|
||||
// (a set of nested directories that were created via Path.GetRandomFileName())
|
||||
|
||||
// Older versions of the desktop framework created longer (24 character) random paths and would
|
||||
// migrate them if they could not find the new style directory.
|
||||
|
||||
if (!Directory.Exists(rootDirectory))
|
||||
return null;
|
||||
|
||||
foreach (string directory in Directory.GetDirectories(rootDirectory))
|
||||
{
|
||||
if (Path.GetFileName(directory)?.Length == 12)
|
||||
{
|
||||
foreach (string subdirectory in Directory.GetDirectories(directory))
|
||||
{
|
||||
if (Path.GetFileName(subdirectory)?.Length == 12)
|
||||
{
|
||||
return subdirectory;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static Mutex CreateMutexNotOwned(string pathName)
|
||||
{
|
||||
return new Mutex(initiallyOwned: false, name: @"Global\" + IdentityHelper.GetStrongHashSuitableForObjectName(pathName));
|
||||
}
|
||||
|
||||
internal static bool IsMachine(IsolatedStorageScope scope) => ((scope & IsolatedStorageScope.Machine) != 0);
|
||||
internal static bool IsAssembly(IsolatedStorageScope scope) => ((scope & IsolatedStorageScope.Assembly) != 0);
|
||||
internal static bool IsApplication(IsolatedStorageScope scope) => ((scope & IsolatedStorageScope.Application) != 0);
|
||||
|
@@ -12,6 +12,7 @@ namespace System.IO.IsolatedStorage
|
||||
{
|
||||
protected IsolatedStorageException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -504,6 +504,50 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
public override long AvailableFreeSpace
|
||||
{
|
||||
get
|
||||
{
|
||||
return Quota - UsedSize;
|
||||
}
|
||||
}
|
||||
|
||||
[CLSCompliant(false)]
|
||||
[Obsolete("IsolatedStorage.MaximumSize has been deprecated because it is not CLS Compliant. To get the maximum size use IsolatedStorage.Quota")]
|
||||
public override ulong MaximumSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return long.MaxValue;
|
||||
}
|
||||
}
|
||||
|
||||
public override long Quota
|
||||
{
|
||||
get
|
||||
{
|
||||
return long.MaxValue;
|
||||
}
|
||||
}
|
||||
|
||||
public override long UsedSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0; // We do not have a mechanism for tracking usage.
|
||||
}
|
||||
}
|
||||
|
||||
[CLSCompliant(false)]
|
||||
[Obsolete("IsolatedStorage.CurrentSize has been deprecated because it is not CLS Compliant. To get the current size use IsolatedStorage.UsedSize")]
|
||||
public override ulong CurrentSize
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0; // We do not have a mechanism for tracking usage.
|
||||
}
|
||||
}
|
||||
|
||||
public static IsolatedStorageFile GetUserStoreForApplication()
|
||||
{
|
||||
return GetStore(IsolatedStorageScope.Application | IsolatedStorageScope.User);
|
||||
@@ -568,33 +612,25 @@ namespace System.IO.IsolatedStorage
|
||||
public static IsolatedStorageFile GetStore(IsolatedStorageScope scope, Type applicationEvidenceType)
|
||||
{
|
||||
// Scope MUST be Application
|
||||
|
||||
// https://github.com/dotnet/corefx/issues/10935
|
||||
throw new PlatformNotSupportedException();
|
||||
return (applicationEvidenceType == null) ? GetStore(scope) : throw new PlatformNotSupportedException(SR.PlatformNotSupported_CAS); // https://github.com/dotnet/corefx/issues/10935
|
||||
}
|
||||
|
||||
public static IsolatedStorageFile GetStore(IsolatedStorageScope scope, object applicationIdentity)
|
||||
{
|
||||
// Scope MUST be Application
|
||||
|
||||
// https://github.com/dotnet/corefx/issues/10935
|
||||
throw new PlatformNotSupportedException();
|
||||
return (applicationIdentity == null) ? GetStore(scope) : throw new PlatformNotSupportedException(SR.PlatformNotSupported_CAS); // https://github.com/dotnet/corefx/issues/10935
|
||||
}
|
||||
|
||||
public static IsolatedStorageFile GetStore(IsolatedStorageScope scope, Type domainEvidenceType, Type assemblyEvidenceType)
|
||||
{
|
||||
// Scope MUST NOT be Application (assembly is assumed otherwise)
|
||||
|
||||
// https://github.com/dotnet/corefx/issues/10935
|
||||
throw new PlatformNotSupportedException();
|
||||
return (domainEvidenceType == null && assemblyEvidenceType == null) ? GetStore(scope) : throw new PlatformNotSupportedException(SR.PlatformNotSupported_CAS); // https://github.com/dotnet/corefx/issues/10935
|
||||
}
|
||||
|
||||
public static IsolatedStorageFile GetStore(IsolatedStorageScope scope, object domainIdentity, object assemblyIdentity)
|
||||
{
|
||||
// Scope MUST NOT be Application (assembly is assumed otherwise)
|
||||
|
||||
// https://github.com/dotnet/corefx/issues/10935
|
||||
throw new PlatformNotSupportedException();
|
||||
return (domainIdentity == null && assemblyIdentity == null) ? GetStore(scope) : throw new PlatformNotSupportedException(SR.PlatformNotSupported_CAS); // https://github.com/dotnet/corefx/issues/10935
|
||||
}
|
||||
|
||||
// https://github.com/dotnet/corefx/issues/10935
|
||||
@@ -655,12 +691,7 @@ namespace System.IO.IsolatedStorage
|
||||
if (Disposed)
|
||||
throw new ObjectDisposedException(null, SR.IsolatedStorage_StoreNotOpen);
|
||||
|
||||
if (IsDeleted)
|
||||
{
|
||||
throw new IsolatedStorageException(SR.IsolatedStorage_StoreNotOpen);
|
||||
}
|
||||
|
||||
if (_closed)
|
||||
if (_closed || IsDeleted)
|
||||
throw new InvalidOperationException(SR.IsolatedStorage_StoreNotOpen);
|
||||
}
|
||||
|
||||
|
@@ -193,6 +193,14 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
}
|
||||
|
||||
public override bool IsAsync
|
||||
{
|
||||
get
|
||||
{
|
||||
return _fs.IsAsync;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
try
|
||||
@@ -214,6 +222,11 @@ namespace System.IO.IsolatedStorage
|
||||
_fs.Flush();
|
||||
}
|
||||
|
||||
public override void Flush(bool flushToDisk)
|
||||
{
|
||||
_fs.Flush(flushToDisk);
|
||||
}
|
||||
|
||||
public override Task FlushAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
return _fs.FlushAsync();
|
||||
@@ -296,5 +309,13 @@ namespace System.IO.IsolatedStorage
|
||||
{
|
||||
_fs.Lock(position, length);
|
||||
}
|
||||
|
||||
public override SafeFileHandle SafeFileHandle
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new IsolatedStorageException(SR.IsolatedStorage_Operation_ISFS);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// 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.
|
||||
|
||||
@@ -6,7 +6,6 @@ using System;
|
||||
|
||||
namespace System.IO.IsolatedStorage
|
||||
{
|
||||
[Serializable]
|
||||
[Flags]
|
||||
public enum IsolatedStorageScope
|
||||
{
|
||||
|
@@ -6,6 +6,7 @@
|
||||
netstandard-Windows_NT;
|
||||
netcoreapp-Unix;
|
||||
netcoreapp-Windows_NT;
|
||||
uap-Windows_NT;
|
||||
</BuildConfigurations>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@@ -61,4 +61,7 @@
|
||||
<data name="IsolatedStorage_Init" xml:space="preserve">
|
||||
<value>Initialization failed.</value>
|
||||
</data>
|
||||
<data name="IsolatedStorage_Scope_Invalid" xml:space="preserve">
|
||||
<value>Invalid scope.</value>
|
||||
</data>
|
||||
</root>
|
@@ -5,7 +5,6 @@
|
||||
<ProjectGuid>{BF4F9507-8FBD-45EA-81C9-3ED89C052C91}</ProjectGuid>
|
||||
<TestCategories>InnerLoop;OuterLoop</TestCategories>
|
||||
</PropertyGroup>
|
||||
<!-- Default configurations to help VS understand the options -->
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Unix-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Windows_NT-Debug|AnyCPU'" />
|
||||
@@ -14,11 +13,37 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Unix-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netstandard-Windows_NT-Release|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Debug|AnyCPU'" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Windows_NT-Release|AnyCPU'" />
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'netcoreapp'">
|
||||
<Compile Include="System\IO\IsolatedStorage\IdentityTests.cs" />
|
||||
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageBaseClassTests.cs" />
|
||||
<Compile Include="System\IO\IsolatedStorage\IdentityTests.cs" />
|
||||
<Compile Include="System\IO\IsolatedStorage\IsolatedStorageBaseClassTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'uap'">
|
||||
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Win32Unix.cs">
|
||||
<Link>Internals\Helper.Win32Unix.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="System\IO\IsolatedStorage\HelperTests.Win32Unix.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'uap' AND '$(TargetsWindows)' == 'true'">
|
||||
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Win32.cs">
|
||||
<Link>Internals\Helper.Win32.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' != 'uap' AND '$(TargetsUnix)' == 'true'">
|
||||
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Unix.cs">
|
||||
<Link>Internals\Helper.Unix.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'uap'">
|
||||
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.WinRT.cs">
|
||||
<Link>Internals\Helper.WinRT.cs</Link>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="$(CommonTestPath)\System\AssertExtensions.cs">
|
||||
<Link>Common\System\AssertExtensions.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonTestPath)\System\IO\TempDirectory.cs">
|
||||
<Link>Common\System\IO\TempDirectory.cs</Link>
|
||||
</Compile>
|
||||
@@ -28,12 +53,12 @@
|
||||
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.cs">
|
||||
<Link>Internals\Helper.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\src\System\IO\IsolatedStorage\Helper.Win32.Unix.cs">
|
||||
<Link>Internals\Helper.Win32.Unix.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonPath)\System\Security\IdentityHelper.cs">
|
||||
<Link>Common\System\Security\IdentityHelper.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="$(CommonTestPath)\System\PlatformDetection.cs">
|
||||
<Link>Common\System\PlatformDetection.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AssemblyInfo.cs" />
|
||||
<Compile Include="StoreTestsFixture.cs" />
|
||||
<Compile Include="System\IO\IsolatedStorage\ContainsUnknownFilesTests.cs" />
|
||||
@@ -57,5 +82,9 @@
|
||||
<Compile Include="System\IO\IsolatedStorage\TestHelper.cs" />
|
||||
<Compile Include="System\IO\IsolatedStorage\RemoveTests.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetGroup)' == 'uap'">
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="Windows" />
|
||||
</ItemGroup>
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
|
||||
</Project>
|
@@ -7,12 +7,14 @@ using Xunit;
|
||||
|
||||
namespace System.IO.IsolatedStorage
|
||||
{
|
||||
[ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
|
||||
public class ContainsUnknownFilesTests : IsoStorageTest
|
||||
{
|
||||
private static MethodInfo s_containsUnknownFilesMethod
|
||||
= typeof(IsolatedStorageFile).GetMethod("ContainsUnknownFiles", BindingFlags.NonPublic | BindingFlags.Instance);
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void ContainsUnknownFiles_CleanStore(PresetScopes scope)
|
||||
{
|
||||
TestHelper.WipeStores();
|
||||
@@ -24,6 +26,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void ContainsUnknownFiles_OkFiles(PresetScopes scope)
|
||||
{
|
||||
TestHelper.WipeStores();
|
||||
@@ -43,6 +46,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void ContainsUnknownFiles_NotOkFiles(PresetScopes scope)
|
||||
{
|
||||
TestHelper.WipeStores();
|
||||
@@ -65,6 +69,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void ContainsUnknownFiles_NotOkDirectory(PresetScopes scope)
|
||||
{
|
||||
TestHelper.WipeStores();
|
||||
|
@@ -1,4 +1,4 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// 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.
|
||||
|
||||
@@ -6,6 +6,7 @@ using Xunit;
|
||||
|
||||
namespace System.IO.IsolatedStorage
|
||||
{
|
||||
[ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
|
||||
public class CopyFileTests : IsoStorageTest
|
||||
{
|
||||
[Fact]
|
||||
@@ -13,10 +14,10 @@ namespace System.IO.IsolatedStorage
|
||||
{
|
||||
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
|
||||
{
|
||||
Assert.Throws<ArgumentNullException>("sourceFileName", () => isf.CopyFile(null, "bar"));
|
||||
Assert.Throws<ArgumentNullException>("sourceFileName", () => isf.CopyFile(null, "bar", true));
|
||||
Assert.Throws<ArgumentNullException>("destinationFileName", () => isf.CopyFile("foo", null));
|
||||
Assert.Throws<ArgumentNullException>("destinationFileName", () => isf.CopyFile("foo", null, true));
|
||||
AssertExtensions.Throws<ArgumentNullException>("sourceFileName", () => isf.CopyFile(null, "bar"));
|
||||
AssertExtensions.Throws<ArgumentNullException>("sourceFileName", () => isf.CopyFile(null, "bar", true));
|
||||
AssertExtensions.Throws<ArgumentNullException>("destinationFileName", () => isf.CopyFile("foo", null));
|
||||
AssertExtensions.Throws<ArgumentNullException>("destinationFileName", () => isf.CopyFile("foo", null, true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +26,10 @@ namespace System.IO.IsolatedStorage
|
||||
{
|
||||
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
|
||||
{
|
||||
Assert.Throws<ArgumentException>("sourceFileName", () => isf.CopyFile(string.Empty, "bar"));
|
||||
Assert.Throws<ArgumentException>("sourceFileName", () => isf.CopyFile(string.Empty, "bar", true));
|
||||
Assert.Throws<ArgumentException>("destinationFileName", () => isf.CopyFile("foo", string.Empty));
|
||||
Assert.Throws<ArgumentException>("destinationFileName", () => isf.CopyFile("foo", string.Empty, true));
|
||||
AssertExtensions.Throws<ArgumentException>("sourceFileName", () => isf.CopyFile(string.Empty, "bar"));
|
||||
AssertExtensions.Throws<ArgumentException>("sourceFileName", () => isf.CopyFile(string.Empty, "bar", true));
|
||||
AssertExtensions.Throws<ArgumentException>("destinationFileName", () => isf.CopyFile("foo", string.Empty));
|
||||
AssertExtensions.Throws<ArgumentException>("destinationFileName", () => isf.CopyFile("foo", string.Empty, true));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,17 +45,17 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CopyFile_ThrowsIsolatedStorageException()
|
||||
public void CopyDeletedFile_ThrowsInvalidOperationException()
|
||||
{
|
||||
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
|
||||
{
|
||||
isf.Remove();
|
||||
Assert.Throws<IsolatedStorageException>(() => isf.CopyFile("foo", "bar"));
|
||||
Assert.Throws<InvalidOperationException>(() => isf.CopyFile("foo", "bar"));
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CopyFile_ThrowsInvalidOperationException()
|
||||
public void CopyClosedFile_ThrowsInvalidOperationException()
|
||||
{
|
||||
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
|
||||
{
|
||||
@@ -83,6 +84,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void CopyFile_CopyOver(PresetScopes scope)
|
||||
{
|
||||
TestHelper.WipeStores();
|
||||
@@ -99,6 +101,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18265", TargetFrameworkMonikers.NetFramework)]
|
||||
public void CopyFile_CopiesFile(PresetScopes scope)
|
||||
{
|
||||
TestHelper.WipeStores();
|
||||
|
@@ -6,6 +6,7 @@ using Xunit;
|
||||
|
||||
namespace System.IO.IsolatedStorage
|
||||
{
|
||||
[ActiveIssue(18940, TargetFrameworkMonikers.UapAot)]
|
||||
public class CreateDirectoryTests : IsoStorageTest
|
||||
{
|
||||
[Fact]
|
||||
@@ -18,12 +19,12 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateDirectory_ThrowsIsolatedStorageException()
|
||||
public void CreateRemovedDirectory_ThrowsInvalidOperationException()
|
||||
{
|
||||
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
|
||||
{
|
||||
isf.Remove();
|
||||
Assert.Throws<IsolatedStorageException>(() => isf.CreateDirectory("foo"));
|
||||
Assert.Throws<InvalidOperationException>(() => isf.CreateDirectory("foo"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,7 +40,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CreateDirectory_ThrowsInvalidOperationException()
|
||||
public void CreateClosedDirectory_ThrowsInvalidOperationException()
|
||||
{
|
||||
using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly())
|
||||
{
|
||||
@@ -58,6 +59,7 @@ namespace System.IO.IsolatedStorage
|
||||
}
|
||||
|
||||
[Theory MemberData(nameof(ValidStores))]
|
||||
[ActiveIssue("dotnet/corefx #18268", TargetFrameworkMonikers.NetFramework)]
|
||||
public void CreateDirectory_Existance(PresetScopes scope)
|
||||
{
|
||||
using (var isf = GetPresetScope(scope))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user