15 using System.Collections;
18 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
23 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
26 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
SolutionCallback obj) {
27 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
36 global::System.GC.SuppressFinalize(
this);
39 protected virtual void Dispose(
bool disposing) {
41 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
46 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
115 byte[] tmp =
new byte[4];
117 System.Runtime.InteropServices.Marshal.Copy(data, tmp, 0, 4);
118 int size = System.BitConverter.ToInt32(tmp, 0);
119 byte[] buf =
new byte[size + 4];
120 System.Runtime.InteropServices.Marshal.Copy(data, buf, 0, size + 4);
123 Google.Protobuf.CodedInputStream input =
124 new Google.Protobuf.CodedInputStream(buf, 4, size);
128 }
catch (
Google.Protobuf.InvalidProtocolBufferException ) {
129 throw new System.Exception(
130 "Unable to parse Google.OrTools.Sat.CpSolverResponse protocol message.");
135 SwigDirectorConnect();
138 private void SwigDirectorConnect() {
139 if (SwigDerivedClassHasMethod(
"OnSolutionCallback", swigMethodTypes0))
144 private bool SwigDerivedClassHasMethod(
string methodName, global::System.Type[] methodTypes) {
145 global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance,
null, methodTypes,
null);
146 bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(
SolutionCallback));
147 return hasDerivedMethod;
150 private void SwigDirectorMethodOnSolutionCallback() {
158 private static global::System.Type[] swigMethodTypes0 =
new global::System.Type[] { };