示例#1
0
        public static int SendMessage(this IEpos2CommBox This, string message, string targetId, Epos2CommBoxSendMessageDelegate @delegate)
        {
            if (message == null)
            {
                throw new ArgumentNullException("message");
            }
            if (targetId == null)
            {
                throw new ArgumentNullException("targetId");
            }
            if (@delegate == null)
            {
                throw new ArgumentNullException("@delegate");
            }
            var nsmessage  = NSString.CreateNative(message);
            var nstargetId = NSString.CreateNative(targetId);

            int ret;

            ret = global::ApiDefinition.Messaging.int_objc_msgSend_IntPtr_IntPtr_IntPtr(This.Handle, Selector.GetHandle("sendMessage:targetId:delegate:"), nsmessage, nstargetId, @delegate.Handle);
            NSString.ReleaseNative(nsmessage);
            NSString.ReleaseNative(nstargetId);

            return(ret);
        }
示例#2
0
 public static void SetConnectionEventDelegate(this IEpos2CommBox This, Epos2ConnectionDelegate @delegate)
 {
     if (@delegate == null)
     {
         throw new ArgumentNullException("@delegate");
     }
     global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(This.Handle, Selector.GetHandle("setConnectionEventDelegate:"), @delegate.Handle);
 }
示例#3
0
 public static int GetCommHistory(this IEpos2CommBox This, Epos2GetCommHistoryDelegate @delegate)
 {
     if (@delegate == null)
     {
         throw new ArgumentNullException("@delegate");
     }
     return(global::ApiDefinition.Messaging.int_objc_msgSend_IntPtr(This.Handle, Selector.GetHandle("getCommHistory:"), @delegate.Handle));
 }
示例#4
0
        public static int Connect(this IEpos2CommBox This, string target, global::System.nint timeout, string myId)
        {
            if (target == null)
            {
                throw new ArgumentNullException("target");
            }
            if (myId == null)
            {
                throw new ArgumentNullException("myId");
            }
            var nstarget = NSString.CreateNative(target);
            var nsmyId   = NSString.CreateNative(myId);

            int ret;

            ret = global::ApiDefinition.Messaging.int_objc_msgSend_IntPtr_nint_IntPtr(This.Handle, Selector.GetHandle("connect:timeout:myId:"), nstarget, timeout, nsmyId);
            NSString.ReleaseNative(nstarget);
            NSString.ReleaseNative(nsmyId);

            return(ret);
        }
示例#5
0
 public static void Dealloc(this IEpos2CommBox This)
 {
     global::ApiDefinition.Messaging.void_objc_msgSend(This.Handle, Selector.GetHandle("dealloc"));
 }
示例#6
0
 public static string GetLocation(this IEpos2CommBox This)
 {
     return(NSString.FromHandle(global::ApiDefinition.Messaging.IntPtr_objc_msgSend(This.Handle, Selector.GetHandle("getLocation"))));
 }
示例#7
0
 public static Epos2CommBoxStatusInfo GetStatus(this IEpos2CommBox This)
 {
     return(Runtime.GetNSObject <Epos2CommBoxStatusInfo> (global::ApiDefinition.Messaging.IntPtr_objc_msgSend(This.Handle, Selector.GetHandle("getStatus"))));
 }
示例#8
0
 public static int GetDisconnect(this IEpos2CommBox This)
 {
     return(global::ApiDefinition.Messaging.int_objc_msgSend(This.Handle, Selector.GetHandle("disconnect")));
 }