Exemplo n.º 1
0
 public TDelegateInterop Convert()
 {
     return(GCHelper.ManualFree(releaseGC =>
     {
         this.releaseGC = releaseGC;
         return convert;
     }));
 }
Exemplo n.º 2
0
 public static Native.MposClosedCallbackDelegate Callback(Mpos mpos, TaskCompletionSource <bool> source)
 {
     return(GCHelper.ManualFree <Native.MposClosedCallbackDelegate>(releaseGC =>
     {
         return (mposPtr, err) =>
         {
             releaseGC();
             return callback(mpos, source, err);
         };
     }));
 }
 public static MposTablesLoadedCallbackDelegate Callback(Mpos mpos, int amount, IEnumerable <EmvApplication> applications, PaymentMethod magstripePaymentMethod, TaskCompletionSource <PaymentResult> source)
 {
     return(GCHelper.ManualFree <MposTablesLoadedCallbackDelegate>(releaseGC =>
     {
         return (mposPtr, tableError, loaded) =>
         {
             releaseGC();
             return callback(mpos, amount, applications, magstripePaymentMethod, source);
         };
     }));
 }
 public static MposGetTableVersionCallbackDelegate Callback(Mpos mpos, MposTablesLoadedCallbackDelegate tableCallback, int amount, PaymentMethod magstripePaymentMethod, TaskCompletionSource <PaymentResult> source)
 {
     return(GCHelper.ManualFree <MposGetTableVersionCallbackDelegate>(releaseGC =>
     {
         return (mposPtr, err, version) =>
         {
             releaseGC();
             return callback(mpos, tableCallback, version);
         };
     }));
 }
Exemplo n.º 5
0
 public static MposTablesLoadedCallbackDelegate Callback(Mpos mpos, TaskCompletionSource <Boolean> source)
 {
     return(GCHelper.ManualFree <MposTablesLoadedCallbackDelegate>(releaseGC =>
     {
         return (mposPtr, tableError, loaded) =>
         {
             releaseGC();
             return callback(mpos, source, tableError, loaded);
         };
     }));
 }
 public static MposFinishTransactionCallbackDelegate Callback(Mpos mpos, TaskCompletionSource <bool> source)
 {
     return(GCHelper.ManualFree <MposFinishTransactionCallbackDelegate>(releaseGC =>
     {
         return (mposPtr, err) =>
         {
             releaseGC();
             return callback(mpos, source, err);
         };
     }));
 }
Exemplo n.º 7
0
        public static Native.MposPaymentCallbackDelegate Callback(Mpos mpos, TaskCompletionSource <PaymentResult> source)
        {
            return(GCHelper.ManualFree <Native.MposPaymentCallbackDelegate>(releaseGC =>
            {
                return (mposPtr, err, info) =>
                {
                    releaseGC();

                    var instance = new MposPaymentCallback();
                    instance.info = info;

                    return instance.handleResult(mpos, source, err);
                };
            }));
        }
Exemplo n.º 8
0
        public static MposExtractKeysCallbackDelegate Callback(Mpos mpos, bool forceUpdate, TaskCompletionSource <bool> source)
        {
            return(GCHelper.ManualFree <MposExtractKeysCallbackDelegate>(releaseGC =>
            {
                return (mposPtr, err, keyList) =>
                {
                    releaseGC();

                    var instance = new MposExtractKeysCallback();

                    instance.keyList = keyList;

                    return instance.processTables(mpos, forceUpdate, source);
                };
            }));
        }
Exemplo n.º 9
0
        public static TmsStoreCallbackDelegate Callback(Mpos mpos, bool forceUpdate, TaskCompletionSource <bool> source)
        {
            return(GCHelper.ManualFree <TmsStoreCallbackDelegate>(releaseGC =>
            {
                return (version, capkList, aidList, appList, riskProfileList, acquirerList, userData) =>
                {
                    releaseGC();

                    var instance = new TmsStoreCallback()
                    {
                        capkList = capkList,
                        aidList = aidList,
                        appList = appList,
                        riskProfileList = riskProfileList,
                        acquirerList = acquirerList
                    };

                    return instance.insertDataIntoStorage(mpos, forceUpdate, source, version);
                };
            }));
        }