コード例 #1
0
        private unsafe Mpos(AbecsStream stream, string encryptionKey, string storagePath)
        {
            NotificationPin = HandleNotificationCallback;
            OperationPin    = HandleOperationCompletedCallback;

            this.stream   = stream;
            EncryptionKey = encryptionKey;
            StoragePath   = storagePath;
            nativeMpos    = Native.Create(stream, NotificationPin, OperationPin);
            TMSStorage    = new TMSStorage(storagePath);
        }
コード例 #2
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (stream != null)
                {
                    stream.Dispose();
                    stream = null;
                }
            }

            if (nativeMpos != IntPtr.Zero)
            {
                Native.Free(nativeMpos);
            }
        }
コード例 #3
0
 protected unsafe IntPtr Convert(AbecsStream stream)
 {
     return((IntPtr)stream.NativeStream);
 }
コード例 #4
0
 public IntPtr Create(AbecsStream stream, MposNotificationCallbackDelegate notificationCallback, MposOperationCompletedCallbackDelegate operationCompletedCallback)
 {
     return(CreateExtern(Convert(stream), notificationCallback, operationCompletedCallback));
 }
コード例 #5
0
ファイル: Native.cs プロジェクト: pagarme/mpos-net-sdk
 public static IntPtr Create(AbecsStream stream, MposNotificationCallbackDelegate notificationCallback, MposOperationCompletedCallbackDelegate operationCompletedCallback)
 {
     return(Dll.Create(stream, notificationCallback, operationCompletedCallback));
 }