forked from aspnet/AspNetWebStack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPreApplicationStartCode.cs
More file actions
26 lines (22 loc) · 884 Bytes
/
Copy pathPreApplicationStartCode.cs
File metadata and controls
26 lines (22 loc) · 884 Bytes
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
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.ComponentModel;
namespace System.Web.Http.WebHost
{
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("Use of this type is not recommended because it no longer has initialization logic.")]
public static class PreApplicationStartCode
{
private static bool _startWasCalled;
public static void Start()
{
// Guard against multiple calls. All Start calls are made on same thread, so no lock needed here
if (_startWasCalled)
{
return;
}
_startWasCalled = true;
// We need to keep this for App-Compat reasons. Prior to 4.5 we registered a module here.
}
}
}