Created
December 18, 2015 12:14
-
-
Save ProductiveRage/2351c4cc924614d7f4a3 to your computer and use it in GitHub Desktop.
The start of a binding for the Immutable-Js list for Bridge.NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Bridge; | |
namespace BridgeImmutableJsBinding.ImmutableJsBindings | |
{ | |
[Name("Immutable.List")] | |
[Ignore] | |
public static class List | |
{ | |
[Ignore] | |
public extern static ImmutableList<T> Of<T>(params T[] values); | |
} | |
[Ignore] | |
public sealed class ImmutableList<T> | |
{ | |
private ImmutableList() { } // This should never be instantiated directly | |
public extern T this[int index] { [Template("get({0})")] get; } | |
public extern int Count { [Name("count")] get; } | |
[Ignore] | |
public extern ImmutableList<T> Push(params T[] values); | |
[Ignore] | |
public extern ImmutableList<T> Pop(); | |
[Ignore] | |
public extern T[] ToArray(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment