File tree Expand file tree Collapse file tree 2 files changed +3
-13
lines changed
autobuilder/Semmle.Autobuild.Shared Expand file tree Collapse file tree 2 files changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ protected Autobuilder(IBuildActions actions, TAutobuildOptions options)
240
240
SourceArchiveDir = RequireEnvironmentVariable ( EnvVars . SourceArchiveDir ( this . Options . Language ) ) ;
241
241
DiagnosticsDir = RequireEnvironmentVariable ( EnvVars . DiagnosticDir ( this . Options . Language ) ) ;
242
242
243
- this . diagnostics = DiagnosticsStream . ForFile ( Path . Combine ( DiagnosticsDir , $ "autobuilder-{ DateTime . UtcNow : yyyyMMddHHmm} .jsonc") ) ;
243
+ this . diagnostics = new DiagnosticsStream ( Path . Combine ( DiagnosticsDir , $ "autobuilder-{ DateTime . UtcNow : yyyyMMddHHmm} .jsonc") ) ;
244
244
}
245
245
246
246
/// <summary>
Original file line number Diff line number Diff line change @@ -157,18 +157,10 @@ public sealed class DiagnosticsStream : IDisposable
157
157
/// Initialises a new <see cref="DiagnosticsStream" /> for a file at <paramref name="path" />.
158
158
/// </summary>
159
159
/// <param name="path">The path to the file that should be created.</param>
160
- /// <returns>
161
- /// A <see cref="DiagnosticsStream" /> object which allows diagnostics to be
162
- /// written to a file at <paramname name="path" />.
163
- /// </returns>
164
- public static DiagnosticsStream ForFile ( string path )
160
+ public DiagnosticsStream ( string path )
165
161
{
166
- var stream = File . CreateText ( path ) ;
167
- return new DiagnosticsStream ( stream ) ;
168
- }
162
+ this . writer = File . CreateText ( path ) ;
169
163
170
- public DiagnosticsStream ( StreamWriter streamWriter )
171
- {
172
164
var contractResolver = new DefaultContractResolver
173
165
{
174
166
NamingStrategy = new CamelCaseNamingStrategy ( )
@@ -179,8 +171,6 @@ public DiagnosticsStream(StreamWriter streamWriter)
179
171
ContractResolver = contractResolver ,
180
172
NullValueHandling = NullValueHandling . Ignore
181
173
} ;
182
-
183
- writer = streamWriter ;
184
174
}
185
175
186
176
/// <summary>
You can’t perform that action at this time.
0 commit comments