45 references to ManualTypeMarshallingHelper
Microsoft.Interop.LibraryImportGenerator (23)
Analyzers\CustomMarshallerAttributeAnalyzer.cs (13)
661if (!ManualTypeMarshallingHelper.TryResolveManagedType( 663ManualTypeMarshallingHelper.ReplaceGenericPlaceholderInType(managedTypeInAttribute, entryType, context.Compilation), 664ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(entryType), 680if (!ManualTypeMarshallingHelper.TryResolveMarshallerType( 702ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(entryType)); 756if (ManualTypeMarshallingHelper.ModeUsesManagedToUnmanagedShape(mode)) 816if (ManualTypeMarshallingHelper.ModeUsesUnmanagedToManagedShape(mode)) 882if (ManualTypeMarshallingHelper.ModeUsesManagedToUnmanagedShape(mode)) 910if (ManualTypeMarshallingHelper.ModeUsesUnmanagedToManagedShape(mode)) 1050if (ManualTypeMarshallingHelper.ModeUsesManagedToUnmanagedShape(mode)) 1113if (ManualTypeMarshallingHelper.ModeUsesUnmanagedToManagedShape(mode)) 1199if (ManualTypeMarshallingHelper.ModeUsesManagedToUnmanagedShape(mode)) 1209if (ManualTypeMarshallingHelper.ModeUsesUnmanagedToManagedShape(mode))
Analyzers\CustomMarshallerAttributeFixer.cs (4)
46var uniqueMarshallerFixKey = (marshallerType, managedType, ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(entryPointTypeSymbol)); 163bool isLinearCollectionMarshaller = ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(entryPointTypeSymbol); 167ManualTypeMarshallingHelper.TryResolveManagedType(entryPointTypeSymbol, ManualTypeMarshallingHelper.ReplaceGenericPlaceholderInType(managedTypeSymbolInAttribute, entryPointTypeSymbol, model.Compilation), isLinearCollectionMarshaller, IgnoreArityMismatch, out ITypeSymbol managedType);
Analyzers\NativeMarshallingAttributeAnalyzer.cs (4)
113if (!ManualTypeMarshallingHelper.HasEntryPointMarshallerAttribute(entryType)) 122bool isLinearCollectionMarshaller = ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(entryType); 133if (!ManualTypeMarshallingHelper.TryResolveEntryPointType( 148if (!ManualTypeMarshallingHelper.TryGetMarshallersFromEntryTypeIgnoringElements(
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (2)
45bool isLinearCollectionMarshaller = ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(entryPointMarshallerType); 65&& ManualTypeMarshallingHelper.TryResolveMarshallerType(containingType, marshallerTypeInAttribute, (_, _) => { }, out ITypeSymbol constructedMarshallerType)
Microsoft.Interop.SourceGeneration (22)
ArrayMarshallingInfoProvider.cs (3)
65if (ManualTypeMarshallingHelper.HasEntryPointMarshallerAttribute(arrayMarshaller) 66&& ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(arrayMarshaller)) 73if (ManualTypeMarshallingHelper.TryGetLinearCollectionMarshallersFromEntryType(arrayMarshaller, managedType, compilation, getMarshallingInfoForElement, out CustomTypeMarshallers? marshallers))
ComInterfaceMarshallingInfoProvider.cs (2)
41if (ManualTypeMarshallingHelper.HasEntryPointMarshallerAttribute(comInterfaceMarshaller)) 43if (ManualTypeMarshallingHelper.TryGetValueMarshallersFromEntryType(comInterfaceMarshaller, interfaceType, compilation, out CustomTypeMarshallers? marshallers))
CustomMarshallingInfoHelper.cs (11)
24if (!ManualTypeMarshallingHelper.HasEntryPointMarshallerAttribute(entryPointType)) 38bool isLinearCollectionMarshalling = ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(entryPointType); 60if (!ManualTypeMarshallingHelper.TryResolveEntryPointType( 79if (ManualTypeMarshallingHelper.TryGetLinearCollectionMarshallersFromEntryType(entryPointType, type, compilation, getMarshallingInfoForElement, out CustomTypeMarshallers? collectionMarshallers)) 92if (!ManualTypeMarshallingHelper.TryResolveEntryPointType( 105if (ManualTypeMarshallingHelper.TryGetValueMarshallersFromEntryType(entryPointType, type, compilation, out CustomTypeMarshallers? marshallers)) 140if (!ManualTypeMarshallingHelper.HasEntryPointMarshallerAttribute(entryPointType)) 154if (ManualTypeMarshallingHelper.IsLinearCollectionEntryPoint(entryPointType)) 162if (ManualTypeMarshallingHelper.TryGetValueMarshallersFromEntryType(entryPointType, type, compilation, out CustomTypeMarshallers? marshallers)) 179if (ManualTypeMarshallingHelper.HasEntryPointMarshallerAttribute(marshallerType)) 181if (ManualTypeMarshallingHelper.TryGetValueMarshallersFromEntryType(marshallerType, type, compilation, out CustomTypeMarshallers? marshallers))
MarshalUsingAttributeParser.cs (5)
68int elementIndirectionDepth = namedArgs.TryGetValue(ManualTypeMarshallingHelper.MarshalUsingProperties.ElementIndirectionDepth, out TypedConstant value) ? (int)value.Value! : 0; 78if (arg.Key == ManualTypeMarshallingHelper.MarshalUsingProperties.ConstantElementCount) 82else if (arg.Key == ManualTypeMarshallingHelper.MarshalUsingProperties.CountElementName) 86_diagnostics.ReportConfigurationNotSupported(attributeData, ManualTypeMarshallingHelper.MarshalUsingProperties.CountElementName, "null"); 105_diagnostics.ReportConfigurationNotSupported(attributeData, ManualTypeMarshallingHelper.MarshalUsingProperties.CountElementName, elementName);
SafeHandleMarshallingInfoProvider.cs (1)
64if (!ManualTypeMarshallingHelper.TryGetValueMarshallersFromEntryType(