return true;
}
}
+
+ public override bool IsCollectible => InternalAssembly.IsCollectible;
#endregion
}
}
+ [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
+ [return: MarshalAs(UnmanagedType.Bool)]
+ internal static extern bool GetIsCollectible(RuntimeAssembly assembly);
+
+ public override bool IsCollectible => GetIsCollectible(GetNativeHandle());
+
// Load a resource based on the NameSpace of the type.
[System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod
public override Stream GetManifestResourceStream(Type type, string name)
return retVal;
}
+BOOL QCALLTYPE AssemblyNative::GetIsCollectible(QCall::AssemblyHandle pAssembly)
+{
+ QCALL_CONTRACT;
+
+ BOOL retVal = FALSE;
+
+ BEGIN_QCALL;
+
+ retVal = pAssembly->IsCollectible();
+
+ END_QCALL;
+
+ return retVal;
+}
+
void QCALLTYPE AssemblyNative::GetModule(QCall::AssemblyHandle pAssembly, LPCWSTR wszFileName, QCall::ObjectHandleOnStack retModule)
{
QCALL_CONTRACT;
static
void QCALLTYPE GetImageRuntimeVersion(QCall::AssemblyHandle pAssembly, QCall::StringHandleOnStack retString);
+ static BOOL QCALLTYPE GetIsCollectible(QCall::AssemblyHandle pAssembly);
+
//
// PEFile QCalls
//
QCFuncElement("GetImageRuntimeVersion", AssemblyNative::GetImageRuntimeVersion)
FCFuncElement("GetManifestModule", AssemblyHandle::GetManifestModule)
FCFuncElement("GetToken", AssemblyHandle::GetToken)
+ QCFuncElement("GetIsCollectible", AssemblyNative::GetIsCollectible)
FCFuncEnd()
FCFuncStart(gAssemblyExtensionsFuncs)
public virtual bool IsDynamic => false;
public virtual string Location { get { throw NotImplemented.ByDesign; } }
public virtual bool ReflectionOnly { get { throw NotImplemented.ByDesign; } }
+ public virtual bool IsCollectible => true;
public virtual ManifestResourceInfo GetManifestResourceInfo(string resourceName) { throw NotImplemented.ByDesign; }
public virtual string[] GetManifestResourceNames() { throw NotImplemented.ByDesign; }