8 types derived from ManagedTypeInfo
Microsoft.Interop.SourceGeneration (8)
ManagedTypeInfo.cs (8)
80public sealed record SpecialTypeInfo(string FullTypeName, string DiagnosticFormattedName, SpecialType SpecialType) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName) 104public sealed record EnumTypeInfo(string FullTypeName, string DiagnosticFormattedName, SpecialType UnderlyingType) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName); 106public sealed record PointerTypeInfo(string FullTypeName, string DiagnosticFormattedName, bool IsFunctionPointer) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName); 108public sealed record SzArrayType(ManagedTypeInfo ElementTypeInfo) : ManagedTypeInfo($"{ElementTypeInfo.FullTypeName}[]", $"{ElementTypeInfo.DiagnosticFormattedName}[]"); 110public sealed record DelegateTypeInfo(string FullTypeName, string DiagnosticFormattedName) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName); 112public sealed record TypeParameterTypeInfo(string FullTypeName, string DiagnosticFormattedName) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName); 114public sealed record ValueTypeInfo(string FullTypeName, string DiagnosticFormattedName, bool IsByRefLike) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName); 116public sealed record ReferenceTypeInfo(string FullTypeName, string DiagnosticFormattedName) : ManagedTypeInfo(FullTypeName, DiagnosticFormattedName);
101 references to ManagedTypeInfo
Microsoft.Interop.ComInterfaceGenerator (27)
AttributeInfo.cs (3)
15internal sealed record AttributeInfo(ManagedTypeInfo Type, SequenceEqualImmutableArray<string> Arguments) 27var type = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(attribute.AttributeClass);
ComInterfaceGenerator.cs (6)
229private static bool IsHResultLikeType(ManagedTypeInfo type) 236private static IncrementalMethodStubGenerationContext CalculateStubInformation(MethodDeclarationSyntax syntax, IMethodSymbol symbol, int index, StubEnvironment environment, ManagedTypeInfo owningInterface, CancellationToken ct) 376var declaringType = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(symbol.ContainingType); 483var definingType = interfaceGroup.Interface.Info.Type; 528var interfaceType = interfaceMethods.Interface.Info.Type;
ComInterfaceInfo.cs (4)
22public ManagedTypeInfo Type { get; init; } 34ManagedTypeInfo type, 99ManagedTypeInfo.CreateTypeInfoForTypeSymbol(symbol), 158ManagedTypeInfo.CreateTypeInfoForTypeSymbol(thisSymbol),
GeneratedComInterfaceAttributeData.cs (1)
25? ManagedTypeInfo.CreateTypeInfoForTypeSymbol(generatedComInterfaceAttr.StringMarshallingCustomType)
GeneratedStubCodeContext.cs (1)
10ManagedTypeInfo OriginalDefiningType,
IncrementalMethodStubGenerationContext.cs (3)
10internal abstract record GeneratedMethodContextBase(ManagedTypeInfo OriginalDefiningType, SequenceEqualImmutableArray<DiagnosticInfo> Diagnostics); 21ManagedTypeInfo TypeKeyOwner, 22ManagedTypeInfo DeclaringType,
Marshallers\ComInterfaceDispatchMarshallingResolver.cs (1)
35public ManagedTypeInfo AsNativeType(TypePositionInfo info) =>
Marshallers\KeepAliveThisMarshaller.cs (1)
17public ManagedTypeInfo AsNativeType(TypePositionInfo info) => info.ManagedType;
Marshallers\ManagedHResultExceptionGeneratorResolver.cs (2)
37public ManagedTypeInfo AsNativeType(TypePositionInfo info) => info.ManagedType; 65public ManagedTypeInfo AsNativeType(TypePositionInfo info) => info.ManagedType;
Marshallers\ObjectUnwrapperResolver.cs (1)
33public ManagedTypeInfo AsNativeType(TypePositionInfo info) => new PointerTypeInfo("void*", "void*", false);
Marshallers\StructAsHResultMarshallerFactory.cs (1)
30public ManagedTypeInfo AsNativeType(TypePositionInfo info) => SpecialTypeInfo.Int32;
SkippedStubContext.cs (1)
9internal sealed record SkippedStubContext(ManagedTypeInfo OriginalDefiningType) : GeneratedMethodContextBase(OriginalDefiningType, new(ImmutableArray<DiagnosticInfo>.Empty));
VtableIndexStubGenerator.cs (2)
290var interfaceType = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(symbol.ContainingType);
Microsoft.Interop.JavaScript.JSImportGenerator (2)
Marshaling\BaseJSGenerator.cs (1)
28public ManagedTypeInfo NativeType => _inner.NativeType;
Marshaling\EmptyJSGenerator.cs (1)
12public ManagedTypeInfo AsNativeType(TypePositionInfo info) => info.ManagedType;
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\LibraryImportData.cs (1)
22? ManagedTypeInfo.CreateTypeInfoForTypeSymbol(libraryImport.StringMarshallingCustomType)
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\System.Runtime.InteropServices\gen\Common\LibraryImportData.cs (1)
22? ManagedTypeInfo.CreateTypeInfoForTypeSymbol(libraryImport.StringMarshallingCustomType)
Microsoft.Interop.SourceGeneration (70)
ArrayMarshallingInfoProvider.cs (2)
76ManagedTypeInfo.CreateTypeInfoForTypeSymbol(arrayMarshaller), 79ManagedTypeInfo.CreateTypeInfoForTypeSymbol(arrayMarshaller.TypeParameters.Last()));
BoundGenerators.cs (2)
195private readonly ManagedTypeInfo _nativeReturnType; 198public ExtendedInvariantsValidator(ManagedTypeInfo nativeReturnType, IMarshallingGeneratorResolver inner)
ComInterfaceMarshallingInfoProvider.cs (1)
46EntryPointType: ManagedTypeInfo.CreateTypeInfoForTypeSymbol(comInterfaceMarshaller),
CustomMarshallingInfoHelper.cs (6)
36ManagedTypeInfo entryPointTypeInfo = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(entryPointType); 85ManagedTypeInfo.CreateTypeInfoForTypeSymbol(entryPointType.TypeParameters.Last())); 152ManagedTypeInfo entryPointTypeInfo = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(entryPointType); 184EntryPointType: ManagedTypeInfo.CreateTypeInfoForTypeSymbol(marshallerType),
InteropAttributeData.cs (1)
35public ManagedTypeInfo? StringMarshallingCustomType { get; init; }
ManagedTypeInfo.cs (4)
18public virtual bool Equals(ManagedTypeInfo? other) 31protected ManagedTypeInfo(ManagedTypeInfo original) 40public static ManagedTypeInfo CreateTypeInfoForTypeSymbol(ITypeSymbol type) 108public sealed record SzArrayType(ManagedTypeInfo ElementTypeInfo) : ManagedTypeInfo($"{ElementTypeInfo.FullTypeName}[]", $"{ElementTypeInfo.DiagnosticFormattedName}[]");
ManualTypeMarshallingHelper.cs (16)
15ManagedTypeInfo MarshallerType, 16ManagedTypeInfo NativeType, 20ManagedTypeInfo? BufferElementType, 21ManagedTypeInfo? CollectionElementType, 522ManagedTypeInfo bufferElementType = null; 525bufferElementType = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(((INamedTypeSymbol)methods.ToUnmanagedWithBuffer.Parameters[1].Type).TypeArguments[0]); 528ManagedTypeInfo? collectionElementTypeInfo = null; 532collectionElementTypeInfo = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(collectionElementType); 537ManagedTypeInfo.CreateTypeInfoForTypeSymbol(marshallerType), 538ManagedTypeInfo.CreateTypeInfoForTypeSymbol(nativeType), 602ManagedTypeInfo bufferElementType = null; 605bufferElementType = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(((INamedTypeSymbol)methods.FromManagedWithBuffer.Parameters[1].Type).TypeArguments[0]); 608ManagedTypeInfo? collectionElementTypeInfo = null; 612collectionElementTypeInfo = ManagedTypeInfo.CreateTypeInfoForTypeSymbol(collectionElementType); 617ManagedTypeInfo.CreateTypeInfoForTypeSymbol(marshallerType), 618ManagedTypeInfo.CreateTypeInfoForTypeSymbol(nativeType),
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (3)
83ManagedTypeInfo type = paramInfo.ManagedType; 243ManagedTypeInfo marshallerType = marshallerData.MarshallerType; 251ManagedTypeInfo nativeType = marshallerData.NativeType with
Marshalling\BlittableMarshaller.cs (1)
14public ManagedTypeInfo AsNativeType(TypePositionInfo info)
Marshalling\BoolMarshaller.cs (3)
16private readonly ManagedTypeInfo _nativeType; 21protected BoolMarshallerBase(ManagedTypeInfo nativeType, int trueValue, int falseValue, bool compareToTrue) 29public ManagedTypeInfo AsNativeType(TypePositionInfo info)
Marshalling\BreakingChangeDetector.cs (1)
26if (info is { RefKind: RefKind.In or RefKind.RefReadOnlyParameter, MarshallingAttributeInfo: NativeMarshallingAttributeInfo(ManagedTypeInfo { DiagnosticFormattedName: TypeNames.ComVariantMarshaller }, _) }
Marshalling\CharMarshaller.cs (2)
16private static readonly ManagedTypeInfo s_nativeType = SpecialTypeInfo.UInt16; 36public ManagedTypeInfo AsNativeType(TypePositionInfo info)
Marshalling\CustomTypeMarshallingGenerator.cs (1)
18public ManagedTypeInfo NativeType => nativeTypeMarshaller.NativeType;
Marshalling\DelegateMarshaller.cs (1)
15public ManagedTypeInfo AsNativeType(TypePositionInfo info)
Marshalling\Forwarder.cs (1)
12public ManagedTypeInfo AsNativeType(TypePositionInfo info)
Marshalling\ICustomTypeMarshallingStrategy.cs (1)
18ManagedTypeInfo NativeType { get; }
Marshalling\MarshallingGenerator.cs (2)
98ManagedTypeInfo NativeType { get; } 166public ManagedTypeInfo NativeType => unbound.AsNativeType(TypeInfo);
Marshalling\NoMarshallingInfoErrorResolver.cs (4)
33private NoMarshallingInfoErrorResolver(ImmutableDictionary<ManagedTypeInfo, string> customTypeToErrorMessageMap) 38public ImmutableDictionary<ManagedTypeInfo, string> CustomTypeToErrorMessageMap { get; } 40private static ImmutableDictionary<ManagedTypeInfo, string> DefaultTypeToErrorMessageMap(string stringMarshallingAttribute) 41=> ImmutableDictionary.CreateRange(new Dictionary<ManagedTypeInfo, string>
Marshalling\StatefulMarshallingStrategy.cs (3)
13internal sealed class StatefulValueMarshalling(TypePositionInfo info, StubCodeContext stubContext, ManagedTypeInfo marshallerType, ManagedTypeInfo unmanagedType, MarshallerShape shape) : ICustomTypeMarshallingStrategy 17public ManagedTypeInfo NativeType => unmanagedType;
Marshalling\StatelessMarshallingStrategy.cs (2)
17internal sealed class StatelessValueMarshalling(TypePositionInfo info, StubCodeContext codeContext, TypeSyntax marshallerTypeSyntax, ManagedTypeInfo unmanagedType, MarshallerShape shape) : ICustomTypeMarshallingStrategy 19public ManagedTypeInfo NativeType => unmanagedType;
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
19public ManagedTypeInfo NativeType => innerMarshallingGenerator.NativeType;
Marshalling\UnmanagedToManagedOwnershipTrackingStrategy.cs (1)
19public ManagedTypeInfo NativeType => innerMarshaller.NativeType;
MarshallingAttributeInfo.cs (6)
108ManagedTypeInfo EntryPointType, 115ManagedTypeInfo EntryPointType, 118ManagedTypeInfo PlaceholderTypeParameter) : NativeMarshallingAttributeInfo( 127internal static MarshallingInfo CreateSpecificMarshallingInfo(ManagedTypeInfo unmanagedReturnType) 139static NativeMarshallingAttributeInfo CreateWellKnownComExceptionMarshallingData(string marshallerName, ManagedTypeInfo unmanagedType) 141ManagedTypeInfo marshallerTypeInfo = new ReferenceTypeInfo(TypeNames.GlobalAlias + marshallerName, marshallerName);
MethodSignatureElementInfoProvider.cs (1)
34ManagedTypeInfo.CreateTypeInfoForTypeSymbol(_method.ReturnType),
SafeHandleMarshallingInfoProvider.cs (1)
86return new NativeMarshallingAttributeInfo(ManagedTypeInfo.CreateTypeInfoForTypeSymbol(entryPointType), marshallers.Value);
SignatureContext.cs (1)
122TypePositionInfo retTypeInfo = new(ManagedTypeInfo.CreateTypeInfoForTypeSymbol(method.ReturnType), marshallingInfoParser.ParseMarshallingInfo(method.ReturnType, method.GetReturnTypeAttributes()));
TypePositionInfo.cs (2)
47public sealed record TypePositionInfo(ManagedTypeInfo ManagedType, MarshallingInfo MarshallingAttributeInfo) 92var typeInfo = new TypePositionInfo(ManagedTypeInfo.CreateTypeInfoForTypeSymbol(paramSymbol.Type), marshallingInfo)