249 references to TypeNames
Microsoft.Interop.ComInterfaceGenerator (66)
Analyzers\AddGeneratedComClassAnalyzer.cs (2)
25
var generatedComClassAttributeType = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.GeneratedComClassAttribute);
26
var generatedComInterfaceAttributeType = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.GeneratedComInterfaceAttribute);
Analyzers\AddGeneratedComClassFixer.cs (1)
28
var attribute = gen.Attribute(gen.TypeExpression(editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.GeneratedComClassAttribute)).WithAdditionalAnnotations(Simplifier.AddImportsAnnotation));
Analyzers\AddMarshalAsToElementFixer.cs (2)
52
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute,
55
gen.DottedName(
TypeNames
.System_Runtime_InteropServices_UnmanagedType),
Analyzers\ComHostingDoesNotSupportGeneratedComInterfaceAnalyzer.cs (3)
32
INamedTypeSymbol? generatedComClassAttribute = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.GeneratedComClassAttribute);
33
INamedTypeSymbol? generatedComInterfaceAttribute = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.GeneratedComInterfaceAttribute);
34
INamedTypeSymbol? comVisibleAttribute = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_ComVisibleAttribute)!;
Analyzers\ConvertComImportToGeneratedComInterfaceAnalyzer.cs (3)
36
INamedTypeSymbol? interfaceTypeAttribute = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.InterfaceTypeAttribute)!;
37
INamedTypeSymbol? generatedComInterfaceAttribute = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.GeneratedComInterfaceAttribute);
76
AttributeData comImportAttribute = type.GetAttributes().First(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_ComImportAttribute);
Analyzers\ConvertComImportToGeneratedComInterfaceFixer.cs (4)
78
var generatedComInterfaceAttribute = gen.Attribute(gen.TypeExpression(comp.GetTypeByMetadataName(
TypeNames
.GeneratedComInterfaceAttribute)).WithAdditionalAnnotations(Simplifier.AddImportsAnnotation));
86
gen.AttributeArgument("StringMarshalling", gen.MemberAccessExpression(gen.DottedName(
TypeNames
.StringMarshalling), gen.IdentifierName(nameof(StringMarshalling.Custom)))),
87
gen.AttributeArgument("StringMarshallingCustomType", gen.TypeOfExpression(gen.TypeExpression(comp.GetTypeByMetadataName(
TypeNames
.BStrStringMarshaller))))
97
var comImportAttributeType = comp.GetTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_ComImportAttribute);
Analyzers\GeneratedComInterfaceAttributeAnalyzer.cs (5)
40
if (GetAttribute(typeSymbol,
TypeNames
.GeneratedComInterfaceAttribute, out _)
41
&& GetAttribute(typeSymbol,
TypeNames
.InterfaceTypeAttribute, out AttributeData? comInterfaceAttribute)
62
case
TypeNames
.ComInterfaceType:
65
case
TypeNames
.System_Int16:
66
case
TypeNames
.@short:
Analyzers\RuntimeComApiUsageWithSourceGeneratedComAnalyzer.cs (4)
29
INamedTypeSymbol? marshalType = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_Marshal);
30
INamedTypeSymbol? generatedComClassAttribute = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.GeneratedComClassAttribute);
31
INamedTypeSymbol? generatedComInterfaceAttribute = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.GeneratedComInterfaceAttribute);
32
INamedTypeSymbol? comObjectType = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_Marshalling_ComObject);
ComClassGenerator.cs (3)
25
TypeNames
.GeneratedComClassAttribute,
66
GenericName(
TypeNames
.GlobalAlias +
TypeNames
.ComExposedClassAttribute)
ComClassInfo.cs (1)
45
AttributeData? generatedComInterfaceAttribute = iface.GetAttributes().FirstOrDefault(attr => attr.AttributeClass?.ToDisplayString() ==
TypeNames
.GeneratedComInterfaceAttribute);
ComInterfaceGenerator.cs (5)
39
TypeNames
.GeneratedComInterfaceAttribute,
211
context.AddSource(data.TypeName.Replace(
TypeNames
.GlobalAlias, ""), data.Source);
217
GenericName(
TypeNames
.GlobalAlias +
TypeNames
.IUnknownDerivedAttribute)
268
generatorDiagnostics.ReportConfigurationNotSupported(lcidConversionAttr, nameof(
TypeNames
.LCIDConversionAttribute));
ComInterfaceGeneratorHelpers.cs (1)
19
=> DefaultMarshallingGeneratorResolver.Create(env, direction,
TypeNames
.GeneratedComInterfaceAttribute_ShortName,
ComInterfaceInfo.cs (4)
218
attrInfo.StringMarshallingCustomType.FullTypeName.Replace(
TypeNames
.GlobalAlias, ""),
299
if (attr.AttributeClass?.ToDisplayString() ==
TypeNames
.GeneratedComInterfaceAttribute)
334
if (attrDisplayString is
TypeNames
.System_Runtime_InteropServices_GuidAttribute)
336
else if (attrDisplayString is
TypeNames
.InterfaceTypeAttribute)
GeneratedComInterfaceAttributeData.cs (2)
45
&& attr.AttributeClass?.ToDisplayString() ==
TypeNames
.GeneratedComInterfaceAttribute)
62
Debug.Assert(attr.AttributeClass.ToDisplayString() ==
TypeNames
.GeneratedComInterfaceAttribute);
Marshallers\ComInterfaceDispatchMarshallingResolver.cs (3)
37
$"{
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_ComWrappers_ComInterfaceDispatch}*",
38
$"{
TypeNames
.System_Runtime_InteropServices_ComWrappers_ComInterfaceDispatch}*",
Marshallers\StructAsHResultMarshallerFactory.cs (2)
45
ParseTypeName(
TypeNames
.System_Runtime_CompilerServices_Unsafe),
63
ParseTypeName(
TypeNames
.System_Runtime_CompilerServices_Unsafe),
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (7)
245
&& !parameter.GetAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute))
254
&& !methodSymbol.GetReturnTypeAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute))
264
=> generator.Attribute(
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute,
267
generator.DottedName(
TypeNames
.System_Runtime_InteropServices_UnmanagedType),
275
&& !methodSymbol.GetReturnTypeAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute))
293
=> generator.Attribute(
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute,
296
generator.DottedName(
TypeNames
.System_Runtime_InteropServices_UnmanagedType),
VirtualMethodPointerStubGenerator.cs (3)
222
new ReferenceTypeInfo(
TypeNames
.GlobalAlias +
TypeNames
.System_Exception,
TypeNames
.System_Exception),
VtableIndexStubGenerator.cs (10)
40
TypeNames
.VirtualMethodIndexAttribute,
201
INamedTypeSymbol? lcidConversionAttrType = environment.Compilation.GetTypeByMetadataName(
TypeNames
.LCIDConversionAttribute);
202
INamedTypeSymbol? suppressGCTransitionAttrType = environment.Compilation.GetTypeByMetadataName(
TypeNames
.SuppressGCTransitionAttribute);
203
INamedTypeSymbol? unmanagedCallConvAttrType = environment.Compilation.GetTypeByMetadataName(
TypeNames
.UnmanagedCallConvAttribute);
204
INamedTypeSymbol iUnmanagedInterfaceTypeType = environment.Compilation.GetTypeByMetadataName(
TypeNames
.IUnmanagedInterfaceType_Metadata)!;
213
&& attr.AttributeClass.ToDisplayString() ==
TypeNames
.VirtualMethodIndexAttribute)
273
generatorDiagnostics.ReportConfigurationNotSupported(lcidConversionAttr, nameof(
TypeNames
.LCIDConversionAttribute));
300
var unmanagedObjectUnwrapper = symbol.ContainingType.GetAttributes().FirstOrDefault(att => att.AttributeClass.IsOfType(
TypeNames
.UnmanagedObjectUnwrapperAttribute));
353
compilation.GetTypeByMetadataName(
TypeNames
.System_Exception),
419
if (!method.ContainingType.GetAttributes().Any(att => att.AttributeClass.IsOfType(
TypeNames
.UnmanagedObjectUnwrapperAttribute)))
VtableIndexStubGeneratorHelpers.cs (1)
19
=> DefaultMarshallingGeneratorResolver.Create(env, direction,
TypeNames
.VirtualMethodIndexAttribute_ShortName,
Microsoft.Interop.LibraryImportGenerator (37)
Analyzers\AddDisableRuntimeMarshallingAttributeFixer.cs (1)
66
editor.Generator.Attribute(editor.Generator.DottedName(
TypeNames
.System_Runtime_CompilerServices_DisableRuntimeMarshallingAttribute))));
Analyzers\ConvertToLibraryImportAnalyzer.cs (5)
55
INamedTypeSymbol? libraryImportAttrType = context.Compilation.GetBestTypeByMetadataName(
TypeNames
.LibraryImportAttribute);
142
AttributeData dllImportAttribute = method.GetAttributes().First(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.DllImportAttribute);
150
var factory = DefaultMarshallingGeneratorResolver.Create(env.EnvironmentFlags, MarshalDirection.ManagedToUnmanaged,
TypeNames
.LibraryImportAttribute_ShortName, []);
186
AttributeData? bestFitMappingContainingType = method.ContainingType.GetAttributes().FirstOrDefault(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_BestFitMappingAttribute);
192
AttributeData? bestFitMappingContainingAssembly = method.ContainingAssembly.GetAttributes().FirstOrDefault(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_BestFitMappingAttribute);
Analyzers\ConvertToLibraryImportFixer.cs (9)
205
INamedTypeSymbol? dllImportAttrType = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.DllImportAttribute);
210
INamedTypeSymbol libraryImportAttrType = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.LibraryImportAttribute)!;
405
TypeNames
.System_Runtime_InteropServices_Marshal)),
456
ITypeSymbol stringMarshallingType = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.StringMarshalling)!;
465
ITypeSymbol stringMarshallingType = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.StringMarshalling)!;
473
generator.TypeOfExpression(generator.TypeExpression(editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.AnsiStringMarshaller)))));
577
if (editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.UnmanagedCallConvAttribute) is null)
620
generator.TypeExpression(editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.System_Type)),
623
unmanagedCallConvAttribute = generator.Attribute(
TypeNames
.UnmanagedCallConvAttribute,
Analyzers\CustomMarshallerAttributeAnalyzer.cs (3)
621
if (context.Compilation.GetBestTypeByMetadataName(
TypeNames
.CustomMarshallerAttribute) is { } customMarshallerAttribute)
639
_spanOfT = compilation.GetBestTypeByMetadataName(
TypeNames
.System_Span_Metadata);
640
_readOnlySpanOfT = compilation.GetBestTypeByMetadataName(
TypeNames
.System_ReadOnlySpan_Metadata);
Analyzers\CustomMarshallerAttributeFixer.cs (4)
209
INamedTypeSymbol spanOfT = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.System_Span_Metadata)!;
210
INamedTypeSymbol readOnlySpanOfT = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.System_ReadOnlySpan_Metadata)!;
405
INamedTypeSymbol spanOfT = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.System_Span_Metadata)!;
406
INamedTypeSymbol readOnlySpanOfT = editor.SemanticModel.Compilation.GetBestTypeByMetadataName(
TypeNames
.System_ReadOnlySpan_Metadata)!;
Analyzers\NativeMarshallingAttributeAnalyzer.cs (1)
88
&& attrCreation.Type.ToDisplayString() ==
TypeNames
.NativeMarshallingAttribute)
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (1)
61
attr => attr.AttributeClass?.ToDisplayString() ==
TypeNames
.CustomMarshallerAttribute
LibraryImportGenerator.cs (6)
45
TypeNames
.LibraryImportAttribute,
241
&& attr.AttributeClass.ToDisplayString() ==
TypeNames
.LibraryImportAttribute)
297
generatorDiagnostics.ReportConfigurationNotSupported(lcidConversionAttr, nameof(
TypeNames
.LCIDConversionAttribute));
338
: DefaultMarshallingGeneratorResolver.Create(pinvokeStub.EnvironmentFlags, MarshalDirection.ManagedToUnmanaged,
TypeNames
.LibraryImportAttribute_ShortName, []);
394
$"{nameof(
TypeNames
.LibraryImportAttribute)}{Type.Delimiter}{nameof(StringMarshalling)}",
408
$"{nameof(
TypeNames
.LibraryImportAttribute)}{Type.Delimiter}{nameof(InteropAttributeMember.StringMarshallingCustomType)}");
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (7)
245
&& !parameter.GetAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute))
254
&& !methodSymbol.GetReturnTypeAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute))
264
=> generator.Attribute(
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute,
267
generator.DottedName(
TypeNames
.System_Runtime_InteropServices_UnmanagedType),
275
&& !methodSymbol.GetReturnTypeAttributes().Any(attr => attr.AttributeClass?.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute))
293
=> generator.Attribute(
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute,
296
generator.DottedName(
TypeNames
.System_Runtime_InteropServices_UnmanagedType),
Microsoft.Interop.LibraryImportGenerator.Downlevel (6)
DownlevelLibraryImportGenerator.cs (4)
44
TypeNames
.LibraryImportAttribute,
176
&& attr.AttributeClass.ToDisplayString() ==
TypeNames
.LibraryImportAttribute)
203
generatorDiagnostics.ReportConfigurationNotSupported(lcidConversionAttr, nameof(
TypeNames
.LCIDConversionAttribute));
287
$"{nameof(
TypeNames
.LibraryImportAttribute)}{Type.Delimiter}{nameof(StringMarshalling)}",
DownlevelLibraryImportGeneratorHelpers.cs (2)
52
new NoMarshallingInfoErrorResolver(
TypeNames
.LibraryImportAttribute_ShortName),
53
new CharMarshallingGeneratorResolver(useBlittableMarshallerForUtf16: false,
TypeNames
.LibraryImportAttribute_ShortName),
Microsoft.Interop.SourceGeneration (140)
ArrayMarshallingInfoProvider.cs (2)
51
arrayMarshaller = compilation.GetTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_PointerArrayMarshaller_Metadata);
56
arrayMarshaller = compilation.GetTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_ArrayMarshaller_Metadata);
ComInterfaceMarshallingInfoProvider.cs (2)
24
public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() ==
TypeNames
.GeneratedComInterfaceAttribute;
35
INamedTypeSymbol? comInterfaceMarshaller = compilation.GetTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_Marshalling_ComInterfaceMarshaller_Metadata);
CompilationExtensions.cs (2)
17
if (compilation.SourceModule.GetAttributes().Any(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.System_Runtime_CompilerServices_SkipLocalsInitAttribute))
21
if (compilation.SourceModule.GetAttributes().Any(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.System_Runtime_CompilerServices_DisableRuntimeMarshallingAttribute))
IncrementalGeneratorInitializationContextExtensions.cs (2)
21
TypeNames
.System_Runtime_CompilerServices_SkipLocalsInitAttribute,
32
TypeNames
.System_Runtime_CompilerServices_DisableRuntimeMarshallingAttribute,
ManualTypeMarshallingHelper.cs (4)
86
&& entryPointType.GetAttributes().Any(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.ContiguousCollectionMarshallerAttribute);
91
return entryPointType.GetAttributes().Any(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.CustomMarshallerAttribute);
155
var attrs = entryPointType.GetAttributes().Where(attr => attr.AttributeClass.ToDisplayString() ==
TypeNames
.CustomMarshallerAttribute).ToArray();
378
if (innerType.ToDisplayString() !=
TypeNames
.CustomMarshallerAttributeGenericPlaceholder)
MarshalAsParser.cs (3)
45
ParseName(
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute),
74
ParseName(
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute),
131
public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute;
MarshalAsWithCustomMarshallersParser.cs (6)
35
public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() ==
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute;
90
return CustomMarshallingInfoHelper.CreateMarshallingInfoByMarshallerTypeName(_compilation, type,
TypeNames
.ComVariantMarshaller);
102
UnmanagedType.BStr =>
TypeNames
.BStrStringMarshaller,
103
UnmanagedType.LPStr =>
TypeNames
.AnsiStringMarshaller,
104
UnmanagedType.LPTStr or UnmanagedType.LPWStr =>
TypeNames
.Utf16StringMarshaller,
105
MarshalAsInfo.UnmanagedType_LPUTF8Str =>
TypeNames
.Utf8StringMarshaller,
MarshallerShape.cs (4)
116
INamedTypeSymbol spanOfT = compilation.GetTypeByMetadataName(
TypeNames
.System_Span_Metadata)!;
120
INamedTypeSymbol readOnlySpanOfT = compilation.GetTypeByMetadataName(
TypeNames
.System_ReadOnlySpan_Metadata)!;
454
INamedTypeSymbol spanOfT = compilation.GetTypeByMetadataName(
TypeNames
.System_Span_Metadata)!;
459
INamedTypeSymbol readOnlySpanOfT = compilation.GetTypeByMetadataName(
TypeNames
.System_ReadOnlySpan_Metadata)!;
Marshalling\BreakingChangeDetector.cs (1)
26
if (info is { RefKind: RefKind.In or RefKind.RefReadOnlyParameter, MarshallingAttributeInfo: NativeMarshallingAttributeInfo(ManagedTypeInfo { DiagnosticFormattedName:
TypeNames
.ComVariantMarshaller }, _) }
Marshalling\MarshallingGeneratorExtensions.cs (2)
118
rehydratedAttributes.Add(Attribute(IdentifierName(
TypeNames
.System_Runtime_InteropServices_InAttribute)));
122
rehydratedAttributes.Add(Attribute(IdentifierName(
TypeNames
.System_Runtime_InteropServices_OutAttribute)));
MarshallingAttributeInfo.cs (7)
131
SpecialType.System_Void => CreateWellKnownComExceptionMarshallingData(
TypeNames
.ExceptionAsVoidMarshaller, unmanagedReturnType),
132
SpecialType.System_Int32 => CreateWellKnownComExceptionMarshallingData($"{
TypeNames
.ExceptionAsHResultMarshaller}<int>", unmanagedReturnType),
133
SpecialType.System_UInt32 => CreateWellKnownComExceptionMarshallingData($"{
TypeNames
.ExceptionAsHResultMarshaller}<uint>", unmanagedReturnType),
134
SpecialType.System_Single => CreateWellKnownComExceptionMarshallingData($"{
TypeNames
.ExceptionAsNaNMarshaller}<float>", unmanagedReturnType),
135
SpecialType.System_Double => CreateWellKnownComExceptionMarshallingData($"{
TypeNames
.ExceptionAsNaNMarshaller}<double>", unmanagedReturnType),
136
_ => CreateWellKnownComExceptionMarshallingData($"{
TypeNames
.ExceptionAsDefaultMarshaller}<{MarshallerHelpers.GetCompatibleGenericTypeParameterSyntax(SyntaxFactory.ParseTypeName(unmanagedReturnType.FullTypeName))}>", unmanagedReturnType),
141
ManagedTypeInfo marshallerTypeInfo = new ReferenceTypeInfo(
TypeNames
.GlobalAlias + marshallerName, marshallerName);
MarshalUsingAttributeParser.cs (2)
26
public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() ==
TypeNames
.MarshalUsingAttribute;
30
Debug.Assert(attributeData.AttributeClass!.ToDisplayString() ==
TypeNames
.MarshalUsingAttribute);
NativeMarshallingAttributeParser.cs (2)
20
public bool CanParseAttributeType(INamedTypeSymbol attributeType) => attributeType.ToDisplayString() ==
TypeNames
.NativeMarshallingAttribute;
24
Debug.Assert(attributeData.AttributeClass!.ToDisplayString() ==
TypeNames
.NativeMarshallingAttribute);
SafeHandleMarshallingInfoProvider.cs (2)
18
private readonly INamedTypeSymbol? _safeHandleType = compilation.GetBestTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_SafeHandle);
19
private readonly INamedTypeSymbol? _safeHandleMarshallerType = compilation.GetBestTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_Marshalling_SafeHandleMarshaller_Metadata);
SignatureContext.cs (1)
173
=> a.AttributeClass?.ToDisplayString() ==
TypeNames
.System_Runtime_CompilerServices_SkipLocalsInitAttribute;
StringMarshallingInfoProvider.cs (2)
62
CharEncoding.Utf16 => CustomMarshallingInfoHelper.CreateMarshallingInfoByMarshallerTypeName(_compilation, type,
TypeNames
.Utf16StringMarshaller),
63
CharEncoding.Utf8 => CustomMarshallingInfoHelper.CreateMarshallingInfoByMarshallerTypeName(_compilation, type,
TypeNames
.Utf8StringMarshaller),
StubEnvironment.cs (5)
30
_lcidConversionAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(
TypeNames
.LCIDConversionAttribute));
44
_suppressGCTransitionAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(
TypeNames
.SuppressGCTransitionAttribute));
58
_unmanagedCallConvAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(
TypeNames
.UnmanagedCallConvAttribute));
72
_defaultDllImportSearchPathsAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(
TypeNames
.DefaultDllImportSearchPathsAttribute));
86
_wasmImportLinkageAttrType = new Optional<INamedTypeSymbol?>(Compilation.GetTypeByMetadataName(
TypeNames
.WasmImportLinkageAttribute));
TypeNames.cs (83)
14
public static NameSyntax DllImportAttribute => _DllImportAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.DllImportAttribute);
17
public static NameSyntax LibraryImportAttribute => _LibraryImportAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.LibraryImportAttribute);
20
public static NameSyntax System_Runtime_InteropServices_DynamicInterfaceCastableImplementationAttribute => _System_Runtime_InteropServices_DynamicInterfaceCastableImplementationAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_DynamicInterfaceCastableImplementationAttribute);
23
public static NameSyntax System_Runtime_InteropServices_MarshalAsAttribute => _System_Runtime_InteropServices_MarshalAsAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_MarshalAsAttribute);
26
public static NameSyntax DefaultDllImportSearchPathsAttribute => _DefaultDllImportSearchPathsAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.DefaultDllImportSearchPathsAttribute);
29
public static NameSyntax SuppressGCTransitionAttribute => _SuppressGCTransitionAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.SuppressGCTransitionAttribute);
32
public static NameSyntax UnmanagedCallConvAttribute => _UnmanagedCallConvAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.UnmanagedCallConvAttribute);
35
public static NameSyntax System_Runtime_CompilerServices_SkipLocalsInitAttribute => _System_Runtime_CompilerServices_SkipLocalsInitAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_CompilerServices_SkipLocalsInitAttribute);
38
public static NameSyntax System_CodeDom_Compiler_GeneratedCodeAttribute => _System_CodeDom_Compiler_GeneratedCodeAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.System_CodeDom_Compiler_GeneratedCodeAttribute);
41
public static NameSyntax UnmanagedCallersOnlyAttribute => _UnmanagedCallersOnlyAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.UnmanagedCallersOnlyAttribute);
44
public static NameSyntax WasmImportLinkageAttribute => _WasmImportLinkageAttribute ??= ParseName(
TypeNames
.GlobalAlias +
TypeNames
.WasmImportLinkageAttribute);
55
public static TypeSyntax Nint { get; } = ParseTypeName(
TypeNames
.Nint);
58
public static TypeSyntax StringMarshalling => _StringMarshalling ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.StringMarshalling);
61
public static TypeSyntax System_Runtime_InteropServices_ComWrappers_ComInterfaceEntry => _System_Runtime_InteropServices_ComWrappers_ComInterfaceEntry ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_ComWrappers_ComInterfaceEntry);
64
public static TypeSyntax System_Runtime_InteropServices_NativeMemory => _System_Runtime_InteropServices_NativeMemory ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_NativeMemory);
67
public static TypeSyntax StrategyBasedComWrappers => _StrategyBasedComWrappers ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.StrategyBasedComWrappers);
70
public static TypeSyntax IUnmanagedVirtualMethodTableProvider => _IUnmanagedVirtualMethodTableProvider ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.IUnmanagedVirtualMethodTableProvider);
73
public static TypeSyntax IIUnknownInterfaceType => _IIUnknownInterfaceType ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.IIUnknownInterfaceType);
76
public static TypeSyntax IIUnknownDerivedDetails => _IIUnknownDerivedDetails ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.IIUnknownDerivedDetails);
79
public static TypeSyntax UnmanagedObjectUnwrapper => _UnmanagedObjectUnwrapper ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.UnmanagedObjectUnwrapper);
82
public static TypeSyntax IComExposedClass => _IComExposedClass ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.IComExposedClass);
85
public static TypeSyntax UnreachableException => _UnreachableException ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.UnreachableException);
88
public static TypeSyntax System_Runtime_CompilerServices_RuntimeHelpers => _System_Runtime_CompilerServices_RuntimeHelpers ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_CompilerServices_RuntimeHelpers);
91
public static TypeSyntax System_Runtime_InteropServices_ComWrappers => _System_Runtime_InteropServices_ComWrappers ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_ComWrappers);
94
public static TypeSyntax System_IntPtr => _System_IntPtr ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_IntPtr);
97
public static TypeSyntax System_Guid => _System_Guid ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Guid);
100
public static TypeSyntax DllImportSearchPath => _DllImportSearchPath ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.DllImportSearchPath);
103
public static TypeSyntax System_Type => _System_Type ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Type);
106
public static TypeSyntax System_Activator => _System_Activator ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Activator);
109
public static TypeSyntax System_Runtime_InteropServices_Marshal => _System_Runtime_InteropServices_Marshal ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_Marshal);
112
public static TypeSyntax System_Runtime_InteropServices_UnmanagedType => _System_Runtime_InteropServices_UnmanagedType ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_UnmanagedType);
115
public static TypeSyntax System_Runtime_InteropServices_MemoryMarshal => _System_Runtime_InteropServices_MemoryMarshal ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_MemoryMarshal);
118
public static TypeSyntax System_Exception => _System_Exception ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Exception);
121
public static TypeSyntax System_GC => _System_GC ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_GC);
124
public static TypeSyntax System_Runtime_InteropServices_ComWrappers_ComInterfaceDispatch => _System_Runtime_InteropServices_ComWrappers_ComInterfaceDispatch ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_InteropServices_ComWrappers_ComInterfaceDispatch);
127
public static TypeSyntax System_Runtime_CompilerServices_Unsafe => _System_Runtime_CompilerServices_Unsafe ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.System_Runtime_CompilerServices_Unsafe);
139
"Cdecl" => _CallConvCdecl ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.CallConvCdeclName),
140
"Fastcall" => _CallConvFastcall ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.CallConvFastcallName),
141
"MemberFunction" => _CallConvMemberFunction ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.CallConvMemberFunctionName),
142
"Stdcall" => _CallConvStdcall ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.CallConvStdcallName),
143
"SuppressGCTransition" => _CallConvSuppressGCTransition ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.CallConvSuppressGCTransitionName),
144
"Thiscall" => _CallConvThiscall ??= ParseTypeName(
TypeNames
.GlobalAlias +
TypeNames
.CallConvThiscallName),
TypePositionInfo.cs (2)
118
INamedTypeSymbol outAttributeType = compilation.GetTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_OutAttribute)!;
119
INamedTypeSymbol inAttributeType = compilation.GetTypeByMetadataName(
TypeNames
.System_Runtime_InteropServices_InAttribute)!;
TypeSymbolExtensions.cs (4)
76
if (t.ToDisplayString() is
TypeNames
.System_Runtime_InteropServices_CLong // CLong is an interop intrinsic type for the C long type
77
or
TypeNames
.System_Runtime_InteropServices_CULong // CULong is an interop intrinsic type for the C ulong type
78
or
TypeNames
.System_Runtime_InteropServices_NFloat) // NFloat is an interop intrinsic type for a pointer-sized floating point type
85
if (t.ToDisplayString() ==
TypeNames
.System_Guid) // .NET has established that Guid is blittable and matches the shape of the Win32 GUID type exactly and always will.
Utils\SyntaxFactoryExtensions.cs (2)
80
private static readonly SyntaxToken _span = Identifier(
TypeNames
.System_Span);
83
private static readonly SyntaxToken _readonlySpan = Identifier(
TypeNames
.System_ReadOnlySpan);