Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Leoxia.Abstractions
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
leoxia
Leoxia.Abstractions
Compare Revisions
415226de89f58efde4e6f310d6b39c6072bcdd89...37cbc1e63fa1d2b92941e2e472ddbe295ac2f5b4
Source
37cbc1e63fa1d2b92941e2e472ddbe295ac2f5b4
Select Git revision
...
Target
415226de89f58efde4e6f310d6b39c6072bcdd89
Select Git revision
Compare
Commits (4)
Make Leoxia abstraction IO support for .NET 4.0
· b0934547
Fabien Bondi
authored
May 09, 2019
b0934547
Increase version minor
· e9e4305b
Fabien Bondi
authored
May 09, 2019
e9e4305b
Merge branch 'master' of github.com:leoxialtd/Leoxia.Abstractions
· ea44c54a
Fabien Bondi
authored
Nov 21, 2019
ea44c54a
Increase version for patch
· 37cbc1e6
Fabien Bondi
authored
Nov 21, 2019
37cbc1e6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
312 additions
and
198 deletions
+312
-198
Leoxia.Abstractions.sln.DotSettings
Leoxia.Abstractions.sln.DotSettings
+31
-0
src/Leoxia.Abstractions.Diagnostics/Leoxia.Abstractions.Diagnostics.csproj
...ctions.Diagnostics/Leoxia.Abstractions.Diagnostics.csproj
+1
-1
src/Leoxia.Abstractions.IO.FileSystem.DriveInfo/Leoxia.Abstractions.IO.FileSystem.DriveInfo.csproj
...veInfo/Leoxia.Abstractions.IO.FileSystem.DriveInfo.csproj
+1
-1
src/Leoxia.Abstractions.IO.FileSystem.Watcher/Leoxia.Abstractions.IO.FileSystem.Watcher.csproj
....Watcher/Leoxia.Abstractions.IO.FileSystem.Watcher.csproj
+1
-1
src/Leoxia.Abstractions.IO/IConsole.cs
src/Leoxia.Abstractions.IO/IConsole.cs
+4
-0
src/Leoxia.Abstractions.IO/ITextReader.cs
src/Leoxia.Abstractions.IO/ITextReader.cs
+17
-0
src/Leoxia.Abstractions.IO/ITextWriter.cs
src/Leoxia.Abstractions.IO/ITextWriter.cs
+58
-51
src/Leoxia.Abstractions.IO/Leoxia.Abstractions.IO.csproj
src/Leoxia.Abstractions.IO/Leoxia.Abstractions.IO.csproj
+2
-2
src/Leoxia.Abstractions/Leoxia.Abstractions.csproj
src/Leoxia.Abstractions/Leoxia.Abstractions.csproj
+1
-1
src/Leoxia.Implementations.Diagnostics/Leoxia.Implementations.Diagnostics.csproj
...ons.Diagnostics/Leoxia.Implementations.Diagnostics.csproj
+1
-1
src/Leoxia.Implementations.IO.FileSystem.DriveInfo/Leoxia.Implementations.IO.FileSystem.DriveInfo.csproj
...nfo/Leoxia.Implementations.IO.FileSystem.DriveInfo.csproj
+1
-1
src/Leoxia.Implementations.IO.FileSystem.Watcher/Leoxia.Implementations.IO.FileSystem.Watcher.csproj
...tcher/Leoxia.Implementations.IO.FileSystem.Watcher.csproj
+1
-1
src/Leoxia.Implementations.IO/ConsoleAdapter.cs
src/Leoxia.Implementations.IO/ConsoleAdapter.cs
+4
-0
src/Leoxia.Implementations.IO/Leoxia.Implementations.IO.csproj
...eoxia.Implementations.IO/Leoxia.Implementations.IO.csproj
+2
-2
src/Leoxia.Implementations.IO/StreamReaderAdapter.cs
src/Leoxia.Implementations.IO/StreamReaderAdapter.cs
+68
-59
src/Leoxia.Implementations.IO/StreamWriterAdapter.cs
src/Leoxia.Implementations.IO/StreamWriterAdapter.cs
+88
-75
src/Leoxia.Implementations.IO/TextReaderAdapter.cs
src/Leoxia.Implementations.IO/TextReaderAdapter.cs
+17
-0
src/Leoxia.Implementations.IO/TextWriterAdapter.cs
src/Leoxia.Implementations.IO/TextWriterAdapter.cs
+12
-0
src/Leoxia.Implementations.Time/Leoxia.Implementations.Time.csproj
...a.Implementations.Time/Leoxia.Implementations.Time.csproj
+1
-1
src/Leoxia.Implementations/Leoxia.Implementations.csproj
src/Leoxia.Implementations/Leoxia.Implementations.csproj
+1
-1
No files found.
Leoxia.Abstractions.sln.DotSettings
0 → 100644
View file @
37cbc1e6
<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">--------------------------------------------------------------------------------------------------------------------
<copyright file="$FILENAME$" company="Leoxia Ltd">
Copyright © 2011-$CURRENT_YEAR$ Leoxia Ltd
</copyright>

.NET Software Development
https://www.leoxia.com
Build. Tomorrow. Together

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
--------------------------------------------------------------------------------------------------------------------</s:String></wpf:ResourceDictionary>
\ No newline at end of file
src/Leoxia.Abstractions.Diagnostics/Leoxia.Abstractions.Diagnostics.csproj
View file @
37cbc1e6
...
...
@@ -16,7 +16,7 @@ Provides:
<RepositoryType>Git</RepositoryType>
<PackageTags>testability abstractions mockability leoxia</PackageTags>
<PackageReleaseNotes />
<Version>1.
3.2
.0</Version>
<Version>1.
4.1
.0</Version>
<PackageTagsKey>testability abstractions mockability leoxia</PackageTagsKey>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
...
...
src/Leoxia.Abstractions.IO.FileSystem.DriveInfo/Leoxia.Abstractions.IO.FileSystem.DriveInfo.csproj
View file @
37cbc1e6
...
...
@@ -7,7 +7,7 @@ Provides:
IDriveInfo
IDriveInfoFactory</Description>
<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>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
...
...
src/Leoxia.Abstractions.IO.FileSystem.Watcher/Leoxia.Abstractions.IO.FileSystem.Watcher.csproj
View file @
37cbc1e6
...
...
@@ -6,7 +6,7 @@
Provides:
IFileSystemWatcher</Description>
<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>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
...
...
src/Leoxia.Abstractions.IO/IConsole.cs
View file @
37cbc1e6
...
...
@@ -162,6 +162,8 @@ namespace Leoxia.Abstractions.IO
/// </value>
Encoding
InputEncoding
{
get
;
set
;
}
#if (!NET40)
/// <summary>
/// Gets a value indicating whether this instance is error redirected.
/// </summary>
...
...
@@ -186,6 +188,8 @@ namespace Leoxia.Abstractions.IO
/// </value>
bool
IsOutputRedirected
{
get
;
}
#endif
/// <summary>
/// Gets a value indicating whether [key available].
/// </summary>
...
...
src/Leoxia.Abstractions.IO/ITextReader.cs
View file @
37cbc1e6
...
...
@@ -102,6 +102,8 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority>
int
Read
(
char
[]
buffer
,
int
index
,
int
count
);
#if (!NET40)
/// <summary>
/// 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.
...
...
@@ -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>
Task
<
int
>
ReadAsync
(
char
[]
buffer
,
int
index
,
int
count
);
#endif
/// <summary>
/// Reads a specified maximum number of characters from the current text reader and writes the data to a buffer,
/// beginning at the specified index.
...
...
@@ -166,6 +170,8 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>2</filterpriority>
int
ReadBlock
(
char
[]
buffer
,
int
index
,
int
count
);
#if (!NET40)
/// <summary>
/// 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.
...
...
@@ -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>
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>
/// <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>
...
...
@@ -215,6 +223,8 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority>
string
ReadLine
();
#if (!NET40)
/// <summary>Reads a line of characters asynchronously and returns the data as a string. </summary>
/// <returns>
/// A task that represents the asynchronous read operation. The value of the string parameter
...
...
@@ -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>
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>
/// <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>
...
...
@@ -243,6 +255,8 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority>
string
ReadToEnd
();
#if (!NET40)
/// <summary>
/// Reads all characters from the current position to the end of the text reader asynchronously and returns them
/// as one string.
...
...
@@ -258,5 +272,8 @@ namespace Leoxia.Abstractions.IO
/// <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>
Task
<
string
>
ReadToEndAsync
();
#endif
}
}
\ No newline at end of file
src/Leoxia.Abstractions.IO/ITextWriter.cs
View file @
37cbc1e6
...
...
@@ -68,14 +68,6 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority>
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>
/// <param name="value">The Boolean value to write. </param>
...
...
@@ -244,49 +236,6 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority>
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>
/// <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>
...
...
@@ -471,6 +420,61 @@ namespace Leoxia.Abstractions.IO
/// <filterpriority>1</filterpriority>
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>
/// <returns>A task that represents the asynchronous write operation. </returns>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
...
...
@@ -519,5 +523,8 @@ namespace Leoxia.Abstractions.IO
/// <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
WriteLineAsync
(
string
value
);
#endif
}
}
\ No newline at end of file
src/Leoxia.Abstractions.IO/Leoxia.Abstractions.IO.csproj
View file @
37cbc1e6
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework
>netstandard1.3</TargetFramework
>
<TargetFramework
s>netstandard1.3;net40</TargetFrameworks
>
<Company>Leoxia Ltd</Company>
<Description>Abstractions for System.IO classes.
Provides:
...
...
@@ -18,7 +18,7 @@ Provides:
ITextWriter</Description>
<Authors>Leoxia</Authors>
<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>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl>
...
...
src/Leoxia.Abstractions/Leoxia.Abstractions.csproj
View file @
37cbc1e6
...
...
@@ -10,7 +10,7 @@ Provides:
ITimeProvider</Description>
<Authors>Leoxia</Authors>
<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>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
...
...
src/Leoxia.Implementations.Diagnostics/Leoxia.Implementations.Diagnostics.csproj
View file @
37cbc1e6
...
...
@@ -16,7 +16,7 @@ Provides Implementations for:
<RepositoryType>Git</RepositoryType>
<PackageTags>testability abstractions mockability leoxia</PackageTags>
<PackageReleaseNotes />
<Version>1.
3.2
.0</Version>
<Version>1.
4.1
.0</Version>
<PackageTagsKey>testability abstractions mockability leoxia</PackageTagsKey>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
...
...
src/Leoxia.Implementations.IO.FileSystem.DriveInfo/Leoxia.Implementations.IO.FileSystem.DriveInfo.csproj
View file @
37cbc1e6
...
...
@@ -5,7 +5,7 @@
<Authors>Leoxia</Authors>
<Product>Lx</Product>
<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>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
...
...
src/Leoxia.Implementations.IO.FileSystem.Watcher/Leoxia.Implementations.IO.FileSystem.Watcher.csproj
View file @
37cbc1e6
...
...
@@ -5,7 +5,7 @@
<Authors>Leoxia</Authors>
<Product>Lx</Product>
<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>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
...
...
src/Leoxia.Implementations.IO/ConsoleAdapter.cs
View file @
37cbc1e6
...
...
@@ -193,6 +193,8 @@ namespace Leoxia.Implementations.IO
set
=>
Console
.
InputEncoding
=
value
;
}
#if (!NET40)
/// <summary>
/// Gets a value indicating whether this instance is error redirected.
/// </summary>
...
...
@@ -217,6 +219,8 @@ namespace Leoxia.Implementations.IO
/// </value>
public
bool
IsOutputRedirected
=>
Console
.
IsOutputRedirected
;
#endif
/// <summary>Gets the standard input stream.</summary>
/// <returns>A <see cref="T:System.IO.TextReader" /> that represents the standard input stream.</returns>
/// <filterpriority>1</filterpriority>
...
...
src/Leoxia.Implementations.IO/Leoxia.Implementations.IO.csproj
View file @
37cbc1e6
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework
>netstandard1.3</TargetFramework
>
<TargetFramework
s>netstandard1.3;net40</TargetFrameworks
>
<Company>Leoxia Ltd</Company>
<Authors>Leoxia</Authors>
<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.2
.0</Version>
<Version>1.
4.1
.0</Version>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseUrl>https://gitlab.leoxia.com/leoxia/Leoxia.Abstractions/raw/master/LICENSE</PackageLicenseUrl>
<PackageProjectUrl>https://www.leoxia.com</PackageProjectUrl>
...
...
src/Leoxia.Implementations.IO/StreamReaderAdapter.cs
View file @
37cbc1e6
...
...
@@ -149,6 +149,8 @@ namespace Leoxia.Implementations.IO
_streamReader
=
new
StreamReader
(
stream
,
encoding
,
detectEncodingFromByteOrderMarks
,
bufferSize
);
}
#if (!NET40)
/// <summary>
/// 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
...
...
@@ -180,6 +182,8 @@ namespace Leoxia.Implementations.IO
leaveOpen
);
}
#endif
/// <summary>
/// Initializes a new instance of the <see cref="StreamReaderAdapter" /> class.
/// </summary>
...
...
@@ -271,6 +275,67 @@ namespace Leoxia.Implementations.IO
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>
/// Reads a specified maximum number of characters from the current stream asynchronously and writes the data to a
/// buffer, beginning at the specified index.
...
...
@@ -307,38 +372,7 @@ namespace Leoxia.Implementations.IO
{
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>
/// Reads a specified maximum number of characters from the current stream asynchronously and writes the data to a
/// buffer, beginning at the specified index.
...
...
@@ -376,18 +410,6 @@ namespace Leoxia.Implementations.IO
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>
/// <returns>
/// 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
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>
/// Reads all characters from the current position to the end of the stream asynchronously and returns them as one
/// string.
...
...
@@ -437,5 +444,7 @@ namespace Leoxia.Implementations.IO
{
return
_streamReader
.
ReadToEndAsync
();
}
#endif
}
}
\ No newline at end of file
src/Leoxia.Implementations.IO/StreamWriterAdapter.cs
View file @
37cbc1e6
This diff is collapsed.
Click to expand it.
src/Leoxia.Implementations.IO/TextReaderAdapter.cs
View file @
37cbc1e6
...
...
@@ -131,6 +131,8 @@ namespace Leoxia.Implementations.IO
return
_textReaderImplementation
.
Read
(
buffer
,
index
,
count
);
}
#
if
(!
NET40
)
/// <summary>
/// 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.
...
...
@@ -168,6 +170,8 @@ namespace Leoxia.Implementations.IO
return
_textReaderImplementation
.
ReadAsync
(
buffer
,
index
,
count
);
}
#
endif
/// <summary>
/// Reads a specified maximum number of characters from the current text reader and writes the data to a buffer,
/// beginning at the specified index.
...
...
@@ -201,6 +205,8 @@ namespace Leoxia.Implementations.IO
return
_textReaderImplementation
.
ReadBlock
(
buffer
,
index
,
count
);
}
#if (!NET40)
/// <summary>
/// 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.
...
...
@@ -238,6 +244,8 @@ namespace Leoxia.Implementations.IO
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>
/// <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>
...
...
@@ -256,6 +264,8 @@ namespace Leoxia.Implementations.IO
return
_textReaderImplementation
.
ReadLine
();
}
#if (!NET40)
/// <summary>Reads a line of characters asynchronously and returns the data as a string. </summary>
/// <returns>
/// A task that represents the asynchronous read operation. The value of the string parameter
...
...
@@ -272,6 +282,8 @@ namespace Leoxia.Implementations.IO
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>
/// <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>
...
...
@@ -290,6 +302,8 @@ namespace Leoxia.Implementations.IO
return
_textReaderImplementation
.
ReadToEnd
();
}
#if (!NET40)
/// <summary>
/// Reads all characters from the current position to the end of the text reader asynchronously and returns them
/// as one string.
...
...
@@ -308,5 +322,8 @@ namespace Leoxia.Implementations.IO
{
return
_textReaderImplementation
.
ReadToEndAsync
();
}
#endif
}
}
\ No newline at end of file
src/Leoxia.Implementations.IO/TextWriterAdapter.cs
View file @
37cbc1e6
...
...
@@ -102,6 +102,8 @@ namespace Leoxia.Implementations.IO
Inner
.
Flush
();
}
#
if
(!
NET40
)
/// <summary>
/// Asynchronously clears all buffers for the current writer and causes any buffered data to be written to the
/// underlying device.
...
...
@@ -113,6 +115,7 @@ namespace Leoxia.Implementations.IO
{
return
Inner
.
FlushAsync
();
}
#
endif
/// <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>
...
...
@@ -326,6 +329,8 @@ namespace Leoxia.Implementations.IO
Inner
.
Write
(
format
,
arg
);
}
#if (!NET40)
/// <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>
...
...
@@ -381,6 +386,9 @@ namespace Leoxia.Implementations.IO
return
Inner
.
WriteAsync
(
value
);
}
#
endif
/// <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.IO.IOException">An I/O error occurs. </exception>
...
...
@@ -613,6 +621,8 @@ namespace Leoxia.Implementations.IO
Inner
.
WriteLine
(
format
,
arg
);
}
#
if
(!
NET40
)
/// <summary>Writes a line terminator asynchronously to the text string or stream.</summary>
/// <returns>A task that represents the asynchronous write operation. </returns>
/// <exception cref="T:System.ObjectDisposedException">The text writer is disposed.</exception>
...
...
@@ -676,5 +686,7 @@ namespace Leoxia.Implementations.IO
{
return
Inner
.
WriteLineAsync
(
value
);
}
#
endif
}
}
\ No newline at end of file
src/Leoxia.Implementations.Time/Leoxia.Implementations.Time.csproj
View file @
37cbc1e6
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard1.0</TargetFramework>
<Version>1.
3.2
.0</Version>
<Version>1.
4.1
.0</Version>
<Authors>Leoxia</Authors>
<Company>Leoxia Ltd</Company>
<Copyright>Copyright (c) Leoxia Ltd 2011 - 2017. All Rights reserved.</Copyright>
...
...
src/Leoxia.Implementations/Leoxia.Implementations.csproj
View file @
37cbc1e6
...
...
@@ -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.2
.0</Version>
<Version>1.
4.1
.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>
...
...