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
18LONG ApplicationContext::GetVersion()
19{
20 return m_cVersion;
21}
22
23void ApplicationContext::IncrementVersion()
24{
25 InterlockedIncrement(&m_cVersion);
26}
27
28SString &ApplicationContext::GetApplicationName()
29{
30 return m_applicationName;
31}
32
33DWORD ApplicationContext::GetAppDomainId()
34{
35 return m_dwAppDomainId;
36}
37
38void ApplicationContext::SetAppDomainId(DWORD dwAppDomainId)
39{
40 m_dwAppDomainId = dwAppDomainId;
41}
42
43ExecutionContext *ApplicationContext::GetExecutionContext()
44{
45 return m_pExecutionContext;
46}
47
48InspectionContext *ApplicationContext::GetInspectionContext()
49{
50 return m_pInspectionContext;
51}
52
53FailureCache *ApplicationContext::GetFailureCache()
54{
55 _ASSERTE(m_pFailureCache != NULL);
56 return m_pFailureCache;
57}
58
59HRESULT ApplicationContext::AddToFailureCache(SString &assemblyNameOrPath,
60 HRESULT hrBindResult)
61{
62 HRESULT hr = GetFailureCache()->Add(assemblyNameOrPath, hrBindResult);
63 IncrementVersion();
64 return hr;
65}
66
67StringArrayList *ApplicationContext::GetAppPaths()
68{
69 return &m_appPaths;
70}
71
72SimpleNameToFileNameMap * ApplicationContext::GetTpaList()
73{
74 return m_pTrustedPlatformAssemblyMap;
75}
76
77TpaFileNameHash * ApplicationContext::GetTpaFileNameList()
78{
79 return m_pFileNameHash;
80}
81
82StringArrayList * ApplicationContext::GetPlatformResourceRoots()
83{
84 return &m_platformResourceRoots;
85}
86
87StringArrayList * ApplicationContext::GetAppNiPaths()
88{
89 return &m_appNiPaths;
90}
91
92CRITSEC_COOKIE ApplicationContext::GetCriticalSectionCookie()
93{
94 return m_contextCS;
95}
96
97#ifdef FEATURE_VERSIONING_LOG
98BindingLog *ApplicationContext::GetBindingLog()
99{
100 return &m_bindingLog;
101}
102
103void ApplicationContext::ClearBindingLog()
104{
105 m_bindingLog.SetDebugLog(NULL);
106}
107#endif // FEATURE_VERSIONING_LOG
108
109
110#endif
111