Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Added several stubs for Dictionary, Stack, System.EventHandler #1019

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 @@ -515,6 +515,10 @@ JSIL.MakeClass("System.Object", "System.Collections.Generic.Dictionary`2", true,
$.Property({ Public: true, Static: false }, "Keys");
$.Property({ Public: true, Static: false }, "Values");

$.ExternalMethod({ Static: false, Public: true }, "get_Values",
(new JSIL.MethodSignature($jsilcore.TypeRef("System.Collections.Generic.Dictionary`2+ValueCollection", [new JSIL.GenericParameter("TKey", "System.Collections.Generic.Dictionary`2"), new JSIL.GenericParameter("TValue", "System.Collections.Generic.Dictionary`2")]), [], []))
);

$.ImplementInterfaces(
$jsilcore.TypeRef("System.Collections.Generic.IEnumerable`1", [$jsilcore.TypeRef("System.Collections.Generic.KeyValuePair`2", [new JSIL.GenericParameter("TKey", "System.Collections.Generic.Dictionary`2"), new JSIL.GenericParameter("TValue", "System.Collections.Generic.Dictionary`2")])]),
$jsilcore.TypeRef("System.Collections.IEnumerable"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,19 @@ JSIL.MakeClass("System.Object", "System.Collections.Generic.Stack`1", true, ["T"
"System.Collections.IEnumerable"
);
});

JSIL.MakeType({
BaseType: $jsilcore.TypeRef("System.ValueType"),
Name: "System.Collections.Generic.Stack`1+Enumerator",
IsPublic: true,
IsReferenceType: false,
GenericParameters: ["T"],
MaximumConstructorArguments: 1,
}, function ($) {
$.ImplementInterfaces(
$jsilcore.TypeRef("System.Collections.Generic.IEnumerator`1", [new JSIL.GenericParameter("T", "System.Collections.Generic.Stack`1+Enumerator")]),
$jsilcore.TypeRef("System.IDisposable"),
$jsilcore.TypeRef("System.Collections.IEnumerator")
);
});
//? }
1 change: 1 addition & 0 deletions JSIL.Libraries/Includes/Bootstrap/Core/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ JSIL.MakeClass("System.ComponentModel.TypeConverter", "System.ComponentModel.Exp

JSIL.MakeDelegate("System.Action", true, [], JSIL.MethodSignature.Void);
JSIL.MakeDelegate("System.Action`1", true, ["T"], new JSIL.MethodSignature(null, [new JSIL.GenericParameter("T", "System.Action`1").in()]));
JSIL.MakeDelegate("System.EventHandler`1", true, ["T"], new JSIL.MethodSignature(null, [new JSIL.GenericParameter("T", "System.EventHandler`1").in()]));
JSIL.MakeDelegate("System.Func`1", true, ["TResult"], new JSIL.MethodSignature(new JSIL.GenericParameter("TResult", "System.Func`1").out(), null));
JSIL.MakeDelegate("System.Func`2", true, ["T", "TResult"], new JSIL.MethodSignature(new JSIL.GenericParameter("TResult", "System.Func`2").out(), [new JSIL.GenericParameter("T", "System.Func`2").in()]));

Expand Down