Пример #1
0
        public ReadMessage(IMap map, string iso)
        {
            //create the data elements
            _dataElements = new Dictionary <short, IDataElementBasic>();

            //create the bitmap manager
            _bitmapManager = new BitmapManager();

            //save the ISO8583 msg
            this._iso = iso;

            //get the MTI and remove it
            _MTI = iso.Substring(0, Util.MTI_LENGTH);
            iso  = iso.Remove(0, Util.MTI_LENGTH);

            do
            {
                //get all bitmaps and remove them
                _bitmapManager.AddBitmap(new Bitmap.Bitmap()
                {
                    BitmapHex = iso.Substring(0, Util.BTIMAP_LENGTH)
                });
                iso = iso.Remove(0, Util.BTIMAP_LENGTH);
            } while (_bitmapManager.HasNextBitmap());

            //save the dataFields
            this._dataFields = iso;

            _dataElements = ReadFields(map, ref iso);

            foreach (var a in _dataElements)
            {
                Console.WriteLine(a.Value.Value);
            }
        }