2 types derived from MarshalAsInfo
Microsoft.Interop.SourceGeneration (2)
MarshalAsParser.cs (2)
34
CharEncoding CharEncoding) :
MarshalAsInfo
(UnmanagedType, CharEncoding)
63
CountInfo CountInfo) :
MarshalAsInfo
(UnmanagedType, CharEncoding)
36 references to MarshalAsInfo
Microsoft.Interop.ComInterfaceGenerator (4)
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (1)
174
if (info.MarshallingAttributeInfo is not
MarshalAsInfo
(UnmanagedType unmanagedType, _))
DiagnosticDescriptorProvider.cs (2)
23
GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: true, MarshallingAttributeInfo:
MarshalAsInfo
} } => GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported,
24
GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: false, MarshallingAttributeInfo:
MarshalAsInfo
} } => GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported,
Marshallers\StructAsHResultMarshallerFactory.cs (1)
20
if (info is { ManagedType: ValueTypeInfo, MarshallingAttributeInfo:
MarshalAsInfo
(UnmanagedType.Error, _) })
Microsoft.Interop.LibraryImportGenerator (3)
Analyzers\ConvertToLibraryImportAnalyzer.cs (1)
203
if (info.MarshallingAttributeInfo is not
MarshalAsInfo
(UnmanagedType unmanagedType, _))
DiagnosticDescriptorProvider.cs (2)
21
GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: true, MarshallingAttributeInfo:
MarshalAsInfo
} } => GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported,
22
GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: false, MarshallingAttributeInfo:
MarshalAsInfo
} } => GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported,
Microsoft.Interop.LibraryImportGenerator.Downlevel (2)
DiagnosticDescriptorProvider.cs (2)
21
GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: true, MarshallingAttributeInfo:
MarshalAsInfo
} } => GeneratorDiagnostics.MarshalAsReturnConfigurationNotSupported,
22
GeneratorDiagnostic.NotSupported { NotSupportedDetails: null, TypePositionInfo: { IsManagedReturnPosition: false, MarshallingAttributeInfo:
MarshalAsInfo
} } => GeneratorDiagnostics.MarshalAsParameterConfigurationNotSupported,
Microsoft.Interop.SourceGeneration (27)
MarshalAsParser.cs (1)
118
/// This class suppports parsing a System.Runtime.InteropServices.MarshalAsAttribute into a <see cref="
MarshalAsInfo
"/>.
MarshalAsWithCustomMarshallersParser.cs (6)
13
/// This class suppports parsing a System.Runtime.InteropServices.MarshalAsAttribute into either a <see cref="
MarshalAsInfo
"/> or a <see cref="NativeMarshallingAttributeInfo"/>
27
/// <param name="marshalAsAttributeParser">The parser that will do basic parsing of a MarshalAsAttribute into a <see cref="
MarshalAsInfo
"/> element.</param>
39
var
marshalAsInfo = (
MarshalAsInfo
)_marshalAsAttributeParser.ParseAttribute(attributeData, type, indirectionDepth, useSiteAttributes, marshallingInfoCallback);
98
MarshalAsInfo
marshalAsInfo)
105
MarshalAsInfo
.UnmanagedType_LPUTF8Str => TypeNames.Utf8StringMarshaller,
Marshalling\CharMarshallingGeneratorResolver.cs (1)
47
if (marshalInfo is
MarshalAsInfo
marshalAsInfo)
Marshalling\MarshalAsMarshallingGeneratorResolver.cs (19)
41
case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_SByte }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.I1, _) }
42
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Byte }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.U1, _) }
43
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int16 }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.I2, _) }
44
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt16 }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.U2, _) }
45
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int32 }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.I4 or UnmanagedType.Error, _) }
46
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt32 }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.U4 or UnmanagedType.Error, _) }
47
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Int64 }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.I8, _) }
48
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UInt64 }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.U8, _) }
49
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_IntPtr }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.SysInt, _) }
50
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_UIntPtr }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.SysUInt, _) }
51
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Single }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.R4, _) }
52
or { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Double }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.R8, _) }:
71
case { ManagedType: PointerTypeInfo { IsFunctionPointer: true }, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.FunctionPtr, _) }:
75
case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo:
MarshalAsInfo
(UnmanagedType.U1, _) }:
77
case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo:
MarshalAsInfo
(UnmanagedType.I1, _) }:
79
case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo:
MarshalAsInfo
(UnmanagedType.U4, _) }:
81
case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo:
MarshalAsInfo
(UnmanagedType.I4 or UnmanagedType.Bool, _) }:
83
case { ManagedType: SpecialTypeInfo { SpecialType: SpecialType.System_Boolean }, MarshallingAttributeInfo:
MarshalAsInfo
(UnmanagedType.VariantBool, _) }:
87
case { ManagedType: DelegateTypeInfo, MarshallingAttributeInfo: NoMarshallingInfo or
MarshalAsInfo
(UnmanagedType.FunctionPtr, _) }: