/// <summary> /// Starts the diagnostic server on the specified endpoint. /// </summary> /// <returns></returns> public static DiagnosticServer Start(Uri listenUri) { var server = new DiagnosticServer(listenUri); server.StartListening(); return(server); }
/// <summary> /// Starts the diagnostic server on the specified endpoint. /// </summary> /// <remarks> /// <para> /// If the endpoint binds to localhost, the process will be registered in the list of local proceses. /// </para> /// <para> /// It's not critical to await this task. If not awaited, it's possible events generated by application start-up /// won't be available. /// </para> /// </remarks> /// <returns></returns> public static async Task <DiagnosticServer> StartAsync(IPEndPoint endPoint) { var server = new DiagnosticServer(endPoint); await server.StartListeningAsync(); return(server); }