X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FTwoTuple_OutPointChannelIdZ.cs;fp=c_sharp%2Fsrc%2Forg%2Fldk%2Fstructs%2FTwoTuple_OutPointChannelIdZ.cs;h=a13da11c9f915f4c83bcceb6b08685bb26d16c9c;hb=592c64eb658d92e314a2b983cea16cecf3882474;hp=0000000000000000000000000000000000000000;hpb=12fdbefaac81d5b4be6bb67addd6dcd7c46a182b;p=ldk-java diff --git a/c_sharp/src/org/ldk/structs/TwoTuple_OutPointChannelIdZ.cs b/c_sharp/src/org/ldk/structs/TwoTuple_OutPointChannelIdZ.cs new file mode 100644 index 00000000..a13da11c --- /dev/null +++ b/c_sharp/src/org/ldk/structs/TwoTuple_OutPointChannelIdZ.cs @@ -0,0 +1,77 @@ +using org.ldk.impl; +using org.ldk.enums; +using org.ldk.util; +using System; + +namespace org { namespace ldk { namespace structs { + + +/** + * A Tuple + */ +public class TwoTuple_OutPointChannelIdZ : CommonBase { + internal TwoTuple_OutPointChannelIdZ(object _dummy, long ptr) : base(ptr) { } + ~TwoTuple_OutPointChannelIdZ() { + if (ptr != 0) { bindings.C2Tuple_OutPointChannelIdZ_free(ptr); } + } + + /** + * + */ + public OutPoint get_a() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_get_a(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.OutPoint ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.OutPoint(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * + */ + public ChannelId get_b() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_get_b(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + org.ldk.structs.ChannelId ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelId(null, ret); } + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + internal long clone_ptr() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_clone_ptr(this.ptr); + GC.KeepAlive(this); + return ret; + } + + /** + * Creates a new tuple which has the same data as `orig` + * but with all dynamically-allocated buffers duplicated in new buffers. + */ + public TwoTuple_OutPointChannelIdZ clone() { + long ret = bindings.C2Tuple_OutPointChannelIdZ_clone(this.ptr); + GC.KeepAlive(this); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); }; + return ret_hu_conv; + } + + /** + * Creates a new C2Tuple_OutPointChannelIdZ from the contained elements. + */ + public static TwoTuple_OutPointChannelIdZ of(org.ldk.structs.OutPoint a, org.ldk.structs.ChannelId b) { + long ret = bindings.C2Tuple_OutPointChannelIdZ_new(a.ptr, b.ptr); + GC.KeepAlive(a); + GC.KeepAlive(b); + if (ret >= 0 && ret <= 4096) { return null; } + TwoTuple_OutPointChannelIdZ ret_hu_conv = new TwoTuple_OutPointChannelIdZ(null, ret); + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(a); }; + if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b); }; + return ret_hu_conv; + } + +} +} } }