...
 
Commits (4)
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderRegionName/@EntryValue">Copyright (c) Leoxia Ltd</s:String>
<s:String x:Key="/Default/CodeStyle/FileHeader/FileHeaderText/@EntryValue">--------------------------------------------------------------------------------------------------------------------&#xD;
&lt;copyright file="$FILENAME$" company="Leoxia Ltd"&gt;&#xD;
Copyright © 2011-$CURRENT_YEAR$ Leoxia Ltd&#xD;
&lt;/copyright&gt;&#xD;
&#xD;
.NET Software Development&#xD;
https://www.leoxia.com&#xD;
Build. Tomorrow. Together&#xD;
&#xD;
MIT License&#xD;
&#xD;
Permission is hereby granted, free of charge, to any person obtaining a copy&#xD;
of this software and associated documentation files (the "Software"), to deal&#xD;
in the Software without restriction, including without limitation the rights&#xD;
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell&#xD;
copies of the Software, and to permit persons to whom the Software is&#xD;
furnished to do so, subject to the following conditions:&#xD;
&#xD;
The above copyright notice and this permission notice shall be included in all&#xD;
copies or substantial portions of the Software.&#xD;
&#xD;
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&#xD;
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&#xD;
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&#xD;
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&#xD;
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,&#xD;
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE&#xD;
SOFTWARE.&#xD;
--------------------------------------------------------------------------------------------------------------------</s:String></wpf:ResourceDictionary>
\ No newline at end of file
...@@ -16,7 +16,7 @@ Provides: ...@@ -16,7 +16,7 @@ Provides:
<RepositoryType>Git</RepositoryType> <RepositoryType>Git</RepositoryType>
<PackageTags>testability abstractions mockability leoxia</PackageTags> <PackageTags>testability abstractions mockability leoxia</PackageTags>
<PackageReleaseNotes /> <PackageReleaseNotes />
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<PackageTagsKey>testability abstractions mockability leoxia</PackageTagsKey> <PackageTagsKey>testability abstractions mockability leoxia</PackageTagsKey>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
......
...@@ -7,7 +7,7 @@ Provides: ...@@ -7,7 +7,7 @@ Provides:
IDriveInfo IDriveInfo
IDriveInfoFactory</Description> IDriveInfoFactory</Description>
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
Provides: Provides:
IFileSystemWatcher</Description> IFileSystemWatcher</Description>
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
...@@ -162,6 +162,8 @@ namespace Leoxia.Abstractions.IO ...@@ -162,6 +162,8 @@ namespace Leoxia.Abstractions.IO
/// </value> /// </value>
Encoding InputEncoding { get; set; } Encoding InputEncoding { get; set; }
#if (!NET40)
/// <summary> /// <summary>
/// Gets a value indicating whether this instance is error redirected. /// Gets a value indicating whether this instance is error redirected.
/// </summary> /// </summary>
...@@ -186,6 +188,8 @@ namespace Leoxia.Abstractions.IO ...@@ -186,6 +188,8 @@ namespace Leoxia.Abstractions.IO
/// </value> /// </value>
bool IsOutputRedirected { get; } bool IsOutputRedirected { get; }
#endif
/// <summary> /// <summary>
/// Gets a value indicating whether [key available]. /// Gets a value indicating whether [key available].
/// </summary> /// </summary>
......
...@@ -102,6 +102,8 @@ namespace Leoxia.Abstractions.IO ...@@ -102,6 +102,8 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority> /// <filterpriority>1</filterpriority>
int Read(char[] buffer, int index, int count); int Read(char[] buffer, int index, int count);
#if (!NET40)
/// <summary> /// <summary>
/// Reads a specified maximum number of characters from the current text reader asynchronously and writes the data /// Reads a specified maximum number of characters from the current text reader asynchronously and writes the data
/// to a buffer, beginning at the specified index. /// to a buffer, beginning at the specified index.
...@@ -136,6 +138,8 @@ namespace Leoxia.Abstractions.IO ...@@ -136,6 +138,8 @@ namespace Leoxia.Abstractions.IO
/// <exception cref="T:System.InvalidOperationException">The reader is currently in use by a previous read operation. </exception> /// <exception cref="T:System.InvalidOperationException">The reader is currently in use by a previous read operation. </exception>
Task<int> ReadAsync(char[] buffer, int index, int count); Task<int> ReadAsync(char[] buffer, int index, int count);
#endif
/// <summary> /// <summary>
/// Reads a specified maximum number of characters from the current text reader and writes the data to a buffer, /// Reads a specified maximum number of characters from the current text reader and writes the data to a buffer,
/// beginning at the specified index. /// beginning at the specified index.
...@@ -166,6 +170,8 @@ namespace Leoxia.Abstractions.IO ...@@ -166,6 +170,8 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>2</filterpriority> /// <filterpriority>2</filterpriority>
int ReadBlock(char[] buffer, int index, int count); int ReadBlock(char[] buffer, int index, int count);
#if (!NET40)
/// <summary> /// <summary>
/// Reads a specified maximum number of characters from the current text reader asynchronously and writes the data /// Reads a specified maximum number of characters from the current text reader asynchronously and writes the data
/// to a buffer, beginning at the specified index. /// to a buffer, beginning at the specified index.
...@@ -200,6 +206,8 @@ namespace Leoxia.Abstractions.IO ...@@ -200,6 +206,8 @@ namespace Leoxia.Abstractions.IO
/// <exception cref="T:System.InvalidOperationException">The reader is currently in use by a previous read operation. </exception> /// <exception cref="T:System.InvalidOperationException">The reader is currently in use by a previous read operation. </exception>
Task<int> ReadBlockAsync(char[] buffer, int index, int count); Task<int> ReadBlockAsync(char[] buffer, int index, int count);
#endif
/// <summary>Reads a line of characters from the text reader and returns the data as a string.</summary> /// <summary>Reads a line of characters from the text reader and returns the data as a string.</summary>
/// <returns>The next line from the reader, or null if all characters have been read.</returns> /// <returns>The next line from the reader, or null if all characters have been read.</returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception> /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
...@@ -215,6 +223,8 @@ namespace Leoxia.Abstractions.IO ...@@ -215,6 +223,8 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority> /// <filterpriority>1</filterpriority>
string ReadLine(); string ReadLine();
#if (!NET40)
/// <summary>Reads a line of characters asynchronously and returns the data as a string. </summary> /// <summary>Reads a line of characters asynchronously and returns the data as a string. </summary>
/// <returns> /// <returns>
/// A task that represents the asynchronous read operation. The value of the string parameter /// A task that represents the asynchronous read operation. The value of the string parameter
...@@ -228,6 +238,8 @@ namespace Leoxia.Abstractions.IO ...@@ -228,6 +238,8 @@ namespace Leoxia.Abstractions.IO
/// <exception cref="T:System.InvalidOperationException">The reader is currently in use by a previous read operation. </exception> /// <exception cref="T:System.InvalidOperationException">The reader is currently in use by a previous read operation. </exception>
Task<string> ReadLineAsync(); Task<string> ReadLineAsync();
#endif
/// <summary>Reads all characters from the current position to the end of the text reader and returns them as one string.</summary> /// <summary>Reads all characters from the current position to the end of the text reader and returns them as one string.</summary>
/// <returns>A string that contains all characters from the current position to the end of the text reader.</returns> /// <returns>A string that contains all characters from the current position to the end of the text reader.</returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception> /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
...@@ -243,6 +255,8 @@ namespace Leoxia.Abstractions.IO ...@@ -243,6 +255,8 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority> /// <filterpriority>1</filterpriority>
string ReadToEnd(); string ReadToEnd();
#if (!NET40)
/// <summary> /// <summary>
/// Reads all characters from the current position to the end of the text reader asynchronously and returns them /// Reads all characters from the current position to the end of the text reader asynchronously and returns them
/// as one string. /// as one string.
...@@ -258,5 +272,8 @@ namespace Leoxia.Abstractions.IO ...@@ -258,5 +272,8 @@ namespace Leoxia.Abstractions.IO
/// <exception cref="T:System.ObjectDisposedException">The text reader has been disposed.</exception> /// <exception cref="T:System.ObjectDisposedException">The text reader has been disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The reader is currently in use by a previous read operation. </exception> /// <exception cref="T:System.InvalidOperationException">The reader is currently in use by a previous read operation. </exception>
Task<string> ReadToEndAsync(); Task<string> ReadToEndAsync();
#endif
} }
} }
\ No newline at end of file
...@@ -68,14 +68,6 @@ namespace Leoxia.Abstractions.IO ...@@ -68,14 +68,6 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority> /// <filterpriority>1</filterpriority>
void Flush(); void Flush();
/// <summary>
/// Asynchronously clears all buffers for the current writer and causes any buffered data to be written to the
/// underlying device.
/// </summary>
/// <returns>A task that represents the asynchronous flush operation. </returns>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The writer is currently in use by a previous write operation. </exception>
Task FlushAsync();
/// <summary>Writes the text representation of a Boolean value to the text string or stream.</summary> /// <summary>Writes the text representation of a Boolean value to the text string or stream.</summary>
/// <param name="value">The Boolean value to write. </param> /// <param name="value">The Boolean value to write. </param>
...@@ -244,49 +236,6 @@ namespace Leoxia.Abstractions.IO ...@@ -244,49 +236,6 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority> /// <filterpriority>1</filterpriority>
void Write(string format, params object[] arg); void Write(string format, params object[] arg);
/// <summary>Writes a character to the text string or stream asynchronously.</summary>
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <param name="value">The character to write to the text stream.</param>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteAsync(char value);
/// <summary>Writes a character array to the text string or stream asynchronously.</summary>
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <param name="buffer">
/// The character array to write to the text stream. If <paramref name="buffer" /> is null, nothing is
/// written.
/// </param>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteAsync(char[] buffer);
/// <summary>Writes a subarray of characters to the text string or stream asynchronously. </summary>
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <param name="buffer">The character array to write data from. </param>
/// <param name="index">The character position in the buffer at which to start retrieving data. </param>
/// <param name="count">The number of characters to write. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is null.
/// </exception>
/// <exception cref="T:System.ArgumentException">
/// The <paramref name="index" /> plus <paramref name="count" /> is greater
/// than the buffer length.
/// </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> or <paramref name="count" /> is negative.
/// </exception>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteAsync(char[] buffer, int index, int count);
/// <summary>Writes a string to the text string or stream asynchronously.</summary>
/// <returns>A task that represents the asynchronous write operation. </returns>
/// <param name="value">The string to write. If <paramref name="value" /> is null, nothing is written to the text stream.</param>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteAsync(string value);
/// <summary>Writes a line terminator to the text string or stream.</summary> /// <summary>Writes a line terminator to the text string or stream.</summary>
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.IO.TextWriter" /> is closed. </exception> /// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.IO.TextWriter" /> is closed. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception> /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
...@@ -471,6 +420,61 @@ namespace Leoxia.Abstractions.IO ...@@ -471,6 +420,61 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority> /// <filterpriority>1</filterpriority>
void WriteLine(string format, params object[] arg); void WriteLine(string format, params object[] arg);
#if (!NET40)
/// <summary>
/// Asynchronously clears all buffers for the current writer and causes any buffered data to be written to the
/// underlying device.
/// </summary>
/// <returns>A task that represents the asynchronous flush operation. </returns>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The writer is currently in use by a previous write operation. </exception>
Task FlushAsync();
/// <summary>Writes a character to the text string or stream asynchronously.</summary>
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <param name="value">The character to write to the text stream.</param>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteAsync(char value);
/// <summary>Writes a character array to the text string or stream asynchronously.</summary>
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <param name="buffer">
/// The character array to write to the text stream. If <paramref name="buffer" /> is null, nothing is
/// written.
/// </param>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteAsync(char[] buffer);
/// <summary>Writes a subarray of characters to the text string or stream asynchronously. </summary>
/// <returns>A task that represents the asynchronous write operation.</returns>
/// <param name="buffer">The character array to write data from. </param>
/// <param name="index">The character position in the buffer at which to start retrieving data. </param>
/// <param name="count">The number of characters to write. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is null.
/// </exception>
/// <exception cref="T:System.ArgumentException">
/// The <paramref name="index" /> plus <paramref name="count" /> is greater
/// than the buffer length.
/// </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> or <paramref name="count" /> is negative.
/// </exception>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteAsync(char[] buffer, int index, int count);
/// <summary>Writes a string to the text string or stream asynchronously.</summary>
/// <returns>A task that represents the asynchronous write operation. </returns>
/// <param name="value">The string to write. If <paramref name="value" /> is null, nothing is written to the text stream.</param>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteAsync(string value);
/// <summary>Writes a line terminator asynchronously to the text string or stream.</summary> /// <summary>Writes a line terminator asynchronously to the text string or stream.</summary>
/// <returns>A task that represents the asynchronous write operation. </returns> /// <returns>A task that represents the asynchronous write operation. </returns>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception> /// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
...@@ -519,5 +523,8 @@ namespace Leoxia.Abstractions.IO ...@@ -519,5 +523,8 @@ namespace Leoxia.Abstractions.IO
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception> /// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
/// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception> /// <exception cref="T:System.InvalidOperationException">The text writer is currently in use by a previous write operation. </exception>
Task WriteLineAsync(string value); Task WriteLineAsync(string value);
#endif
} }
} }
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework> <TargetFrameworks>netstandard1.3;net40</TargetFrameworks>
<Company>Leoxia Ltd</Company> <Company>Leoxia Ltd</Company>
<Description>Abstractions for System.IO classes. <Description>Abstractions for System.IO classes.
Provides: Provides:
...@@ -18,7 +18,7 @@ Provides: ...@@ -18,7 +18,7 @@ Provides:
ITextWriter</Description> ITextWriter</Description>
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl> <PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl>
......
...@@ -10,7 +10,7 @@ Provides: ...@@ -10,7 +10,7 @@ Provides:
ITimeProvider</Description> ITimeProvider</Description>
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<PackageReleaseNotes> <PackageReleaseNotes>
</PackageReleaseNotes> </PackageReleaseNotes>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
...@@ -16,7 +16,7 @@ Provides Implementations for: ...@@ -16,7 +16,7 @@ Provides Implementations for:
<RepositoryType>Git</RepositoryType> <RepositoryType>Git</RepositoryType>
<PackageTags>testability abstractions mockability leoxia</PackageTags> <PackageTags>testability abstractions mockability leoxia</PackageTags>
<PackageReleaseNotes /> <PackageReleaseNotes />
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<PackageTagsKey>testability abstractions mockability leoxia</PackageTagsKey> <PackageTagsKey>testability abstractions mockability leoxia</PackageTagsKey>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Product>Lx</Product> <Product>Lx</Product>
<Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description> <Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Product>Lx</Product> <Product>Lx</Product>
<Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description> <Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
......
...@@ -193,6 +193,8 @@ namespace Leoxia.Implementations.IO ...@@ -193,6 +193,8 @@ namespace Leoxia.Implementations.IO
set => Console.InputEncoding = value; set => Console.InputEncoding = value;
} }
#if (!NET40)
/// <summary> /// <summary>
/// Gets a value indicating whether this instance is error redirected. /// Gets a value indicating whether this instance is error redirected.
/// </summary> /// </summary>
...@@ -217,6 +219,8 @@ namespace Leoxia.Implementations.IO ...@@ -217,6 +219,8 @@ namespace Leoxia.Implementations.IO
/// </value> /// </value>
public bool IsOutputRedirected => Console.IsOutputRedirected; public bool IsOutputRedirected => Console.IsOutputRedirected;
#endif
/// <summary>Gets the standard input stream.</summary> /// <summary>Gets the standard input stream.</summary>
/// <returns>A <see cref="T:System.IO.TextReader" /> that represents the standard input stream.</returns> /// <returns>A <see cref="T:System.IO.TextReader" /> that represents the standard input stream.</returns>
/// <filterpriority>1</filterpriority> /// <filterpriority>1</filterpriority>
......
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework> <TargetFrameworks>netstandard1.3;net40</TargetFrameworks>
<Company>Leoxia Ltd</Company> <Company>Leoxia Ltd</Company>
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Product>Leoxia.Implementations.IO</Product> <Product>Leoxia.Implementations.IO</Product>
<Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description> <Description>Implementations for IO Abstractions of Leoxia.Lx.IO.Abstractions</Description>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance> <PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl> <PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl>
......
...@@ -149,6 +149,8 @@ namespace Leoxia.Implementations.IO ...@@ -149,6 +149,8 @@ namespace Leoxia.Implementations.IO
_streamReader = new StreamReader(stream, encoding, detectEncodingFromByteOrderMarks, bufferSize); _streamReader = new StreamReader(stream, encoding, detectEncodingFromByteOrderMarks, bufferSize);
} }
#if (!NET40)
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="T:System.IO.StreamReader" /> class for the specified stream based /// Initializes a new instance of the <see cref="T:System.IO.StreamReader" /> class for the specified stream based
/// on the specified character encoding, byte order mark detection option, and buffer size, and optionally leaves the /// on the specified character encoding, byte order mark detection option, and buffer size, and optionally leaves the
...@@ -180,6 +182,8 @@ namespace Leoxia.Implementations.IO ...@@ -180,6 +182,8 @@ namespace Leoxia.Implementations.IO
leaveOpen); leaveOpen);
} }
#endif
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="StreamReaderAdapter" /> class. /// Initializes a new instance of the <see cref="StreamReaderAdapter" /> class.
/// </summary> /// </summary>
...@@ -271,6 +275,67 @@ namespace Leoxia.Implementations.IO ...@@ -271,6 +275,67 @@ namespace Leoxia.Implementations.IO
return _streamReader.Read(buffer, index, count); return _streamReader.Read(buffer, index, count);
} }
/// <summary>
/// Reads a specified maximum number of characters from the current stream and writes the data to a buffer,
/// beginning at the specified index.
/// </summary>
/// <returns>
/// The number of characters that have been read. The number will be less than or equal to
/// <paramref name="count" />, depending on whether all input characters have been read.
/// </returns>
/// <param name="buffer">
/// When this method returns, contains the specified character array with the values between
/// <paramref name="index" /> and (index + count - 1) replaced by the characters read from the current source.
/// </param>
/// <param name="index">The position in <paramref name="buffer" /> at which to begin writing.</param>
/// <param name="count">The maximum number of characters to read.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is null.
/// </exception>
/// <exception cref="T:System.ArgumentException">
/// The buffer length minus <paramref name="index" /> is less than
/// <paramref name="count" />.
/// </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> or <paramref name="count" /> is negative.
/// </exception>
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.IO.StreamReader" /> is closed. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurred. </exception>
public int ReadBlock(char[] buffer, int index, int count)
{
return _streamReader.ReadBlock(buffer, index, count);
}
/// <summary>Reads a line of characters from the current stream and returns the data as a string.</summary>
/// <returns>The next line from the input stream, or null if the end of the input stream is reached.</returns>
/// <exception cref="T:System.OutOfMemoryException">
/// There is insufficient memory to allocate a buffer for the returned
/// string.
/// </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
public string ReadLine()
{
return _streamReader.ReadLine();
}
/// <summary>Reads all characters from the current position to the end of the stream.</summary>
/// <returns>
/// The rest of the stream as a string, from the current position to the end. If the current position is at the
/// end of the stream, returns an empty string ("").
/// </returns>
/// <exception cref="T:System.OutOfMemoryException">
/// There is insufficient memory to allocate a buffer for the returned
/// string.
/// </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
public string ReadToEnd()
{
return _streamReader.ReadToEnd();
}
#if (!NET40)
/// <summary> /// <summary>
/// Reads a specified maximum number of characters from the current stream asynchronously and writes the data to a /// Reads a specified maximum number of characters from the current stream asynchronously and writes the data to a
/// buffer, beginning at the specified index. /// buffer, beginning at the specified index.
...@@ -307,38 +372,7 @@ namespace Leoxia.Implementations.IO ...@@ -307,38 +372,7 @@ namespace Leoxia.Implementations.IO
{ {
return _streamReader.ReadAsync(buffer, index, count); return _streamReader.ReadAsync(buffer, index, count);
} }
/// <summary>
/// Reads a specified maximum number of characters from the current stream and writes the data to a buffer,
/// beginning at the specified index.
/// </summary>
/// <returns>
/// The number of characters that have been read. The number will be less than or equal to
/// <paramref name="count" />, depending on whether all input characters have been read.
/// </returns>
/// <param name="buffer">
/// When this method returns, contains the specified character array with the values between
/// <paramref name="index" /> and (index + count - 1) replaced by the characters read from the current source.
/// </param>
/// <param name="index">The position in <paramref name="buffer" /> at which to begin writing.</param>
/// <param name="count">The maximum number of characters to read.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="buffer" /> is null.
/// </exception>
/// <exception cref="T:System.ArgumentException">
/// The buffer length minus <paramref name="index" /> is less than
/// <paramref name="count" />.
/// </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">
/// <paramref name="index" /> or <paramref name="count" /> is negative.
/// </exception>
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.IO.StreamReader" /> is closed. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurred. </exception>
public int ReadBlock(char[] buffer, int index, int count)
{
return _streamReader.ReadBlock(buffer, index, count);
}
/// <summary> /// <summary>
/// Reads a specified maximum number of characters from the current stream asynchronously and writes the data to a /// Reads a specified maximum number of characters from the current stream asynchronously and writes the data to a
/// buffer, beginning at the specified index. /// buffer, beginning at the specified index.
...@@ -376,18 +410,6 @@ namespace Leoxia.Implementations.IO ...@@ -376,18 +410,6 @@ namespace Leoxia.Implementations.IO
return _streamReader.ReadBlockAsync(buffer, index, count); return _streamReader.ReadBlockAsync(buffer, index, count);
} }
/// <summary>Reads a line of characters from the current stream and returns the data as a string.</summary>
/// <returns>The next line from the input stream, or null if the end of the input stream is reached.</returns>
/// <exception cref="T:System.OutOfMemoryException">
/// There is insufficient memory to allocate a buffer for the returned
/// string.
/// </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
public string ReadLine()
{
return _streamReader.ReadLine();
}
/// <summary>Reads a line of characters asynchronously from the current stream and returns the data as a string.</summary> /// <summary>Reads a line of characters asynchronously from the current stream and returns the data as a string.</summary>
/// <returns> /// <returns>
/// A task that represents the asynchronous read operation. The value of the Task.Result contains the next line /// A task that represents the asynchronous read operation. The value of the Task.Result contains the next line
...@@ -404,21 +426,6 @@ namespace Leoxia.Implementations.IO ...@@ -404,21 +426,6 @@ namespace Leoxia.Implementations.IO
return _streamReader.ReadLineAsync(); return _streamReader.ReadLineAsync();
} }
/// <summary>Reads all characters from the current position to the end of the stream.</summary>
/// <returns>
/// The rest of the stream as a string, from the current position to the end. If the current position is at the
/// end of the stream, returns an empty string ("").
/// </returns>
/// <exception cref="T:System.OutOfMemoryException">
/// There is insufficient memory to allocate a buffer for the returned
/// string.
/// </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
public string ReadToEnd()
{
return _streamReader.ReadToEnd();
}
/// <summary> /// <summary>
/// Reads all characters from the current position to the end of the stream asynchronously and returns them as one /// Reads all characters from the current position to the end of the stream asynchronously and returns them as one
/// string. /// string.
...@@ -437,5 +444,7 @@ namespace Leoxia.Implementations.IO ...@@ -437,5 +444,7 @@ namespace Leoxia.Implementations.IO
{ {
return _streamReader.ReadToEndAsync(); return _streamReader.ReadToEndAsync();
} }
#endif
} }
} }
\ No newline at end of file
...@@ -131,6 +131,8 @@ namespace Leoxia.Implementations.IO ...@@ -131,6 +131,8 @@ namespace Leoxia.Implementations.IO
return _textReaderImplementation.Read(buffer, index, count); return _textReaderImplementation.Read(buffer, index, count);
} }
#if (!NET40)
/// <summary> /// <summary>
/// Reads a specified maximum number of characters from the current text reader asynchronously and writes the data /// Reads a specified maximum number of characters from the current text reader asynchronously and writes the data
/// to a buffer, beginning at the specified index. /// to a buffer, beginning at the specified index.
...@@ -168,6 +170,8 @@ namespace Leoxia.Implementations.IO ...@@ -168,6 +170,8 @@ namespace Leoxia.Implementations.IO
return _textReaderImplementation.ReadAsync(buffer, index, count); return _textReaderImplementation.ReadAsync(buffer, index, count);
} }
#endif
/// <summary> /// <summary>
/// Reads a specified maximum number of characters from the current text reader and writes the data to a buffer, /// Reads a specified maximum number of characters from the current text reader and writes the data to a buffer,
/// beginning at the specified index. /// beginning at the specified index.
...@@ -201,6 +205,8 @@ namespace Leoxia.Implementations.IO ...@@ -201,6 +205,8 @@ namespace Leoxia.Implementations.IO
return _textReaderImplementation.ReadBlock(buffer, index, count); return _textReaderImplementation.ReadBlock(buffer, index, count);
} }
#if (!NET40)
/// <summary> /// <summary>
/// Reads a specified maximum number of characters from the current text reader asynchronously and writes the data /// Reads a specified maximum number of characters from the current text reader asynchronously and writes the data
/// to a buffer, beginning at the specified index. /// to a buffer, beginning at the specified index.
...@@ -238,6 +244,8 @@ namespace Leoxia.Implementations.IO ...@@ -238,6 +244,8 @@ namespace Leoxia.Implementations.IO
return _textReaderImplementation.ReadBlockAsync(buffer, index, count); return _textReaderImplementation.ReadBlockAsync(buffer, index, count);
} }
#endif
/// <summary>Reads a line of characters from the text reader and returns the data as a string.</summary> /// <summary>Reads a line of characters from the text reader and returns the data as a string.</summary>
/// <returns>The next line from the reader, or null if all characters have been read.</returns> /// <returns>The next line from the reader, or null if all characters have been read.</returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception> /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
...@@ -256,6 +264,8 @@ namespace Leoxia.Implementations.IO ...@@ -256,6 +264,8 @@ namespace Leoxia.Implementations.IO
return _textReaderImplementation.ReadLine(); return _textReaderImplementation.ReadLine();
} }
#if (!NET40)
/// <summary>Reads a line of characters asynchronously and returns the data as a string. </summary> /// <summary>Reads a line of characters asynchronously and returns the data as a string. </summary>
/// <returns> /// <returns>
/// A task that represents the asynchronous read operation. The value of the string parameter /// A task that represents the asynchronous read operation. The value of the string parameter
...@@ -272,6 +282,8 @@ namespace Leoxia.Implementations.IO ...@@ -272,6 +282,8 @@ namespace Leoxia.Implementations.IO
return _textReaderImplementation.ReadLineAsync(); return _textReaderImplementation.ReadLineAsync();
} }
#endif
/// <summary>Reads all characters from the current position to the end of the text reader and returns them as one string.</summary> /// <summary>Reads all characters from the current position to the end of the text reader and returns them as one string.</summary>
/// <returns>A string that contains all characters from the current position to the end of the text reader.</returns> /// <returns>A string that contains all characters from the current position to the end of the text reader.</returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception> /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
...@@ -290,6 +302,8 @@ namespace Leoxia.Implementations.IO ...@@ -290,6 +302,8 @@ namespace Leoxia.Implementations.IO
return _textReaderImplementation.ReadToEnd(); return _textReaderImplementation.ReadToEnd();
} }
#if (!NET40)
/// <summary> /// <summary>
/// Reads all characters from the current position to the end of the text reader asynchronously and returns them /// Reads all characters from the current position to the end of the text reader asynchronously and returns them
/// as one string. /// as one string.
...@@ -308,5 +322,8 @@ namespace Leoxia.Implementations.IO ...@@ -308,5 +322,8 @@ namespace Leoxia.Implementations.IO
{ {
return _textReaderImplementation.ReadToEndAsync(); return _textReaderImplementation.ReadToEndAsync();
} }
#endif
} }
} }
\ No newline at end of file
...@@ -102,6 +102,8 @@ namespace Leoxia.Implementations.IO ...@@ -102,6 +102,8 @@ namespace Leoxia.Implementations.IO
Inner.Flush(); Inner.Flush();
} }
#if (!NET40)
/// <summary> /// <summary>
/// Asynchronously clears all buffers for the current writer and causes any buffered data to be written to the /// Asynchronously clears all buffers for the current writer and causes any buffered data to be written to the
/// underlying device. /// underlying device.
...@@ -113,6 +115,7 @@ namespace Leoxia.Implementations.IO ...@@ -113,6 +115,7 @@ namespace Leoxia.Implementations.IO
{ {
return Inner.FlushAsync(); return Inner.FlushAsync();
} }
#endif
/// <summary>Writes the text representation of a Boolean value to the text string or stream.</summary> /// <summary>Writes the text representation of a Boolean value to the text string or stream.</summary>
/// <param name="value">The Boolean value to write. </param> /// <param name="value">The Boolean value to write. </param>
...@@ -326,6 +329,8 @@ namespace Leoxia.Implementations.IO ...@@ -326,6 +329,8 @@ namespace Leoxia.Implementations.IO
Inner.Write(format, arg); Inner.Write(format, arg);
} }
#if (!NET40)
/// <summary>Writes a character to the text string or stream asynchronously.</summary> /// <summary>Writes a character to the text string or stream asynchronously.</summary>
/// <returns>A task that represents the asynchronous write operation.</returns> /// <returns>A task that represents the asynchronous write operation.</returns>
/// <param name="value">The character to write to the text stream.</param> /// <param name="value">The character to write to the text stream.</param>
...@@ -381,6 +386,9 @@ namespace Leoxia.Implementations.IO ...@@ -381,6 +386,9 @@ namespace Leoxia.Implementations.IO
return Inner.WriteAsync(value); return Inner.WriteAsync(value);
} }
#endif
/// <summary>Writes a line terminator to the text string or stream.</summary> /// <summary>Writes a line terminator to the text string or stream.</summary>
/// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.IO.TextWriter" /> is closed. </exception> /// <exception cref="T:System.ObjectDisposedException">The <see cref="T:System.IO.TextWriter" /> is closed. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception> /// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
...@@ -613,6 +621,8 @@ namespace Leoxia.Implementations.IO ...@@ -613,6 +621,8 @@ namespace Leoxia.Implementations.IO
Inner.WriteLine(format, arg); Inner.WriteLine(format, arg);
} }
#if (!NET40)
/// <summary>Writes a line terminator asynchronously to the text string or stream.</summary> /// <summary>Writes a line terminator asynchronously to the text string or stream.</summary>
/// <returns>A task that represents the asynchronous write operation. </returns> /// <returns>A task that represents the asynchronous write operation. </returns>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception> /// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
...@@ -676,5 +686,7 @@ namespace Leoxia.Implementations.IO ...@@ -676,5 +686,7 @@ namespace Leoxia.Implementations.IO
{ {
return Inner.WriteLineAsync(value); return Inner.WriteLineAsync(value);
} }
#endif
} }
} }
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework> <TargetFramework>netstandard1.0</TargetFramework>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Company>Leoxia Ltd</Company> <Company>Leoxia Ltd</Company>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
......
...@@ -8,7 +8,7 @@ Provides Implementations for: ...@@ -8,7 +8,7 @@ Provides Implementations for:
IEnvironment</Description> IEnvironment</Description>
<Authors>Leoxia</Authors> <Authors>Leoxia</Authors>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright> <Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
<Version>1.3.2.0</Version> <Version>1.4.1.0</Version>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl> <PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl> <PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl>
<PackageIconUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/images/icon.png</PackageIconUrl> <PackageIconUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/images/icon.png</PackageIconUrl>
......