17 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 internal SolveWrapper(global::System.IntPtr cPtr,
bool cMemoryOwn) {
22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
SolveWrapper obj) {
26 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(
SolveWrapper obj) {
32 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
33 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
34 obj.swigCMemOwn =
false;
38 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
48 global::System.GC.SuppressFinalize(
this);
51 protected virtual void Dispose(
bool disposing) {
53 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
58 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
64 operations_research_satPINVOKE.SolveWrapper_SetStringParameters(swigCPtr, string_parameters);
86 int size = System.Runtime.InteropServices.Marshal.ReadInt32(dataPointer);
89 var data =
new System.ReadOnlySpan<
byte>((dataPointer +
sizeof(int)).ToPointer(), size);
92 }
catch (
Google.Protobuf.InvalidProtocolBufferException )
94 throw new System.Exception(
"Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");
103 operations_research_satPINVOKE.SolveWrapper_StopSearch(swigCPtr);