47 references to IsByRef
Microsoft.Interop.ComInterfaceGenerator (4)
ComInterfaceGenerator.cs (2)
809
indexArgList = string.Join(", ", managedParams.Take(indexCount).Select(mp => $"{(mp.
IsByRef
? $"{MarshallerHelpers.GetManagedArgumentRefKindKeyword(mp)} " : "")}{mp.InstanceIdentifier}"));
869
+ $"({string.Join(", ", sigContext.ManagedParameters.Select(mp => $"{(mp.
IsByRef
? $"{MarshallerHelpers.GetManagedArgumentRefKindKeyword(mp)} " : "")}{mp.InstanceIdentifier}"))})";
Marshallers\StructAsHResultMarshallerFactory.cs (2)
52
return info.
IsByRef
? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType;
57
if (info.
IsByRef
)
Microsoft.Interop.JavaScript.JSImportGenerator (3)
JSGeneratorFactory.cs (1)
20
if (!info.IsErrorHandlingPosition && !info.IsManagedReturnPosition && (info.
IsByRef
|| info.ByValueContentsMarshalKind != ByValueContentsMarshalKind.Default))
Marshaling\BaseJSGenerator.cs (2)
18
public SignatureBehavior NativeSignatureBehavior => TypeInfo.
IsByRef
? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType;
20
public ValueBoundaryBehavior ValueBoundaryBehavior => TypeInfo.
IsByRef
? ValueBoundaryBehavior.AddressOfNativeIdentifier : ValueBoundaryBehavior.NativeIdentifier;
Microsoft.Interop.SourceGeneration (40)
ManagedToNativeStubGenerator.cs (1)
77
noMarshallingNeeded &= (generator.IsBlittable() && !generator.TypeInfo.
IsByRef
) || generator.IsForwarder();
Marshalling\BlittableMarshaller.cs (6)
15
return info.
IsByRef
? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType;
20
if (!info.
IsByRef
)
33
if (!info.
IsByRef
|| codeContext.IsInStubReturnPosition(info))
54
if (direction is MarshalDirection.ManagedToUnmanaged or MarshalDirection.Bidirectional && info.
IsByRef
)
61
if (direction is MarshalDirection.UnmanagedToManaged or MarshalDirection.Bidirectional && info.
IsByRef
)
73
return info.
IsByRef
&& !context.IsInStubReturnPosition(info) && !context.SingleFrameSpansNativeContext;
Marshalling\BoolMarshaller.cs (2)
32
return info.
IsByRef
? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType;
37
if (info.
IsByRef
)
Marshalling\ByValueMarshalKindSupportDescriptor.cs (1)
64
if (info.
IsByRef
)
Marshalling\CharMarshaller.cs (5)
23
else if (info.
IsByRef
)
39
return info.
IsByRef
? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType;
72
if (info.
IsByRef
)
94
return !IsPinningPathSupported(info, context) && (elementMarshalDirection != MarshalDirection.ManagedToUnmanaged || info.
IsByRef
);
101
&& info.
IsByRef
;
Marshalling\CustomTypeMarshallingGenerator.cs (3)
12
public ValueBoundaryBehavior ValueBoundaryBehavior => TypeInfo.
IsByRef
? ValueBoundaryBehavior.AddressOfNativeIdentifier : ValueBoundaryBehavior.NativeIdentifier;
16
public SignatureBehavior NativeSignatureBehavior => TypeInfo.
IsByRef
? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType;
91
&& !TypeInfo.
IsByRef
Marshalling\DelegateMarshaller.cs (2)
15
return info.
IsByRef
? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType;
20
return info.
IsByRef
? ValueBoundaryBehavior.AddressOfNativeIdentifier : ValueBoundaryBehavior.NativeIdentifier;
Marshalling\IidParameterIndexMarshallerResolver.cs (2)
23
public SignatureBehavior GetNativeSignatureBehavior(TypePositionInfo info) => info.
IsByRef
? SignatureBehavior.PointerToNativeType : SignatureBehavior.NativeType;
26
=> info.
IsByRef
? ValueBoundaryBehavior.AddressOfNativeIdentifier : ValueBoundaryBehavior.NativeIdentifier;
Marshalling\MarshallerHelpers.cs (5)
94
return context.SingleFrameSpansNativeContext && (!info.
IsByRef
|| info.RefKind == RefKind.In || info.RefKind == RefKind.RefReadOnlyParameter);
270
if (!info.
IsByRef
)
292
if (!info.
IsByRef
)
346
if (countInfo.ElementInfo.
IsByRef
&& countInfo.ElementInfo.RefKind is RefKind.Out)
381
if (typeInfo.
IsByRef
)
Marshalling\MarshallingGeneratorExtensions.cs (3)
72
ValueBoundaryBehavior.ManagedIdentifier => generator.TypeInfo.
IsByRef
? param : managed,
125
ValueBoundaryBehavior.ManagedIdentifier when !info.
IsByRef
=> managedIdentifier,
138
return info.
IsByRef
Marshalling\StatefulMarshallingStrategy.cs (4)
209
if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
215
if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
252
if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
257
if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StatelessMarshallingStrategy.cs (5)
253
if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
381
if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
386
if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
415
if (CodeContext.Direction == MarshalDirection.ManagedToUnmanaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind.HasFlag(ByValueContentsMarshalKind.Out))
420
if (CodeContext.Direction == MarshalDirection.UnmanagedToManaged && !TypeInfo.
IsByRef
&& TypeInfo.ByValueContentsMarshalKind == ByValueContentsMarshalKind.Out)
Marshalling\StaticPinnableManagedValueMarshaller.cs (1)
61
return context.SingleFrameSpansNativeContext && !TypeInfo.
IsByRef
&& !context.IsInStubReturnPosition(TypeInfo);