<CDefines Condition="'$(FeaturePerfmon)' == 'true'">$(CDefines);FEATURE_PERFMON</CDefines>
<CDefines Condition="'$(FeaturePrejit)' == 'true'">$(CDefines);FEATURE_PREJIT</CDefines>
<CDefines Condition="'$(FeatureRandomizedStringHashing)' == 'true'">$(CDefines);FEATURE_RANDOMIZED_STRING_HASHING</CDefines>
- <CDefines Condition="'$(FeatureReflectionOnlyLoad)' == 'true'">$(CDefines);FEATURE_REFLECTION_ONLY_LOAD</CDefines>
<CDefines Condition="'$(FeatureReJIT)' == 'true'">$(CDefines);FEATURE_REJIT</CDefines>
<CDefines Condition="'$(FeatureRemoting)' == 'true'">$(CDefines);FEATURE_REMOTING</CDefines>
<CDefines Condition="'$(FeatureSortTables)' == 'true'">$(CDefines);FEATURE_SORT_TABLES</CDefines>
<DefineConstants Condition="'$(FeatureXplatEventSource)' == 'true'">$(DefineConstants);FEATURE_EVENTSOURCE_XPLAT</DefineConstants>
<DefineConstants Condition="'$(FeaturePerfmon)' == 'true'">$(DefineConstants);FEATURE_PERFMON</DefineConstants>
<DefineConstants Condition="'$(FeatureRandomizedStringHashing)' == 'true'">$(DefineConstants);FEATURE_RANDOMIZED_STRING_HASHING</DefineConstants>
- <DefineConstants Condition="'$(FeatureReflectionOnlyLoad)' == 'true'">$(DefineConstants);FEATURE_REFLECTION_ONLY_LOAD</DefineConstants>
<DefineConstants Condition="'$(FeatureRemoting)' == 'true'">$(DefineConstants);FEATURE_REMOTING</DefineConstants>
<DefineConstants Condition="'$(FeatureSortTables)' == 'true'">$(DefineConstants);FEATURE_SORT_TABLES</DefineConstants>
<DefineConstants Condition="'$(FeatureTypeEquivalence)' == 'true'">$(DefineConstants);FEATURE_TYPEEQUIVALENCE</DefineConstants>
<FeatureMdaSupported>false</FeatureMdaSupported>
<FeatureMergeJitAndEngine>true</FeatureMergeJitAndEngine>
<FeatureRandomizedStringHashing>false</FeatureRandomizedStringHashing>
- <FeatureReflectionOnlyLoad>false</FeatureReflectionOnlyLoad>
<FeatureStackProbe>false</FeatureStackProbe>
<FeatureReJIT>false</FeatureReJIT>
<FeatureVersioningLog>false</FeatureVersioningLog>
}
}
-#if FEATURE_REFLECTION_ONLY_LOAD
- public event ResolveEventHandler ReflectionOnlyAssemblyResolve;
-#endif // FEATURE_REFLECTION_ONLY
private ApplicationTrust _applicationTrust;
private EventHandler _processExit;
}
}
-#if FEATURE_REFLECTION_ONLY_LOAD
- private Assembly ResolveAssemblyForIntrospection(Object sender, ResolveEventArgs args)
- {
- Contract.Requires(args != null);
- return Assembly.ReflectionOnlyLoad(ApplyPolicy(args.Name));
- }
-
- // Helper class for method code:EnableResolveAssembliesForIntrospection
- private class NamespaceResolverForIntrospection
- {
- private IEnumerable<string> _packageGraphFilePaths;
- public NamespaceResolverForIntrospection(IEnumerable<string> packageGraphFilePaths)
- {
- _packageGraphFilePaths = packageGraphFilePaths;
- }
-
- public void ResolveNamespace(
- object sender,
- System.Runtime.InteropServices.WindowsRuntime.NamespaceResolveEventArgs args)
- {
- Contract.Requires(args != null);
-
- IEnumerable<string> fileNames = System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata.ResolveNamespace(
- args.NamespaceName,
- null, // windowsSdkFilePath ... Use OS installed .winmd files
- _packageGraphFilePaths);
- foreach (string fileName in fileNames)
- {
- args.ResolvedAssemblies.Add(Assembly.ReflectionOnlyLoadFrom(fileName));
- }
- }
- }
-
- // Called only by native function code:ValidateWorker
- private void EnableResolveAssembliesForIntrospection(string verifiedFileDirectory)
- {
- CurrentDomain.ReflectionOnlyAssemblyResolve += new ResolveEventHandler(ResolveAssemblyForIntrospection);
-
- string[] packageGraphFilePaths = null;
- if (verifiedFileDirectory != null)
- packageGraphFilePaths = new string[] { verifiedFileDirectory };
- NamespaceResolverForIntrospection namespaceResolver = new NamespaceResolverForIntrospection(packageGraphFilePaths);
-
- System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeMetadata.ReflectionOnlyNamespaceResolve +=
- new EventHandler<System.Runtime.InteropServices.WindowsRuntime.NamespaceResolveEventArgs>(namespaceResolver.ResolveNamespace);
- }
-#endif // FEATURE_REFLECTION_ONLY_LOAD
public ObjectHandle CreateInstance(String assemblyName,
String typeName)
throw new ArgumentNullException(nameof(name));
if (access != AssemblyBuilderAccess.Run
-#if FEATURE_REFLECTION_ONLY_LOAD
- && access != AssemblyBuilderAccess.ReflectionOnly
-#endif // FEATURE_REFLECTION_ONLY_LOAD
&& access != AssemblyBuilderAccess.RunAndCollect
)
{
public enum AssemblyBuilderAccess
{
Run = 1,
-#if FEATURE_REFLECTION_ONLY_LOAD
- ReflectionOnly = 6, // 4 | Save,
-#endif // FEATURE_REFLECTION_ONLY_LOAD
RunAndCollect = 8 | Run
}
}
}
}
-#if FEATURE_REFLECTION_ONLY_LOAD
- public class NamespaceResolveEventArgs : EventArgs
- {
- private string _NamespaceName;
- private Assembly _RequestingAssembly;
- private Collection<Assembly> _ResolvedAssemblies;
-
- public string NamespaceName
- {
- get
- {
- return _NamespaceName;
- }
- }
-
- public Assembly RequestingAssembly
- {
- get
- {
- return _RequestingAssembly;
- }
- }
-
- public Collection<Assembly> ResolvedAssemblies
- {
- get
- {
- return _ResolvedAssemblies;
- }
- }
-
- public NamespaceResolveEventArgs(string namespaceName, Assembly requestingAssembly)
- {
- _NamespaceName = namespaceName;
- _RequestingAssembly = requestingAssembly;
- _ResolvedAssemblies = new Collection<Assembly>();
- }
- }
-#endif //FEATURE_REFLECTION_ONLY
internal class DesignerNamespaceResolveEventArgs : EventArgs
{
#endif // FEATURE_TYPEEQUIVALENCE
#ifdef FEATURE_COMINTEROP
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- m_pReflectionOnlyWinRtBinder = NULL;
- m_pReflectionOnlyWinRtTypeCache = NULL;
-#endif // FEATURE_REFLECTION_ONLY_LOAD
m_pNameToTypeMap = NULL;
m_vNameToTypeMapVersion = 0;
m_nEpoch = 0;
#endif // FEATURE_REMOTING
#ifdef FEATURE_COMINTEROP
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- if (m_pReflectionOnlyWinRtBinder != NULL)
- {
- m_pReflectionOnlyWinRtBinder->Release();
- }
- if (m_pReflectionOnlyWinRtTypeCache != NULL)
- {
- m_pReflectionOnlyWinRtTypeCache->Release();
- }
-#endif // FEATURE_REFLECTION_ONLY_LOAD
if (m_pNameToTypeMap != nullptr)
{
delete m_pNameToTypeMap;
#ifdef FEATURE_COMINTEROP
if (!AppX::IsAppXProcess())
{
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- m_pReflectionOnlyWinRtTypeCache = clr::SafeAddRef(new CLRPrivTypeCacheReflectionOnlyWinRT());
- m_pReflectionOnlyWinRtBinder = clr::SafeAddRef(new CLRPrivBinderReflectionOnlyWinRT(m_pReflectionOnlyWinRtTypeCache));
-#endif
}
#endif //FEATURE_COMINTEROP
HRESULT hrBindResult = S_OK;
PEAssemblyHolder result;
-#if defined(FEATURE_COMINTEROP) && defined(FEATURE_REFLECTION_ONLY_LOAD)
- // We want to keep this holder around to avoid closing and remapping the file again - calls to Fusion further down will open the file again
- ReleaseHolder<IMetaDataAssemblyImport> pMetaDataAssemblyImport;
-
- // Special case ReflectionOnlyLoadFrom on .winmd (WinRT) assemblies
- if (pSpec->IsIntrospectionOnly() && (pSpec->m_wszCodeBase != NULL))
- { // This is a LoadFrom request - we need to find out if it is .winmd file or classic managed assembly
- HRESULT hr = S_OK;
-
- StackSString sPath(pSpec->GetCodeBase());
- PEAssembly::UrlToPath(sPath);
-
- // Open MetaData of the file
- hr = GetAssemblyMDInternalImportEx(
- sPath,
- IID_IMetaDataAssemblyImport,
- MDInternalImport_Default,
- (IUnknown **)&pMetaDataAssemblyImport);
- if (SUCCEEDED(hr))
- {
- DWORD dwAssemblyFlags = 0;
- hr = pMetaDataAssemblyImport->GetAssemblyProps(
- TokenFromRid(1, mdtAssembly),
- nullptr, // ppbPublicKey
- nullptr, // pcbPublicKey
- nullptr, // pulHashAlgId
- nullptr, // szName
- 0, // cchName
- nullptr, // pchName
- nullptr, // pMetaData
- &dwAssemblyFlags);
- if (SUCCEEDED(hr) && IsAfContentType_WindowsRuntime(dwAssemblyFlags))
- { // It is .winmd file
- _ASSERTE(!AppX::IsAppXProcess());
-
- ReleaseHolder<ICLRPrivAssembly> pPrivAssembly;
- ReleaseHolder<PEAssembly> pAssembly;
-
- hr = m_pReflectionOnlyWinRtBinder->BindAssemblyExplicit(sPath, &pPrivAssembly);
- if (SUCCEEDED(hr))
- {
- hr = BindHostedPrivAssembly(nullptr, pPrivAssembly, nullptr, &pAssembly, TRUE);
- _ASSERTE(FAILED(hr) || (pAssembly != nullptr));
- }
- if (FAILED(hr))
- {
- if (fThrowOnFileNotFound)
- {
- ThrowHR(hr);
- }
- return nullptr;
- }
- return pAssembly.Extract();
- }
- }
- }
-#endif //FEATURE_COMINTEROP && FEATURE_REFLECTION_ONLY_LOAD
EX_TRY
{
if (fAddFileToCache)
{
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- // <TODO> PERF: This doesn't scale... </TODO>
- if (pSpec->IsIntrospectionOnly() && (pSpec->GetCodeBase() != NULL))
- {
- IAssemblyName * pIAssemblyName = result->GetFusionAssemblyName();
-
- AppDomain::AssemblyIterator i = IterateAssembliesEx((AssemblyIterationFlags)(
- kIncludeLoaded | kIncludeIntrospection));
- CollectibleAssemblyHolder<DomainAssembly *> pCachedDomainAssembly;
- while (i.Next(pCachedDomainAssembly.This()))
- {
- IAssemblyName * pCachedAssemblyName = pCachedDomainAssembly->GetAssembly()->GetFusionAssemblyName();
- if (pCachedAssemblyName->IsEqual(pIAssemblyName, ASM_CMPF_IL_ALL) == S_OK)
- {
- if (!pCachedDomainAssembly->GetAssembly()->GetManifestModule()->GetFile()->Equals(result))
- {
- COMPlusThrow(kFileLoadException, IDS_EE_REFLECTIONONLY_LOADFROM, pSpec->GetCodeBase());
- }
- }
- }
- }
-#endif //FEATURE_REFLECTION_ONLY_LOAD
if (pSpec->CanUseWithBindingCache() && result->CanUseWithBindingCache())
{
} // AppDomain::BindAssemblySpec
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
-DomainAssembly *
-AppDomain::BindAssemblySpecForIntrospectionDependencies(
- AssemblySpec * pSpec)
-{
- STANDARD_VM_CONTRACT;
-
- PRECONDITION(CheckPointer(pSpec));
- PRECONDITION(pSpec->GetAppDomain() == this);
- PRECONDITION(pSpec->IsIntrospectionOnly());
- PRECONDITION(this == ::GetAppDomain());
-
- PEAssemblyHolder result;
- HRESULT hr;
-
- if (!pSpec->HasUniqueIdentity())
- {
- if (!pSpec->HasBindableIdentity())
- {
- COMPlusThrowHR(E_UNEXPECTED);
- }
-
- // In classic (non-AppX), this is initilized by AppDomain constructor
- _ASSERTE(m_pReflectionOnlyWinRtBinder != NULL);
-
- ReleaseHolder<ICLRPrivAssembly> pPrivAssembly;
- hr = m_pReflectionOnlyWinRtBinder->BindWinRtType(
- pSpec->GetWinRtTypeNamespace(),
- pSpec->GetWinRtTypeClassName(),
- pSpec->GetParentAssembly(),
- &pPrivAssembly);
- if (FAILED(hr))
- {
- if (hr == CLR_E_BIND_TYPE_NOT_FOUND)
- { // We could not find the type - throw TypeLoadException to give user type name for diagnostics
- EX_THROW(EETypeLoadException, (pSpec->GetWinRtTypeNamespace(), pSpec->GetWinRtTypeClassName(), nullptr, nullptr, IDS_EE_REFLECTIONONLY_WINRT_LOADFAILURE));
- }
- if (!Exception::IsTransient(hr))
- { // Throw the HRESULT as exception wrapped by TypeLoadException to give user type name for diagnostics
- EEMessageException ex(hr);
- EX_THROW_WITH_INNER(EETypeLoadException, (pSpec->GetWinRtTypeNamespace(), pSpec->GetWinRtTypeClassName(), nullptr, nullptr, IDS_EE_REFLECTIONONLY_WINRT_LOADFAILURE), &ex);
- }
- IfFailThrow(hr);
- }
-
- IfFailThrow(BindHostedPrivAssembly(nullptr, pPrivAssembly, nullptr, &result, TRUE));
- _ASSERTE(result != nullptr);
- return LoadDomainAssembly(pSpec, result, FILE_LOADED);
- }
-
- EX_TRY
- {
- if (!IsCached(pSpec))
- {
- result = TryResolveAssembly(pSpec, TRUE /*fPreBind*/);
- if (result != NULL && result->CanUseWithBindingCache())
- {
- // Failure to add simply means someone else beat us to it. In that case
- // the FindCachedFile call below (after catch block) will update result
- // to the cached value.
- AddFileToCache(pSpec, result, TRUE /*fAllowFailure*/);
- }
- }
- }
- EX_CATCH
- {
- Exception *ex = GET_EXCEPTION();
- AssemblySpec NewSpec(this);
- AssemblySpec *pFailedSpec = NULL;
-
- // Let transient exceptions propagate
- if (ex->IsTransient())
- {
- EX_RETHROW;
- }
-
- // Non-"file not found" exception also propagate
- BOOL fFailure = PostBindResolveAssembly(pSpec, &NewSpec, ex->GetHR(), &pFailedSpec);
- if(fFailure)
- {
- if (AddExceptionToCache(pFailedSpec, ex))
- {
- if ((pFailedSpec == pSpec) && EEFileLoadException::CheckType(ex))
- {
- EX_RETHROW; //preserve the information
- }
- else
- EEFileLoadException::Throw(pFailedSpec, ex->GetHR(), ex);
- }
- }
- }
- EX_END_CATCH(RethrowTerminalExceptions);
-
- result = FindCachedFile(pSpec);
- result.SuppressRelease();
-
-
- if (result)
- {
- // It was either already in the spec cache or the prebind event returned a result.
- return LoadDomainAssembly(pSpec, result, FILE_LOADED);
- }
-
-
- // Otherwise, look in the list of assemblies already loaded for reflectiononly.
- IAssemblyName * ptmp = NULL;
- hr = pSpec->CreateFusionName(&ptmp);
- if (FAILED(hr))
- {
- COMPlusThrowHR(hr);
- }
- SafeComHolder<IAssemblyName> pIAssemblyName(ptmp);
-
- // Note: We do not support introspection-only collectible assemblies (yet)
- AppDomain::AssemblyIterator i = IterateAssembliesEx((AssemblyIterationFlags)(
- kIncludeLoaded | kIncludeIntrospection | kExcludeCollectible));
- CollectibleAssemblyHolder<DomainAssembly *> pCachedDomainAssembly;
-
- while (i.Next(pCachedDomainAssembly.This()))
- {
- _ASSERTE(!pCachedDomainAssembly->IsCollectible());
- IAssemblyName * pCachedAssemblyName = pCachedDomainAssembly->GetAssembly()->GetFusionAssemblyName();
- if (pCachedAssemblyName->IsEqual(pIAssemblyName, ASM_CMPF_IL_ALL) == S_OK)
- {
- return pCachedDomainAssembly;
- }
- }
- // If not found in that list, it is an ERROR. Yes, this is by design.
- StackSString name;
- pSpec->GetFileOrDisplayName(0, name);
- COMPlusThrow(kFileLoadException, IDS_EE_REFLECTIONONLY_LOADFAILURE,name);
-} // AppDomain::BindAssemblySpecForIntrospectionDependencies
-#endif // FEATURE_REFLECTION_ONLY_LOAD
PEAssembly *AppDomain::TryResolveAssembly(AssemblySpec *pSpec, BOOL fPreBind)
{
StackSString ssName;
pSpec->GetFileOrDisplayName(0, ssName);
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- if ( (!fIntrospection) && (!fPreBind) )
- {
- methodId = METHOD__APP_DOMAIN__ON_ASSEMBLY_RESOLVE; // post-bind execution event (the classic V1.0 event)
- }
- else if ((!fIntrospection) && fPreBind)
- {
- RETURN NULL; // There is currently no prebind execution resolve event
- }
- else if (fIntrospection && !fPreBind)
- {
- RETURN NULL; // There is currently no post-bind introspection resolve event
- }
- else
- {
- _ASSERTE( fIntrospection && fPreBind );
- methodId = METHOD__APP_DOMAIN__ON_REFLECTION_ONLY_ASSEMBLY_RESOLVE; // event for introspection assemblies
- }
-#else // FEATURE_REFLECTION_ONLY_LOAD
if (!fPreBind)
{
methodId = METHOD__APP_DOMAIN__ON_ASSEMBLY_RESOLVE; // post-bind execution event (the classic V1.0 event)
RETURN NULL;
}
-#endif // FEATURE_REFLECTION_ONLY_LOAD
// Elevate threads allowed loading level. This allows the host to load an assembly even in a restricted
// condition. Note, however, that this exposes us to possible recursion failures, if the host tries to
PEAssembly ** ppAssembly,
BOOL fIsIntrospectionOnly = FALSE) DAC_EMPTY_RET(S_OK);
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- virtual DomainAssembly *BindAssemblySpecForIntrospectionDependencies(AssemblySpec *pSpec) DAC_EMPTY_RET(NULL);
-#endif
PEAssembly *TryResolveAssembly(AssemblySpec *pSpec, BOOL fPreBind);
#ifdef FEATURE_COMINTEROP
private:
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- // ReflectionOnly WinRT binder and its TypeCache (only in classic = non-AppX; the scenario is not supported in AppX)
- CLRPrivBinderReflectionOnlyWinRT * m_pReflectionOnlyWinRtBinder;
- CLRPrivTypeCacheReflectionOnlyWinRT * m_pReflectionOnlyWinRtTypeCache;
-#endif // FEATURE_REFLECTION_ONLY_LOAD
#endif //FEATURE_COMINTEROP
// This applies to both Desktop CLR and CoreCLR, with or without fusion.
BOOL fIsSameAssembly = (pAssembly->GetManifestFile()->GetILimage() == pFile->GetILimage());
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- if (fForIntrospection)
- {
- IAssemblyName * pIAssemblyName = pAssembly->GetFusionAssemblyName();
-
- AppDomain::AssemblyIterator i = GetAppDomain()->IterateAssembliesEx(
- (AssemblyIterationFlags)(kIncludeLoaded | kIncludeIntrospection));
- CollectibleAssemblyHolder<DomainAssembly *> pDomainAssembly;
-
- while (i.Next(pDomainAssembly.This()))
- {
- Assembly * pCachedAssembly = pDomainAssembly->GetAssembly();
- IAssemblyName * pCachedAssemblyName = pCachedAssembly->GetFusionAssemblyName();
- if ((pAssembly != pCachedAssembly) && (S_OK == pCachedAssemblyName->IsEqual(pIAssemblyName, ASM_CMPF_IL_ALL)))
- {
- COMPlusThrow(kFileLoadException, IDS_EE_REFLECTIONONLY_LOADFROM, W("")); //@todo: need to fill in assemblyname
- }
- }
- }
-#endif // FEATURE_REFLECTION_ONLY_LOAD
LOG((LF_CLASSLOADER,
LL_INFO100,
RETURN pAssembly;
}
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- if (IsIntrospectionOnly() && (GetCodeBase() == NULL))
- {
- SafeComHolder<IAssemblyName> pIAssemblyName;
- IfFailThrow(CreateFusionName(&pIAssemblyName));
-
- // Note: We do not support introspection-only collectible assemblies (yet)
- AppDomain::AssemblyIterator i = pDomain->IterateAssembliesEx(
- (AssemblyIterationFlags)(kIncludeLoaded | kIncludeIntrospection | kExcludeCollectible));
- CollectibleAssemblyHolder<DomainAssembly *> pCachedDomainAssembly;
-
- while (i.Next(pCachedDomainAssembly.This()))
- {
- _ASSERTE(!pCachedDomainAssembly->IsCollectible());
- IAssemblyName * pCachedAssemblyName = pCachedDomainAssembly->GetAssembly()->GetFusionAssemblyName();
- if (S_OK == pCachedAssemblyName->IsEqual(pIAssemblyName, ASM_CMPF_IL_ALL))
- {
- RETURN pCachedDomainAssembly;
- }
- }
- }
-#endif // FEATURE_REFLECTION_ONLY_LOAD
PEAssemblyHolder pFile(pDomain->BindAssemblySpec(this, fThrowOnFileNotFound, fRaisePrebindEvents, pCallerStackMark, pLoadSecurity));
if (pFile == NULL)
bool fHasBindableIdentity = HasBindableIdentity(kAssemblyRef);
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- if (IsIntrospectionOnly())
- {
- // We will not get here on GC thread
- GCX_PREEMP();
-
- AssemblySpec spec;
- spec.InitializeSpec(kAssemblyRef, GetMDImport(), GetDomainFile(GetAppDomain())->GetDomainAssembly(), IsIntrospectionOnly());
- if (szWinRtTypeClassName != NULL)
- {
- spec.SetWindowsRuntimeType(szWinRtTypeNamespace, szWinRtTypeClassName);
- }
- pDomainAssembly = GetAppDomain()->BindAssemblySpecForIntrospectionDependencies(&spec);
- }
- else
-#endif //FEATURE_REFLECTION_ONLY_LOAD
{
PEAssemblyHolder pFile = GetDomainFile(GetAppDomain())->GetFile()->LoadAssembly(
kAssemblyRef,
FCFuncElement("HasOverriddenBeginEndWrite", StreamNative::HasOverriddenBeginEndWrite)
FCFuncEnd()
-#if defined(FEATURE_COMINTEROP) && defined(FEATURE_REFLECTION_ONLY_LOAD)
-FCFuncStart(gWindowsRuntimeMetadata)
- QCFuncElement("nResolveNamespace", CLRPrivTypeCacheReflectionOnlyWinRT::ResolveNamespace)
-FCFuncEnd()
-#endif //FEATURE_COMINTEROP && FEATURE_REFLECTION_ONLY_LOAD
#ifdef FEATURE_COMINTEROP
FCFuncStart(gWindowsRuntimeBufferHelperFuncs)
#endif
-#if defined(FEATURE_COMINTEROP) && defined(FEATURE_REFLECTION_ONLY_LOAD)
-FCClassElement("WindowsRuntimeMetadata", "System.Runtime.InteropServices.WindowsRuntime", gWindowsRuntimeMetadata)
-#endif
#if defined(FEATURE_EVENTSOURCE_XPLAT)
FCClassElement("XplatEventLogger", "System.Diagnostics.Tracing", gEventLogger)
#include "multicorejit.h"
#endif
-#if defined(FEATURE_COMINTEROP) && defined(FEATURE_REFLECTION_ONLY_LOAD)
-#include "clrprivtypecachereflectiononlywinrt.h"
-#endif
-
#ifdef FEATURE_COMINTEROP
#include "windowsruntimebufferhelper.h"
#endif
DEFINE_FIELD_U(_TypeResolve, AppDomainBaseObject, m_pTypeEventHandler)
DEFINE_FIELD_U(_ResourceResolve, AppDomainBaseObject, m_pResourceEventHandler)
DEFINE_FIELD_U(_AssemblyResolve, AppDomainBaseObject, m_pAsmResolveEventHandler)
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
-DEFINE_FIELD_U(ReflectionOnlyAssemblyResolve, AppDomainBaseObject, m_pReflectionAsmResolveEventHandler)
-#endif
#ifdef FEATURE_REMOTING
DEFINE_FIELD_U(_DefaultContext, AppDomainBaseObject, m_pDefaultContext)
#endif
DEFINE_METHOD(APP_DOMAIN, ON_RESOURCE_RESOLVE, OnResourceResolveEvent, IM_Assembly_Str_RetAssembly)
DEFINE_METHOD(APP_DOMAIN, ON_TYPE_RESOLVE, OnTypeResolveEvent, IM_Assembly_Str_RetAssembly)
DEFINE_METHOD(APP_DOMAIN, ON_ASSEMBLY_RESOLVE, OnAssemblyResolveEvent, IM_Assembly_Str_RetAssembly)
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
-DEFINE_METHOD(APP_DOMAIN, ON_REFLECTION_ONLY_ASSEMBLY_RESOLVE, OnReflectionOnlyAssemblyResolveEvent, IM_Assembly_Str_RetAssembly)
-#ifdef FEATURE_COMINTEROP
-DEFINE_METHOD(APP_DOMAIN, ON_REFLECTION_ONLY_NAMESPACE_RESOLVE, OnReflectionOnlyNamespaceResolveEvent, IM_Assembly_Str_RetArrAssembly)
-#endif //FEATURE_COMINTEROP
-DEFINE_METHOD(APP_DOMAIN, ENABLE_RESOLVE_ASSEMBLIES_FOR_INTROSPECTION, EnableResolveAssembliesForIntrospection, IM_Str_RetVoid)
-#endif //FEATURE_REFLECTION_ONLY_LOAD
#ifdef FEATURE_COMINTEROP
DEFINE_METHOD(APP_DOMAIN, ON_DESIGNER_NAMESPACE_RESOLVE, OnDesignerNamespaceResolveEvent, IM_Str_RetArrStr)
#endif //FEATURE_COMINTEROP
OBJECTREF m_pTypeEventHandler; // Delegate for 'resolve type' event
OBJECTREF m_pResourceEventHandler; // Delegate for 'resolve resource' event
OBJECTREF m_pAsmResolveEventHandler; // Delegate for 'resolve assembly' event
-#ifdef FEATURE_REFLECTION_ONLY_LOAD
- OBJECTREF m_pReflectionAsmResolveEventHandler; //Delegate for 'reflection resolve assembly' event
-#endif
#ifdef FEATURE_REMOTING
OBJECTREF m_pDefaultContext; // Default managed context for this AD.
#endif