• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MeltyPlayer / MeltyTool / 21307366492

24 Jan 2026 02:08AM UTC coverage: 42.247%. Remained the same
21307366492

push

github

MeltyPlayer
Used file-scoped namespaces everywhere.

6865 of 18398 branches covered (37.31%)

Branch coverage included in aggregate %.

3 of 874 new or added lines in 22 files covered. (0.34%)

58 existing lines in 15 files now uncovered.

29415 of 67478 relevant lines covered (43.59%)

64428.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/FinModelUtility/ImaginaryFileSystem/ImaginaryFile.Async.cs
1
#if FEATURE_ASYNC_FILE
2
using System.Runtime.CompilerServices;
3
using System.Text;
4

5

6
namespace System.IO.Abstractions.TestingHelpers;
7

8
partial class ImaginaryFile
9
{
10
#if FEATURE_FILE_SPAN
11
  /// <inheritdoc cref="IFile.AppendAllBytesAsync(string,byte[],CancellationToken)"/>
12
  public override Task AppendAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken
13
                                               = default)
NEW
14
  {
×
NEW
15
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
16
    AppendAllBytes(path, bytes);
×
NEW
17
    return Task.CompletedTask;
×
NEW
18
  }
×
19

20
  /// <inheritdoc cref="IFile.AppendAllBytesAsync(string,ReadOnlyMemory{byte},CancellationToken)"/>
21
  public override Task AppendAllBytesAsync(string path, ReadOnlyMemory<byte> bytes, CancellationToken cancellationToken
22
                                               = default)
NEW
23
  {
×
NEW
24
    return AppendAllBytesAsync(path, bytes.ToArray(), cancellationToken);
×
NEW
25
  }
×
26
#endif
27
  /// <inheritdoc />
28
  public override Task AppendAllLinesAsync(string path, IEnumerable<string> contents, CancellationToken cancellationToken
29
                                               = default) =>
NEW
30
      AppendAllLinesAsync(path, contents, ImaginaryFileData.DefaultEncoding, cancellationToken);
×
31

32
  /// <inheritdoc />
33
  public override Task AppendAllLinesAsync(string path, IEnumerable<string> contents, Encoding encoding, CancellationToken cancellationToken
34
                                               = default)
NEW
35
  {
×
NEW
36
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
37
    AppendAllLines(path, contents, encoding);
×
NEW
38
    return Task.CompletedTask;
×
NEW
39
  }
×
40

41
  /// <inheritdoc />
42
  public override Task AppendAllTextAsync(string path, string contents, CancellationToken cancellationToken
43
                                              = default) =>
NEW
44
      AppendAllTextAsync(path, contents, ImaginaryFileData.DefaultEncoding, cancellationToken);
×
45

46

47
  /// <inheritdoc />
48
  public override Task AppendAllTextAsync(string path, string contents, Encoding encoding, CancellationToken cancellationToken
49
                                              = default)
NEW
50
  {
×
NEW
51
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
52
    AppendAllText(path, contents, encoding);
×
NEW
53
    return Task.CompletedTask;
×
NEW
54
  }
×
55
        
56
#if FEATURE_FILE_SPAN
57
  /// <inheritdoc cref="IFile.AppendAllTextAsync(string,ReadOnlyMemory{char},CancellationToken)"/>
58
  public override Task AppendAllTextAsync(string path, ReadOnlyMemory<char> contents, CancellationToken cancellationToken
59
                                              = default)
NEW
60
  {
×
NEW
61
    return AppendAllTextAsync(path, contents.ToString(), cancellationToken);
×
NEW
62
  }
×
63

64
  /// <inheritdoc cref="IFile.AppendAllTextAsync(string,ReadOnlyMemory{char},Encoding,CancellationToken)"/>
65
  public override Task AppendAllTextAsync(string path, ReadOnlyMemory<char> contents, Encoding encoding,
66
                                          CancellationToken cancellationToken = default)
NEW
67
  {
×
NEW
68
    return AppendAllTextAsync(path, contents.ToString(), encoding, cancellationToken);
×
NEW
69
  }
×
70
#endif
71

72
  /// <inheritdoc />
73
  public override Task<byte[]> ReadAllBytesAsync(string path, CancellationToken cancellationToken
74
                                                     = default)
NEW
75
  {
×
NEW
76
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
77
    return Task.FromResult(ReadAllBytes(path));
×
NEW
78
  }
×
79

80
  /// <inheritdoc />
81
  public override Task<string[]> ReadAllLinesAsync(string path, CancellationToken cancellationToken
82
                                                       = default) =>
NEW
83
      ReadAllLinesAsync(path, ImaginaryFileData.DefaultEncoding, cancellationToken);
×
84

85
  /// <inheritdoc />
86

87
  public override Task<string[]> ReadAllLinesAsync(string path, Encoding encoding, CancellationToken cancellationToken
88
                                                       = default)
NEW
89
  {
×
NEW
90
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
91
    return Task.FromResult(ReadAllLines(path, encoding));
×
NEW
92
  }
×
93

94
  /// <inheritdoc />
95
  public override Task<string> ReadAllTextAsync(string path, CancellationToken cancellationToken
96
                                                    = default) =>
NEW
97
      ReadAllTextAsync(path, ImaginaryFileData.DefaultEncoding, cancellationToken);
×
98

99

100
  /// <inheritdoc />
101
  public override Task<string> ReadAllTextAsync(string path, Encoding encoding, CancellationToken cancellationToken
102
                                                    = default)
NEW
103
  {
×
NEW
104
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
105
    return Task.FromResult(ReadAllText(path, encoding));
×
NEW
106
  }
×
107

108
#if FEATURE_READ_LINES_ASYNC
109
  /// <inheritdoc />
110
  public override IAsyncEnumerable<string> ReadLinesAsync(string path, CancellationToken cancellationToken
111
      = default) =>
NEW
112
      ReadLinesAsync(path, ImaginaryFileData.DefaultEncoding, cancellationToken);
×
113

114
  /// <inheritdoc />
115
  public override async IAsyncEnumerable<string> ReadLinesAsync(string path, Encoding encoding,
116
    [EnumeratorCancellation] CancellationToken cancellationToken =
117
        default)
NEW
118
  {
×
NEW
119
    var lines =
×
NEW
120
        await ReadAllLinesAsync(path, encoding, cancellationToken);
×
NEW
121
    foreach (var line in lines)
×
NEW
122
      yield return line;
×
NEW
123
  }
×
124
#endif
125

126
  /// <inheritdoc />
127
  public override Task WriteAllBytesAsync(string path, byte[] bytes, CancellationToken cancellationToken
128
                                              = default)
NEW
129
  {
×
NEW
130
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
131
    WriteAllBytes(path, bytes);
×
NEW
132
    return Task.CompletedTask;
×
NEW
133
  }
×
134
        
135
#if FEATURE_FILE_SPAN
136
  /// <inheritdoc cref="IFile.WriteAllBytesAsync(string,ReadOnlyMemory{byte},CancellationToken)"/>
137
  public override Task WriteAllBytesAsync(string path, ReadOnlyMemory<byte> bytes, CancellationToken cancellationToken
138
                                              = default)
NEW
139
  {
×
NEW
140
    return WriteAllBytesAsync(path, bytes.ToArray(), cancellationToken);
×
NEW
141
  }
×
142
#endif
143

144
  /// <inheritdoc />
145
  public override Task WriteAllLinesAsync(string path, IEnumerable<string> contents, CancellationToken cancellationToken
146
                                              = default) =>
NEW
147
      WriteAllLinesAsync(path, contents, ImaginaryFileData.DefaultEncoding, cancellationToken);
×
148

149
  /// <inheritdoc />
150
  public override Task WriteAllLinesAsync(string path, IEnumerable<string> contents, Encoding encoding, CancellationToken cancellationToken
151
                                              = default)
NEW
152
  {
×
NEW
153
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
154
    WriteAllLines(path, contents, encoding);
×
NEW
155
    return Task.CompletedTask;
×
NEW
156
  }
×
157

158
  /// <inheritdoc />
159
  public override Task WriteAllTextAsync(string path, string contents, CancellationToken cancellationToken
160
                                             = default) =>
NEW
161
      WriteAllTextAsync(path, contents, ImaginaryFileData.DefaultEncoding, cancellationToken);
×
162

163
  /// <inheritdoc />
164
  public override Task WriteAllTextAsync(string path, string contents, Encoding encoding, CancellationToken cancellationToken
165
                                             = default)
NEW
166
  {
×
NEW
167
    cancellationToken.ThrowIfCancellationRequested();
×
NEW
168
    WriteAllText(path, contents, encoding);
×
NEW
169
    return Task.CompletedTask;
×
NEW
170
  }
×
171
        
172
#if FEATURE_FILE_SPAN
173
  /// <inheritdoc cref="IFile.WriteAllTextAsync(string,ReadOnlyMemory{char},CancellationToken)"/>
174
  public override Task WriteAllTextAsync(string path, ReadOnlyMemory<char> contents, CancellationToken cancellationToken
175
                                             = default)
NEW
176
  {
×
NEW
177
    return WriteAllTextAsync(path, contents.ToString(), cancellationToken);
×
NEW
178
  }
×
179

180
  /// <inheritdoc cref="IFile.WriteAllTextAsync(string,ReadOnlyMemory{char},Encoding,CancellationToken)"/>
181
  public override Task WriteAllTextAsync(string path, ReadOnlyMemory<char> contents, Encoding encoding,
182
                                         CancellationToken cancellationToken = default)
NEW
183
  {
×
NEW
184
    return WriteAllTextAsync(path, contents.ToString(), encoding, cancellationToken);
×
NEW
185
  }
×
186
#endif
187
}
188

189
#endif
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc