You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<PackageDescription>Provides a message handler for HttpClient based on the WinHTTP interface of Windows. While similar to HttpClientHandler, it provides developers more granular control over the application's HTTP communication than the HttpClientHandler.
// Track if any generators are just forwarders - for types other than void, this indicates
95
+
// types that can't be marshalled by the source generated.
96
+
// In .NET 7+ support, we would have emitted a diagnostic error about lack of support
97
+
// In down-level support, we do not error - tracking this allows us to switch to generating a basic forwarder (DllImport declaration)
98
+
hasForwardedTypes|=generatoris{Generator:Forwarder,TypeInfo.ManagedType: not SpecialTypeInfo{SpecialType:Microsoft.CodeAnalysis.SpecialType.System_Void}};
99
+
}
100
+
101
+
// For down-level support, if some parameters cannot be marshalled, consider the target framework as not supported
Copy file name to clipboardexpand all lines: src/libraries/System.Runtime.InteropServices/tests/LibraryImportGenerator.UnitTests/AttributeForwarding.cs
// Confirm that if support is missing for any type (like arrays), we fall back to a forwarder even if other types are supported.
520
+
// Confirm that if support is missing for a type with a ITypeBasedMarshallingInfoProvider (like arrays), we fall back to a forwarder even if other types are supported.
// Confirm that if support is missing for a type without a ITypeBasedMarshallingInfoProvider (like StringBuilder), we fall back to a forwarder even if other types are supported.
.WithArguments("Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.","s")
269
+
.WithArguments("Marshalling string or char without explicit marshalling information is not supported. Specify 'LibraryImportAttribute.StringMarshalling', 'LibraryImportAttribute.StringMarshallingCustomType', 'MarshalUsingAttribute' or 'MarshalAsAttribute'.","s"),
0 commit comments