132 lines
5.6 KiB
C#
132 lines
5.6 KiB
C#
//------------------------------------------------------------------------------
|
|
// <auto-generated />
|
|
//
|
|
// This file was automatically generated by SWIG (http://www.swig.org).
|
|
// Version 3.0.12
|
|
//
|
|
// Do not make changes to this file unless you know what you are doing--modify
|
|
// the SWIG interface file instead.
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace ons {
|
|
|
|
public class Producer : global::System.IDisposable {
|
|
private global::System.Runtime.InteropServices.HandleRef swigCPtr;
|
|
protected bool swigCMemOwn;
|
|
|
|
internal Producer(global::System.IntPtr cPtr, bool cMemoryOwn) {
|
|
swigCMemOwn = cMemoryOwn;
|
|
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
|
|
}
|
|
|
|
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Producer obj) {
|
|
return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
|
|
}
|
|
|
|
~Producer() {
|
|
Dispose();
|
|
}
|
|
|
|
public virtual void Dispose() {
|
|
lock(this) {
|
|
if (swigCPtr.Handle != global::System.IntPtr.Zero) {
|
|
if (swigCMemOwn) {
|
|
swigCMemOwn = false;
|
|
ONSClient4CPPPINVOKE.delete_Producer(swigCPtr);
|
|
}
|
|
swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
|
|
}
|
|
global::System.GC.SuppressFinalize(this);
|
|
}
|
|
}
|
|
|
|
public Producer() : this(ONSClient4CPPPINVOKE.new_Producer(), true) {
|
|
SwigDirectorConnect();
|
|
}
|
|
|
|
public virtual void start() {
|
|
ONSClient4CPPPINVOKE.Producer_start(swigCPtr);
|
|
}
|
|
|
|
public virtual void shutdown() {
|
|
ONSClient4CPPPINVOKE.Producer_shutdown(swigCPtr);
|
|
}
|
|
|
|
public virtual SendResultONS send(Message msg) {
|
|
SendResultONS ret = new SendResultONS(ONSClient4CPPPINVOKE.Producer_send__SWIG_0(swigCPtr, Message.getCPtr(msg)), true);
|
|
if (ONSClient4CPPPINVOKE.SWIGPendingException.Pending) throw ONSClient4CPPPINVOKE.SWIGPendingException.Retrieve();
|
|
return ret;
|
|
}
|
|
|
|
public virtual SendResultONS send(Message msg, MessageQueueONS mq) {
|
|
SendResultONS ret = new SendResultONS(ONSClient4CPPPINVOKE.Producer_send__SWIG_1(swigCPtr, Message.getCPtr(msg), MessageQueueONS.getCPtr(mq)), true);
|
|
if (ONSClient4CPPPINVOKE.SWIGPendingException.Pending) throw ONSClient4CPPPINVOKE.SWIGPendingException.Retrieve();
|
|
return ret;
|
|
}
|
|
|
|
public virtual void sendOneway(Message msg) {
|
|
ONSClient4CPPPINVOKE.Producer_sendOneway(swigCPtr, Message.getCPtr(msg));
|
|
if (ONSClient4CPPPINVOKE.SWIGPendingException.Pending) throw ONSClient4CPPPINVOKE.SWIGPendingException.Retrieve();
|
|
}
|
|
|
|
private void SwigDirectorConnect() {
|
|
if (SwigDerivedClassHasMethod("start", swigMethodTypes0))
|
|
swigDelegate0 = new SwigDelegateProducer_0(SwigDirectorstart);
|
|
if (SwigDerivedClassHasMethod("shutdown", swigMethodTypes1))
|
|
swigDelegate1 = new SwigDelegateProducer_1(SwigDirectorshutdown);
|
|
if (SwigDerivedClassHasMethod("send", swigMethodTypes2))
|
|
swigDelegate2 = new SwigDelegateProducer_2(SwigDirectorsend__SWIG_0);
|
|
if (SwigDerivedClassHasMethod("send", swigMethodTypes3))
|
|
swigDelegate3 = new SwigDelegateProducer_3(SwigDirectorsend__SWIG_1);
|
|
if (SwigDerivedClassHasMethod("sendOneway", swigMethodTypes4))
|
|
swigDelegate4 = new SwigDelegateProducer_4(SwigDirectorsendOneway);
|
|
ONSClient4CPPPINVOKE.Producer_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4);
|
|
}
|
|
|
|
private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
|
|
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);
|
|
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(Producer));
|
|
return hasDerivedMethod;
|
|
}
|
|
|
|
private void SwigDirectorstart() {
|
|
start();
|
|
}
|
|
|
|
private void SwigDirectorshutdown() {
|
|
shutdown();
|
|
}
|
|
|
|
private global::System.IntPtr SwigDirectorsend__SWIG_0(global::System.IntPtr msg) {
|
|
return SendResultONS.getCPtr(send(new Message(msg, false))).Handle;
|
|
}
|
|
|
|
private global::System.IntPtr SwigDirectorsend__SWIG_1(global::System.IntPtr msg, global::System.IntPtr mq) {
|
|
return SendResultONS.getCPtr(send(new Message(msg, false), new MessageQueueONS(mq, false))).Handle;
|
|
}
|
|
|
|
private void SwigDirectorsendOneway(global::System.IntPtr msg) {
|
|
sendOneway(new Message(msg, false));
|
|
}
|
|
|
|
public delegate void SwigDelegateProducer_0();
|
|
public delegate void SwigDelegateProducer_1();
|
|
public delegate global::System.IntPtr SwigDelegateProducer_2(global::System.IntPtr msg);
|
|
public delegate global::System.IntPtr SwigDelegateProducer_3(global::System.IntPtr msg, global::System.IntPtr mq);
|
|
public delegate void SwigDelegateProducer_4(global::System.IntPtr msg);
|
|
|
|
private SwigDelegateProducer_0 swigDelegate0;
|
|
private SwigDelegateProducer_1 swigDelegate1;
|
|
private SwigDelegateProducer_2 swigDelegate2;
|
|
private SwigDelegateProducer_3 swigDelegate3;
|
|
private SwigDelegateProducer_4 swigDelegate4;
|
|
|
|
private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] { };
|
|
private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] { };
|
|
private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] { typeof(Message) };
|
|
private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] { typeof(Message), typeof(MessageQueueONS) };
|
|
private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] { typeof(Message) };
|
|
}
|
|
|
|
}
|