Short answer; No.
Slightly longer answer;
It would be somewhat difficult (as I am sure you're already suspecting), the reason for it being hard is that the value returned by the
Location
getter isn't stored in a backing field such as
private readonly string location;
Instead, it is fetched using the native handle to the
Assembly
(or actually since that class is abstract,
RuntimeAssembly
which is the sub-class you get when loading stuff from memory) and then using an external dll call to read the location.
It looks something like this (simplified);
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
private static extern void GetLocation(RuntimeAssembly assembly, StringHandleOnStack retString);
public override String Location {
get {
String location = null;
GetLocation(GetNativeHandle(), JitHelpers.GetStringHandleOnStack(ref location));
return location;
}
}
I think it is going to be easier for you to change the code that requires this to be non-empty than inject a value into that.
Hope this helps,
Fredrik