CSharp: fix LDKStr array decoding
[ldk-java] / c_sharp / src / org / ldk / structs / PeerHandleError.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  * Error for PeerManager errors. If you get one of these, you must disconnect the socket and
11  * generate no further read_event/write_buffer_space_avail/socket_disconnected calls for the
12  * descriptor.
13  */
14 public class PeerHandleError : CommonBase {
15         internal PeerHandleError(object _dummy, long ptr) : base(ptr) { }
16         ~PeerHandleError() {
17                 if (ptr != 0) { bindings.PeerHandleError_free(ptr); }
18         }
19
20         /**
21          * Constructs a new PeerHandleError given each field
22          */
23         public static PeerHandleError of() {
24                 long ret = bindings.PeerHandleError_new();
25                 if (ret >= 0 && ret <= 4096) { return null; }
26                 org.ldk.structs.PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerHandleError(null, ret); }
27                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(ret_hu_conv); };
28                 return ret_hu_conv;
29         }
30
31         internal long clone_ptr() {
32                 long ret = bindings.PeerHandleError_clone_ptr(this.ptr);
33                 GC.KeepAlive(this);
34                 return ret;
35         }
36
37         /**
38          * Creates a copy of the PeerHandleError
39          */
40         public PeerHandleError clone() {
41                 long ret = bindings.PeerHandleError_clone(this.ptr);
42                 GC.KeepAlive(this);
43                 if (ret >= 0 && ret <= 4096) { return null; }
44                 org.ldk.structs.PeerHandleError ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new org.ldk.structs.PeerHandleError(null, ret); }
45                 if (ret_hu_conv != null) { ret_hu_conv.ptrs_to.AddLast(this); };
46                 return ret_hu_conv;
47         }
48
49 }
50 } } }