Commit 415226de authored by Fabien Bondi's avatar Fabien Bondi

Fix Leoxia.Implementations potential NullReferenceException on DirectoryInfo.Parent adaptation.

parent 332ad788
......@@ -16,7 +16,7 @@ Provides:
<RepositoryType>Git</RepositoryType>
<PackageTags>testability abstractions mockability leoxia</PackageTags>
<PackageReleaseNotes />
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<PackageTagsKey>testability abstractions mockability leoxia</PackageTagsKey>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
......
......@@ -7,7 +7,7 @@ Provides:
IDriveInfo
IDriveInfoFactory</Description>
<Authors>Leoxia</Authors>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
......@@ -6,7 +6,7 @@
Provides:
IFileSystemWatcher</Description>
<Authors>Leoxia</Authors>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
......@@ -18,7 +18,7 @@ Provides:
ITextWriter</Description>
<Authors>Leoxia</Authors>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl>
......
......@@ -10,7 +10,7 @@ Provides:
ITimeProvider</Description>
<Authors>Leoxia</Authors>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<PackageReleaseNotes>
</PackageReleaseNotes>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
......@@ -16,7 +16,7 @@ Provides Implementations for:
<RepositoryType>Git</RepositoryType>
<PackageTags>testability abstractions mockability leoxia</PackageTags>
<PackageReleaseNotes />
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<PackageTagsKey>testability abstractions mockability leoxia</PackageTagsKey>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
......
......@@ -5,7 +5,7 @@
<Authors>Leoxia</Authors>
<Product>Lx</Product>
<Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
......@@ -5,7 +5,7 @@
<Authors>Leoxia</Authors>
<Product>Lx</Product>
<Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
......@@ -818,7 +818,7 @@ namespace Leoxia.Implementations.IO
/// class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/// version="1" Unrestricted="true" />
/// </PermissionSet>
public IDirectoryInfo Parent => _directoryInfo.Parent.Adapt();
public IDirectoryInfo Parent => _directoryInfo.Parent?.Adapt();
/// <summary>Refreshes the state of the object.</summary>
/// <exception cref="T:System.IO.IOException">A device such as a disk drive is not ready. </exception>
......
......@@ -285,7 +285,7 @@ namespace Leoxia.Implementations.IO
/// class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, KeyToken=b77a5c561934e089"
/// version="1" Unrestricted="true" />
/// </PermissionSet>
public IDirectoryInfo Directory => _fileInfo.Directory.Adapt();
public IDirectoryInfo Directory => _fileInfo.Directory?.Adapt();
/// <summary>Gets a string representing the directory's full path.</summary>
/// <returns>A string representing the directory's full path.</returns>
......
......@@ -6,7 +6,7 @@
<Product>Leoxia.Implementations.IO</Product>
<Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl>
......
......@@ -56,7 +56,7 @@ namespace Leoxia.Implementations.IO
/// <returns></returns>
public static IFileSystemInfo[] Adapt(this IEnumerable<FileSystemInfo> enumerable)
{
return enumerable.Select(item => item.Adapt()).ToArray();
return enumerable.Select(item => item?.Adapt()).ToArray();
}
/// <summary>
......@@ -66,7 +66,7 @@ namespace Leoxia.Implementations.IO
/// <returns></returns>
public static IDirectoryInfo[] Adapt(this IEnumerable<DirectoryInfo> enumerable)
{
return enumerable.Select(d => d.Adapt()).ToArray();
return enumerable.Select(d => d?.Adapt()).ToArray();
}
/// <summary>
......@@ -76,7 +76,7 @@ namespace Leoxia.Implementations.IO
/// <returns></returns>
public static IFileInfo[] Adapt(this IEnumerable<FileInfo> enumerable)
{
return enumerable.Select(f => f.Adapt()).ToArray();
return enumerable.Select(f => f?.Adapt()).ToArray();
}
/// <summary>
......
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<Authors>Leoxia</Authors>
<Company>Leoxia Ltd</Company>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
......
......@@ -8,7 +8,7 @@ Provides Implementations for:
IEnvironment</Description>
<Authors>Leoxia</Authors>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<Version>1.3.1.0</Version>
<Version>1.3.2.0</Version>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl>
<PackageIconUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/images/icon.png</PackageIconUrl>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment