@@ -18,13 +18,13 @@ public sealed class PInvokeGeneratorConfiguration
1818 private readonly Dictionary < string , IReadOnlyList < string > > _withAttributes ;
1919 private readonly Dictionary < string , string > _withCallConvs ;
2020 private readonly Dictionary < string , string > _withLibraryPaths ;
21- private readonly Dictionary < string , string > _withTransparentStructs ;
21+ private readonly Dictionary < string , ( string , PInvokeGeneratorTransparentStructKind ) > _withTransparentStructs ;
2222 private readonly Dictionary < string , string > _withTypes ;
2323 private readonly Dictionary < string , IReadOnlyList < string > > _withUsings ;
2424
2525 private PInvokeGeneratorConfigurationOptions _options ;
2626
27- public PInvokeGeneratorConfiguration ( string libraryPath , string namespaceName , string outputLocation , string testOutputLocation , PInvokeGeneratorOutputMode outputMode = PInvokeGeneratorOutputMode . CSharp , PInvokeGeneratorConfigurationOptions options = PInvokeGeneratorConfigurationOptions . None , string [ ] excludedNames = null , string headerFile = null , string methodClassName = null , string methodPrefixToStrip = null , IReadOnlyDictionary < string , string > remappedNames = null , string [ ] traversalNames = null , IReadOnlyDictionary < string , string > withAccessSpecifiers = null , IReadOnlyDictionary < string , IReadOnlyList < string > > withAttributes = null , IReadOnlyDictionary < string , string > withCallConvs = null , IReadOnlyDictionary < string , string > withLibraryPaths = null , string [ ] withSetLastErrors = null , IReadOnlyDictionary < string , string > withTransparentStructs = null , IReadOnlyDictionary < string , string > withTypes = null , IReadOnlyDictionary < string , IReadOnlyList < string > > withUsings = null )
27+ public PInvokeGeneratorConfiguration ( string libraryPath , string namespaceName , string outputLocation , string testOutputLocation , PInvokeGeneratorOutputMode outputMode = PInvokeGeneratorOutputMode . CSharp , PInvokeGeneratorConfigurationOptions options = PInvokeGeneratorConfigurationOptions . None , string [ ] excludedNames = null , string headerFile = null , string methodClassName = null , string methodPrefixToStrip = null , IReadOnlyDictionary < string , string > remappedNames = null , string [ ] traversalNames = null , IReadOnlyDictionary < string , string > withAccessSpecifiers = null , IReadOnlyDictionary < string , IReadOnlyList < string > > withAttributes = null , IReadOnlyDictionary < string , string > withCallConvs = null , IReadOnlyDictionary < string , string > withLibraryPaths = null , string [ ] withSetLastErrors = null , IReadOnlyDictionary < string , ( string , PInvokeGeneratorTransparentStructKind ) > withTransparentStructs = null , IReadOnlyDictionary < string , string > withTypes = null , IReadOnlyDictionary < string , IReadOnlyList < string > > withUsings = null )
2828 {
2929 if ( excludedNames is null )
3030 {
@@ -93,7 +93,7 @@ public PInvokeGeneratorConfiguration(string libraryPath, string namespaceName, s
9393 _withAttributes = new Dictionary < string , IReadOnlyList < string > > ( ) ;
9494 _withCallConvs = new Dictionary < string , string > ( ) ;
9595 _withLibraryPaths = new Dictionary < string , string > ( ) ;
96- _withTransparentStructs = new Dictionary < string , string > ( ) ;
96+ _withTransparentStructs = new Dictionary < string , ( string , PInvokeGeneratorTransparentStructKind ) > ( ) ;
9797 _withTypes = new Dictionary < string , string > ( ) ;
9898 _withUsings = new Dictionary < string , IReadOnlyList < string > > ( ) ;
9999
@@ -244,7 +244,7 @@ public bool ExcludeFnptrCodegen
244244
245245 public string [ ] WithSetLastErrors { get ; }
246246
247- public IReadOnlyDictionary < string , string > WithTransparentStructs => _withTransparentStructs;
247+ public IReadOnlyDictionary < string , ( string Name , PInvokeGeneratorTransparentStructKind Kind ) > WithTransparentStructs => _withTransparentStructs;
248248
249249 public IReadOnlyDictionary < string , string > WithTypes => _withTypes;
250250
@@ -324,6 +324,8 @@ private static AccessSpecifier ConvertStringToAccessSpecifier(string input)
324324
325325 private static string RemoveAtPrefix ( string value ) => ValueStartsWithAt ( value ) ? value [ 1 ..] : value ;
326326
327+ private static ( string , PInvokeGeneratorTransparentStructKind ) RemoveAtPrefix ( ( string Name , PInvokeGeneratorTransparentStructKind Kind ) value ) => ( ValueStartsWithAt ( value . Name ) ? value . Name [ 1 ..] : value . Name , value . Kind ) ;
328+
327329 private static bool ValueStartsWithAt ( string value ) => value . StartsWith ( "@" ) ;
328330 }
329331}
0 commit comments