FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
RoyalLibrary/src/RoyalLibrary/StreamReaderExtensions.cs at master · ByteDecoder/RoyalLibrary · GitHub
ByteDecoder
RoyalLibrary
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
RoyalLibrary
/
src
/
RoyalLibrary
/
StreamReaderExtensions.cs
Copy path
More file actions
More file actions
Latest commit
History
History
History
27 lines (24 loc) · 688 Bytes
Breadcrumbs
RoyalLibrary
/
src
/
RoyalLibrary
/
StreamReaderExtensions.cs
Copy path
File metadata and controls
27 lines (24 loc) · 688 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using
ByteDecoder
.
Common
.
GuardClauses
;
using
System
.
Collections
.
Generic
;
using
System
.
IO
;
namespace
ByteDecoder
.
RoyalLibrary
{
/// <summary>
///
/// </summary>
public
static
class
StreamReaderExtensions
{
/// <summary>
/// Deferred execution for an StreamReader source
/// </summary>
/// <param name="source"></param>
/// <returns></returns>
public
static
IEnumerable
<
string
>
Lines
(
this
StreamReader
source
)
{
Guard
.
Break
.
IfArgumentIsNull
(
source
,
nameof
(
source
)
)
;
string
line
;
while
(
(
line
=
source
.
ReadLine
(
)
)
!=
null
)
yield
return
line
;
}
}
}
Back
|
FazBrowse Home
|
New Git URL