Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -278,13 +278,13 @@ public static void ImplType(

// Track rewriting the two parameters for this method
emitState.TrackManagedParameterMethodRewrite(
paraneterType: senderType,
parameterType: senderType,
method: invokeMethod,
marker: nop_parameter1Rewrite,
parameterIndex: 1);

emitState.TrackManagedParameterMethodRewrite(
paraneterType: argsType,
parameterType: argsType,
method: invokeMethod,
marker: nop_parameter2Rewrite,
parameterIndex: 2);
Expand Down Expand Up @@ -650,15 +650,15 @@ public static void NativeDelegateType(

// Track rewriting the two parameters for this method
emitState.TrackNativeParameterMethodRewrite(
paraneterType: senderType,
parameterType: senderType,
method: invokeMethod,
tryMarker: nop_try_sender,
loadMarker: nop_ld_sender,
finallyMarker: nop_finally_sender,
parameterIndex: 1);

emitState.TrackNativeParameterMethodRewrite(
paraneterType: argsType,
parameterType: argsType,
method: invokeMethod,
tryMarker: nop_try_args,
loadMarker: nop_ld_args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,33 @@ public static void ImplType(
ModuleDefinition module,
out TypeDefinition implType)
{
// Define the 'GetAt' method
MethodDefinition getAtMethod = InteropMethodDefinitionFactory.IReadOnlyList1Impl.GetAt(
readOnlyListType: readOnlyListType,
interopReferences: interopReferences,
emitState: emitState,
module: module);

// Define the 'get_Size' method
MethodDefinition sizeMethod = InteropMethodDefinitionFactory.IReadOnlyList1Impl.get_Size(
readOnlyListType: readOnlyListType,
interopReferences: interopReferences,
module: module);

// Define the 'IndexOf' method
MethodDefinition indexOfMethod = InteropMethodDefinitionFactory.IReadOnlyList1Impl.IndexOf(
readOnlyListType: readOnlyListType,
interopReferences: interopReferences,
emitState: emitState,
module: module);

// Define the 'GetMany' method
MethodDefinition getManyMethod = InteropMethodDefinitionFactory.IReadOnlyList1Impl.GetMany(
readOnlyListType: readOnlyListType,
interopReferences: interopReferences,
emitState: emitState,
module: module);

Impl(
interfaceType: ComInterfaceType.InterfaceIsIInspectable,
ns: InteropUtf8NameFactory.TypeNamespace(readOnlyListType),
Expand All @@ -435,7 +462,11 @@ public static void ImplType(
interopReferences: interopReferences,
module: module,
implType: out implType,
vtableMethods: []);
vtableMethods: [
getAtMethod,
sizeMethod,
indexOfMethod,
getManyMethod]);

// Track the type (it may be needed by COM interface entries for user-defined types)
emitState.TrackTypeDefinition(implType, readOnlyListType, "Impl");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ public static MethodDefinition Insert(

// Track rewriting the two parameters for this method
emitState.TrackNativeParameterMethodRewrite(
paraneterType: keyType,
parameterType: keyType,
method: insertMethod,
tryMarker: nop_try_key,
loadMarker: nop_ld_key,
finallyMarker: nop_finally_key,
parameterIndex: 1);

emitState.TrackNativeParameterMethodRewrite(
paraneterType: valueType,
parameterType: valueType,
method: insertMethod,
tryMarker: nop_try_value,
loadMarker: nop_ld_value,
Expand Down Expand Up @@ -259,7 +259,7 @@ public static MethodDefinition Remove(

// Track rewriting the return value for this method
emitState.TrackNativeParameterMethodRewrite(
paraneterType: keyType,
parameterType: keyType,
method: removeMethod,
tryMarker: nop_try_key,
loadMarker: nop_ld_key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static MethodDefinition HasKey(

// Track rewriting the return value for this method
emitState.TrackNativeParameterMethodRewrite(
paraneterType: keyType,
parameterType: keyType,
method: hasKeyMethod,
tryMarker: nop_try_key,
loadMarker: nop_ld_key,
Expand Down Expand Up @@ -253,7 +253,7 @@ public static MethodDefinition Lookup(

// Track rewriting the 'key' parameter for this method
emitState.TrackNativeParameterMethodRewrite(
paraneterType: keyType,
parameterType: keyType,
method: lookupMethod,
tryMarker: nop_try_key,
loadMarker: nop_ld_key,
Expand Down
Loading
Loading