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)
240240 SourceArchiveDir = RequireEnvironmentVariable ( EnvVars . SourceArchiveDir ( this . Options . Language ) ) ;
241241 DiagnosticsDir = RequireEnvironmentVariable ( EnvVars . DiagnosticDir ( this . Options . Language ) ) ;
242242
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") ) ;
244244 }
245245
246246 /// <summary>
Original file line number Diff line number Diff line change @@ -157,18 +157,10 @@ public sealed class DiagnosticsStream : IDisposable
157157 /// Initialises a new <see cref="DiagnosticsStream" /> for a file at <paramref name="path" />.
158158 /// </summary>
159159 /// <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 )
165161 {
166- var stream = File . CreateText ( path ) ;
167- return new DiagnosticsStream ( stream ) ;
168- }
162+ this . writer = File . CreateText ( path ) ;
169163
170- public DiagnosticsStream ( StreamWriter streamWriter )
171- {
172164 var contractResolver = new DefaultContractResolver
173165 {
174166 NamingStrategy = new CamelCaseNamingStrategy ( )
@@ -179,8 +171,6 @@ public DiagnosticsStream(StreamWriter streamWriter)
179171 ContractResolver = contractResolver ,
180172 NullValueHandling = NullValueHandling . Ignore
181173 } ;
182-
183- writer = streamWriter ;
184174 }
185175
186176 /// <summary>
You can’t perform that action at this time.
0 commit comments