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