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