@@ -26,6 +26,7 @@ class TypeMapObjectsXmlFile
26
26
static readonly TypeMapObjectsXmlFile unscanned = new TypeMapObjectsXmlFile { WasScanned = false } ;
27
27
28
28
public string ? AssemblyName { get ; set ; }
29
+ public Guid AssemblyMvid { get ; set ; } = Guid . Empty ;
29
30
public bool FoundJniNativeRegistration { get ; set ; }
30
31
public List < TypeMapDebugEntry > JavaToManagedDebugEntries { get ; } = [ ] ;
31
32
public List < TypeMapDebugEntry > ManagedToJavaDebugEntries { get ; } = [ ] ;
@@ -59,6 +60,10 @@ void Export (XmlWriter xml)
59
60
xml . WriteStartElement ( "api" ) ;
60
61
xml . WriteAttributeString ( "type" , HasDebugEntries ? "debug" : "release" ) ;
61
62
xml . WriteAttributeStringIfNotDefault ( "assembly-name" , AssemblyName ) ;
63
+
64
+ if ( AssemblyMvid != Guid . Empty ) {
65
+ xml . WriteAttributeString ( "mvid" , AssemblyMvid . ToString ( "N" ) ) ;
66
+ }
62
67
xml . WriteAttributeStringIfNotDefault ( "found-jni-native-registration" , FoundJniNativeRegistration ) ;
63
68
64
69
if ( HasDebugEntries )
@@ -174,11 +179,13 @@ public static TypeMapObjectsXmlFile Import (string filename)
174
179
175
180
var type = root . GetRequiredAttribute ( "type" ) ;
176
181
var assemblyName = root . GetAttributeOrDefault ( "assembly-name" , ( string ? ) null ) ;
182
+ var mvid = Guid . Parse ( root . GetAttributeOrDefault ( "mvid" , Guid . Empty . ToString ( ) ) ) ;
177
183
var foundJniNativeRegistration = root . GetAttributeOrDefault ( "found-jni-native-registration" , false ) ;
178
184
179
185
var file = new TypeMapObjectsXmlFile {
180
186
WasScanned = true ,
181
187
AssemblyName = assemblyName ,
188
+ AssemblyMvid = mvid ,
182
189
FoundJniNativeRegistration = foundJniNativeRegistration ,
183
190
} ;
184
191
0 commit comments