-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
RequestDispatcher.cs
26 lines (22 loc) · 1.05 KB
/
RequestDispatcher.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.NET.Sdk.Razor.Tool
{
internal abstract class RequestDispatcher
{
/// <summary>
/// Default time the server will stay alive after the last request disconnects.
/// </summary>
public static readonly TimeSpan DefaultServerKeepAlive = TimeSpan.FromMinutes(10);
/// <summary>
/// Time to delay after the last connection before initiating a garbage collection
/// in the server.
/// </summary>
public static readonly TimeSpan GCTimeout = TimeSpan.FromSeconds(30);
public abstract void Run();
public static RequestDispatcher Create(ConnectionHost connectionHost, CompilerHost compilerHost, CancellationToken cancellationToken, EventBus eventBus, TimeSpan? keepAlive = null)
{
return new DefaultRequestDispatcher(connectionHost, compilerHost, cancellationToken, eventBus, keepAlive);
}
}
}