1 | // Licensed to the .NET Foundation under one or more agreements. |
---|---|
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | // ============================================================ |
5 | // |
6 | // ApplicationContext.inl |
7 | // |
8 | |
9 | |
10 | // |
11 | // Implements inlined methods of ApplicationContext |
12 | // |
13 | // ============================================================ |
14 | |
15 | #ifndef __BINDER__APPLICATION_CONTEXT_INL__ |
16 | #define __BINDER__APPLICATION_CONTEXT_INL__ |
17 | |
18 | LONG ApplicationContext::GetVersion() |
19 | { |
20 | return m_cVersion; |
21 | } |
22 | |
23 | void ApplicationContext::IncrementVersion() |
24 | { |
25 | InterlockedIncrement(&m_cVersion); |
26 | } |
27 | |
28 | SString &ApplicationContext::GetApplicationName() |
29 | { |
30 | return m_applicationName; |
31 | } |
32 | |
33 | DWORD ApplicationContext::GetAppDomainId() |
34 | { |
35 | return m_dwAppDomainId; |
36 | } |
37 | |
38 | void ApplicationContext::SetAppDomainId(DWORD dwAppDomainId) |
39 | { |
40 | m_dwAppDomainId = dwAppDomainId; |
41 | } |
42 | |
43 | ExecutionContext *ApplicationContext::GetExecutionContext() |
44 | { |
45 | return m_pExecutionContext; |
46 | } |
47 | |
48 | InspectionContext *ApplicationContext::GetInspectionContext() |
49 | { |
50 | return m_pInspectionContext; |
51 | } |
52 | |
53 | FailureCache *ApplicationContext::GetFailureCache() |
54 | { |
55 | _ASSERTE(m_pFailureCache != NULL); |
56 | return m_pFailureCache; |
57 | } |
58 | |
59 | HRESULT ApplicationContext::AddToFailureCache(SString &assemblyNameOrPath, |
60 | HRESULT hrBindResult) |
61 | { |
62 | HRESULT hr = GetFailureCache()->Add(assemblyNameOrPath, hrBindResult); |
63 | IncrementVersion(); |
64 | return hr; |
65 | } |
66 | |
67 | StringArrayList *ApplicationContext::GetAppPaths() |
68 | { |
69 | return &m_appPaths; |
70 | } |
71 | |
72 | SimpleNameToFileNameMap * ApplicationContext::GetTpaList() |
73 | { |
74 | return m_pTrustedPlatformAssemblyMap; |
75 | } |
76 | |
77 | TpaFileNameHash * ApplicationContext::GetTpaFileNameList() |
78 | { |
79 | return m_pFileNameHash; |
80 | } |
81 | |
82 | StringArrayList * ApplicationContext::GetPlatformResourceRoots() |
83 | { |
84 | return &m_platformResourceRoots; |
85 | } |
86 | |
87 | StringArrayList * ApplicationContext::GetAppNiPaths() |
88 | { |
89 | return &m_appNiPaths; |
90 | } |
91 | |
92 | CRITSEC_COOKIE ApplicationContext::GetCriticalSectionCookie() |
93 | { |
94 | return m_contextCS; |
95 | } |
96 | |
97 | #ifdef FEATURE_VERSIONING_LOG |
98 | BindingLog *ApplicationContext::GetBindingLog() |
99 | { |
100 | return &m_bindingLog; |
101 | } |
102 | |
103 | void ApplicationContext::ClearBindingLog() |
104 | { |
105 | m_bindingLog.SetDebugLog(NULL); |
106 | } |
107 | #endif // FEATURE_VERSIONING_LOG |
108 | |
109 | |
110 | #endif |
111 |