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