File tree Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Expand file tree Collapse file tree 2 files changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -172,12 +172,11 @@ public int ProcessId
172172 /// <summary>
173173 /// Gets a value indicating whether the service is responding to HTTP requests.
174174 /// </summary>
175- [ Obsolete ( "Use the asynchronous method IsInitializedAsync" ) ]
176175 protected virtual bool IsInitialized
177176 {
178177 get
179178 {
180- return Task . Run ( async ( ) => await IsInitializedAsync ( ) ) . GetAwaiter ( ) . GetResult ( ) ;
179+ return Task . Run ( this . IsInitializedAsync ) . GetAwaiter ( ) . GetResult ( ) ;
181180 }
182181 }
183182
@@ -226,10 +225,9 @@ public void Dispose()
226225 /// <summary>
227226 /// Starts the DriverService if it is not already running.
228227 /// </summary>
229- [ Obsolete ( "Use the asynchronous method StartAsync" ) ]
230228 public void Start ( )
231229 {
232- Task . Run ( async ( ) => await StartAsync ( ) ) . GetAwaiter ( ) . GetResult ( ) ;
230+ Task . Run ( this . StartAsync ) . GetAwaiter ( ) . GetResult ( ) ;
233231 }
234232
235233 /// <summary>
@@ -300,7 +298,7 @@ protected virtual void Dispose(bool disposing)
300298 {
301299 if ( disposing )
302300 {
303- Task . Run ( ( ) => this . StopAsync ( ) ) . GetAwaiter ( ) . GetResult ( ) ;
301+ Task . Run ( this . StopAsync ) . GetAwaiter ( ) . GetResult ( ) ;
304302 }
305303
306304 this . isDisposed = true ;
Original file line number Diff line number Diff line change 1818// </copyright>
1919
2020using System ;
21- using System . Threading . Tasks ;
2221
2322#nullable enable
2423
@@ -27,18 +26,11 @@ namespace OpenQA.Selenium.Remote
2726 /// <summary>
2827 /// Provides a way to start a server that understands remote commands
2928 /// </summary>
30- public interface ICommandServer : IDisposable , IAsyncDisposable
29+ public interface ICommandServer : IDisposable
3130 {
3231 /// <summary>
3332 /// Starts the server.
3433 /// </summary>
35- [ Obsolete ( "Use the asynchronous method StartAsync" ) ]
3634 void Start ( ) ;
37-
38- /// <summary>
39- /// Starts the server.
40- /// </summary>
41- /// <returns>A task that represents the asynchronous start operation.</returns>
42- Task StartAsync ( ) ;
4335 }
4436}
You can’t perform that action at this time.
0 commit comments