2 writes to ToUnmanagedWithBuffer
Microsoft.Interop.SourceGeneration (2)
MarshallerShape.cs (2)
139
ToUnmanagedWithBuffer
= allocateUnmanagedWithBuffer,
189
ToUnmanagedWithBuffer
= toUnmanagedWithBuffer,
12 references to ToUnmanagedWithBuffer
Microsoft.Interop.LibraryImportGenerator (8)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (6)
753
methods.
ToUnmanagedWithBuffer
!);
770
if (methods.ToUnmanaged is null && methods.
ToUnmanagedWithBuffer
is null)
885
IMethodSymbol toUnmanagedMethod = methods.ToUnmanaged ?? methods.
ToUnmanagedWithBuffer
;
903
if (!SymbolEqualityComparer.Default.Equals(methods.ToUnmanaged.ReturnType, methods.
ToUnmanagedWithBuffer
.ReturnType))
905
diagnosticReporter.CreateAndReportDiagnostic(ReturnTypesMustMatchRule, methods.ToUnmanaged.ToDisplayString(), methods.
ToUnmanagedWithBuffer
.ToDisplayString());
918
diagnosticReporter.CreateAndReportDiagnostic(FirstParameterMustMatchReturnTypeRule, toManagedMethod.ToDisplayString(), (methods.ToUnmanaged ?? methods.
ToUnmanagedWithBuffer
).ToDisplayString());
Analyzers\CustomMarshallerAttributeFixer.cs (2)
357
else if (methods.
ToUnmanagedWithBuffer
is not null)
359
unmanagedType = methods.
ToUnmanagedWithBuffer
.ReturnType;
Microsoft.Interop.SourceGeneration (4)
ManualTypeMarshallingHelper.cs (4)
471
if (methods.
ToUnmanagedWithBuffer
is not null)
473
nativeType = methods.
ToUnmanagedWithBuffer
.ReturnType;
523
if (methods.
ToUnmanagedWithBuffer
is not null)
525
bufferElementType = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(((INamedTypeSymbol)methods.
ToUnmanagedWithBuffer
.Parameters[1].Type).TypeArguments[0]);