[C#] Check in initial auto-generated C# bindings
[ldk-java] / c_sharp / src / org / ldk / structs / TwoTuple_BlockHashChannelManagerZ.cs
1 using org.ldk.impl;
2 using org.ldk.enums;
3 using org.ldk.util;
4 using System;
5
6 namespace org { namespace ldk { namespace structs {
7
8
9 /**
10  * A Tuple
11  */
12 public class TwoTuple_BlockHashChannelManagerZ : CommonBase {
13         internal TwoTuple_BlockHashChannelManagerZ(object _dummy, long ptr) : base(ptr) { }
14         ~TwoTuple_BlockHashChannelManagerZ() {
15                 if (ptr != 0) { bindings.C2Tuple_BlockHashChannelManagerZ_free(ptr); }
16         }
17
18         /**
19          * 
20          */
21         public byte[] get_a() {
22                 byte[] ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_a(this.ptr);
23                 GC.KeepAlive(this);
24                 return ret;
25         }
26
27         /**
28          * 
29          */
30         public ChannelManager get_b() {
31                 long ret = bindings.C2Tuple_BlockHashChannelManagerZ_get_b(this.ptr);
32                 GC.KeepAlive(this);
33                 if (ret >= 0 && ret <= 4096) { return null; }
34                 org.ldk.structs.ChannelManager ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.ChannelManager(null, ret); }
35                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
36                 return ret_hu_conv;
37         }
38
39         /**
40          * Creates a new C2Tuple_BlockHashChannelManagerZ from the contained elements.
41          */
42         public static TwoTuple_BlockHashChannelManagerZ of(byte[] a, FeeEstimator b_fee_est, Watch b_chain_monitor, BroadcasterInterface b_tx_broadcaster, Logger b_logger, KeysInterface b_keys_manager, UserConfig b_config, ChainParameters b_params) {
43                 long ret = bindings.C2Tuple_BlockHashChannelManagerZ_new(InternalUtils.check_arr_len(a, 32), bindings.ChannelManager_new(b_fee_est == null ? 0 : b_fee_est.ptr, b_chain_monitor == null ? 0 : b_chain_monitor.ptr, b_tx_broadcaster == null ? 0 : b_tx_broadcaster.ptr, b_logger == null ? 0 : b_logger.ptr, b_keys_manager == null ? 0 : b_keys_manager.ptr, b_config == null ? 0 : b_config.ptr, b_params == null ? 0 : b_params.ptr));
44                 GC.KeepAlive(a);
45                 GC.KeepAlive(b_fee_est);
46                 GC.KeepAlive(b_chain_monitor);
47                 GC.KeepAlive(b_tx_broadcaster);
48                 GC.KeepAlive(b_logger);
49                 GC.KeepAlive(b_keys_manager);
50                 GC.KeepAlive(b_config);
51                 GC.KeepAlive(b_params);
52                 if (ret >= 0 && ret <= 4096) { return null; }
53                 TwoTuple_BlockHashChannelManagerZ ret_hu_conv = new TwoTuple_BlockHashChannelManagerZ(null, ret);
54                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
55                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_fee_est); };
56                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_chain_monitor); };
57                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_tx_broadcaster); };
58                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_logger); };
59                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_keys_manager); };
60                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_config); };
61                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(b_params); };
62                 return ret_hu_conv;
63         }
64
65 }
66 } } }