다음을 통해 공유


통계 샘플(.NET용 POS v1.14 SDK 설명서)

.NET용 Microsoft POS(Point of Service for .NET) 서비스 개체는 연결된 각 디바이스에 대한 여러 디바이스 통계를 지속적으로 추적하고 업데이트합니다. 통계 추적은 통계를 다시 설정, 검색 및 업데이트하는 방법뿐만 아니라 통계를 만들고 통계를 증가시키며 XML 파일 스토리지에서 통계를 로드하거나 저장하는 도우미 메서드를 포함하는 클래스를 사용하여 DeviceStatistics 수행됩니다.

.NET용 POS의 통계 보고는 하드웨어 또는 소프트웨어에 저장된 통계를 지원합니다. 소프트웨어 기반 통계는 XML 통계 파일, \Program Files\Common Files\Microsoft Shared\Point of Service\Statistics\PosDeviceStatistics.xml저장되고 시스템 설치 및 설치 시 결정되는 전역적으로 정의된 플러시 간격으로 업데이트됩니다. 기본적으로 이 플러시 간격은 1초입니다. 애플리케이션이 디바이스를 클레임하는 경우 .NET용 POS는 XML 파일에서 적절한 통계를 로드합니다.

디바이스별 통계 관리는 기본 또는 기본 디바이스 클래스 인터페이스에서 지원됩니다. 일반적으로 Base 또는 Basic 클래스에서 상속되는 서비스 개체는 지정된 통계의 값을 증가시키는 IncrementStatistic 또는 하나의 통계를 지정된 값으로 설정하는 SetStatistic을 호출하는 경우에만 필요합니다. 다른 모든 통계 구현은 기본 또는 기본 클래스 인터페이스에서 제공됩니다.

DeviceStatistics 클래스의 주요 멤버는 아래에 자세히 설명되어 있습니다.

  • CapStatisticsReporting 은 디바이스의 통계 보고 기능을 식별합니다. CapStatisticsReportingfalse로 설정된 경우 디바이스와 관련된 통계 데이터를 사용할 수 없습니다. CapStatisticsReportingtrue이면 일부 통계 데이터를 사용할 수 있으며 디바이스에서 사용량에 대한 다양한 통계를 누적하기 시작할 수 있습니다. 누적되고 보고된 정보는 디바이스별 정보이며 RetrieveStatistics 메서드를 사용하여 검색됩니다.

  • CapUpdateStatisticsUpdateStatistics 및 ResetStatistics 메서드를 사용하는 애플리케이션에서 수집된 통계를 다시 설정하거나 업데이트할 수 있는지 여부를 정의 합니다 . 이 속성은 CapStatisticsReportingtrue인 경우에만 유효합니다. CapStatisticsReportingfalse이면 CapUpdateStatistics 속성은 항상 false입니다.

  • ResetStatistics는CapStatisticsReportingCapUpdateStatistics 가 모두 true인 경우에만 호출할 수 있습니다. 이 메서드는 초기화 가능한 디바이스 통계를 하나, 일부 또는 모두 0으로 다시 설정합니다. 디바이스에서 정의된 재설정 가능한 통계를 0으로 다시 설정합니다. 이 메서드가 성공적으로 완료되려면 요청된 모든 통계를 성공적으로 다시 설정해야 합니다. 그렇지 않으면 Extended ErrorCode 메서드를 사용하여 오류가 발생합니다. 이 메서드는 항상 동기적으로 실행됩니다.

  • UpdateStatistics는 재설정 가능한 디바이스 통계 중 하나, 일부 또는 전체를 지정된 값으로 설정합니다. 이 메서드가 성공적으로 완료되려면 요청된 모든 통계를 성공적으로 업데이트해야 합니다. 어떤 이유로든 업데이트할 수 없는 경우 ErrorCode 이벤트가 반환됩니다. 이 메서드를 호출하려면 CapStatisticsReportingCapUpdateStatistics모두 true 로 설정해야 합니다. UpdateStatistics 메서드는 항상 동기적으로 실행됩니다.

  • RetrieveStatistics는 디바이스에서 요청된 통계를 검색합니다. 이 메서드를 성공적으로 사용하려면 CapStatisticsReportingtrue여야 합니다. RetrieveStatistics에 대한 모든 호출은 최소한 다음 XML을 반환합니다.

    <?xml version='1.0'?>
    <UPOSStat version="1.10.0"
    xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
    xmlns="http://www.nrf-arts.org/IXRetail/namespace/"
    xsi:schemaLocation="http://www.nrf-arts.org/IXRetail/namespace/
    UPOSStat.xsd">
        <Event>
            <Parameter>
                <Name>RequestedStatistic</Name>
                <Value>1234</Value>
            </Parameter>
        </Event>
        <Equipment>
        <UnifiedPOSVersion>1.10</UnifiedPOSVersion>
        <DeviceCategory UPOS="CashDrawer"/>
        <ManufacturerName>Cashdrawers R Us</ManufacturerName>
        <ModelName>CD-123</ModelName>
        <SerialNumber>12345</SerialNumber>
        <FirmwareRevision>1.0 Rev. B</FirmwareRevision>
        <Interface>RS232</Interface>
        <InstallationDate>2000-03-01</InstallationDate>
        </Equipment>
    </UPOSStat>
    

    애플리케이션이 디바이스에서 지원하지 않는 통계 이름을 요청하면 <Parameter> 항목이 빈 <Value>로 반환됩니다. 다음은 그 예입니다.

    <Parameter>
        <Name>RequestedStatistic</Name>
        <Value></Value>
    </Parameter>
    

    디바이스가 제조업체별로 수집한 스키마에 정의되지 않은 모든 통계는 <Parameter> 태그가 아닌 <ManufacturerSpecific> 태그로 반환됩니다. 다음은 그 예입니다.

    <ManufacturerSpecific>
        <Name>TheAnswer</Name>
        <Value>42</Value>
    </ManufacturerSpecific>
    

    애플리케이션이 장치에서 모든 통계를 요청하면, 장치 범주에 정의된 모든 통계에 대한 <Parameter> 항목이 반환됩니다. 장치 범주는 <UPOSStat> 태그의 version 속성에서 지정된 XML 스키마 버전에 의해 정의됩니다. 디바이스에서 통계를 기록하지 않으면 태그가 <Value> 비어 있습니다.

.NET용 POS는 처리기를 사용하여 이벤트 처리 방식과 유사한 방식으로 통계 읽기 및 쓰기를 수행합니다. 이러한 통계 처리기 중 하나가 만들어지면 특정 디바이스 통계에 할당됩니다. 이 통계를 읽거나 업데이트하면 처리기는 필요에 따라 디바이스에서 읽거나 디바이스에 쓸 수 있는 대리자를 호출합니다.

통계 처리기는 서로 다른 유형의 대리자를 사용하여 다른 통계 작업을 수행합니다. GetStatistic 대리자는 통계 값을 검색하는 데 사용되고, SetStatistic 대리자는 통계 값을 할당합니다. GetStatistics 대리자는 매개 변수로 검색할 통계의 이름을 사용하고 해당 통계의 값을 나타내는 문자열을 반환합니다. SetStatistic 대리자는 변경할 통계의 이름과 해당 통계에 매개 변수로 할당할 값을 사용합니다. SetStatistic 대리자는 값을 반환하지 않습니다.

통계 처리기는 UnifiedPOS(UnifiedPOS) 사양에 정의된 표준 통계 중 하나로 할당될 수 있지만 Service 개체 코드에서 CreateStatistic 을 사용하여 만든 모든 통계에 대한 사용자 지정 처리기도 지원됩니다.

예시

다음 코드 예제에서는 MSR 디바이스에서 통계 데이터를 사용, 처리 및 검색하는 방법을 보여 줍니다.

// File FORM1.CS
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Xml;
using System.IO;

using Microsoft.PointOfService;
using Microsoft.PointOfService.BaseServiceObjects;

namespace Statistics
{
    public partial class SampleStatistics : Form
    {
        // Indicates whether or not the Service Object has
        // been started.
        bool ServiceObjectStarted = false;

        // The Service Object.
        PosCommon so = null;

        public SampleStatistics()
        {
            InitializeComponent();

            // Disable the buttons until the SO is loaded successfully.
            UpdateControls();
        }

        public void UpdateControls()
        {
            btnGenerateStatistics.Enabled = ServiceObjectStarted;
            btnRetrieveStatistics.Enabled = ServiceObjectStarted ;
            txtStatisticName.Enabled = ServiceObjectStarted;

            // The statistic name text box is disabled until the
            // Service Object is loaded.
            if (ServiceObjectStarted)
            {
                btnStartSO.Text = "Close SO";
            }
            else
            {
                txtStatisticName.Clear();
                txtRetrievedStatistics.Clear();
                btnStartSO.Text = "Start SO";
            }

            // The retrieve one statistic button is disabled until
            // the user has entered a statistic name.
            if (txtStatisticName.TextLength > 0)
            {
                btnRetrieveStatistic.Enabled = true;
            }
            else
            {
                btnRetrieveStatistic.Enabled = false;
            }
        }

        private void StartServiceObject(object sender, EventArgs e)
        {
            PosExplorer explorer = new PosExplorer(this);
            string SOName = "SampleStatistics";

            if (ServiceObjectStarted)
            {
                so.DeviceEnabled = false;
                so.Close();
                so = null;
                ServiceObjectStarted = false;
                UpdateControls();
            }
            else
            {
                foreach (DeviceInfo d in explorer.GetDevices())
                {
                    if (d.ServiceObjectName == SOName)
                    {
                        try
                        {
                            // Standard Service Object startup.
                            so = explorer.CreateInstance(d)
                                            as PosCommon;

                            so.Open();
                            so.Claim(0);
                            so.DeviceEnabled = true;

                            // Application-specific setup.
                            ServiceObjectStarted = true;
                            UpdateControls();
                        }
                        catch
                        {
                            // Something went wrong starting the SO
                            MessageBox.Show("The Service Object '" +
                                SOName + "' failed to load",
                                "Service Object Error",
                                MessageBoxButtons.OK,
                                MessageBoxIcon.Exclamation);
                            return;
                        }

                        break;
                    }
                }

                if (so == null)
                {
                    // No Service Object with the
                    // specified name could be found.
                    MessageBox.Show("The Service Object '" +
                        SOName + "' could not be found",
                        "Service Object Error",
                        MessageBoxButtons.OK,
                        MessageBoxIcon.Exclamation);
                }
            }
        }

        private void GenerateStatistics(object sender, EventArgs e)
        {
            // In this example case, you use this
            // property to tell the Service Object to change statistic
            // values.
            so.DeviceEnabled = true;

            // Report status.
            txtRetrievedStatistics.Text = "DeviceEnabled called to" +
                        " to modify statistic values.";
        }

        private void RetrieveStatistics(object sender, EventArgs e)
        {
            string statistics;
            bool IsXml = true;

            try
            {
                statistics = so.RetrieveStatistics();
            }
            catch
            {
                statistics = "No statistics found";
                IsXml = false;
            }

            DisplayStatistics(statistics, IsXml);
        }

        private void RetrieveOneStatistic(object sender, EventArgs e)
        {
            string statistics;
            bool IsXml = true;

            try
            {
                statistics = so.RetrieveStatistic(
                            txtStatisticName.Text);
            }
            catch
            {
                statistics = "Statistic not found: " +
                            txtStatisticName.Text;

                IsXml = false;
            }

            DisplayStatistics(statistics, IsXml);
            txtStatisticName.Clear();
            btnRetrieveStatistic.Enabled = false;
        }

        private void StatisticSizeChanged(object sender, EventArgs e)
        {
            if (txtStatisticName.TextLength > 0)
            {
                btnRetrieveStatistic.Enabled = true;
            }
            else
            {
                btnRetrieveStatistic.Enabled = false;
            }
        }

        // When retrieving statistics, POS for .NET returns a block
        // of XML (as specified in the UPOS specification). This
        // method will make it look readable with white space
        // and indenting and then display it in the text box.
        private void DisplayStatistics(string inputString, bool isXml)
        {
            string s = null;

            // In case of an exception, you do not have an XML
            // string, so just display the error description. Otherwise,
            // load the XML string into an XmlDocument object and
            // make it look readable.
            if (!isXml)
            {
                s = inputString;
            }
            if(isXml)
            {
                // Create new XML document and load the statistics
                // XML string.
                XmlDocument doc = new XmlDocument();
                doc.LoadXml(inputString);

                // Create a XmlTextWriter using a MemoryStream and
                // tell it to indent the XML output (so that it is
                // readable.)
                MemoryStream m = new MemoryStream();
                XmlTextWriter writer = new XmlTextWriter(m, null);
                writer.Formatting = Formatting.Indented;
                writer.Indentation = 4;

                // Save the document to the memory stream using the
                // XmlWriter.
                doc.Save(writer);

                // The stream will be encoded as UTF8, so convert the
                // buffer into a string.
                UTF8Encoding u = new UTF8Encoding();
                s = u.GetString(m.GetBuffer());
            }

            // Write the string to the text box.
            txtRetrievedStatistics.Text = s;
        }
    }
}
// File FORM1.DESIGNER.CS
namespace Statistics
{
    partial class SampleStatistics
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.btnStartSO = new System.Windows.Forms.Button();
            this.btnGenerateStatistics = new System.Windows.Forms.Button();
            this.btnRetrieveStatistics = new System.Windows.Forms.Button();
            this.txtStatisticName = new System.Windows.Forms.TextBox();
            this.txtRetrievedStatistics = new System.Windows.Forms.TextBox();
            this.btnRetrieveStatistic = new System.Windows.Forms.Button();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.groupBox1.SuspendLayout();
            this.SuspendLayout();
            //
            // btnStartSO
            //
            this.btnStartSO.Location = new System.Drawing.Point(45, 35);
            this.btnStartSO.Name = "btnStartSO";
            this.btnStartSO.Size = new System.Drawing.Size(133, 23);
            this.btnStartSO.TabIndex = 0;
            this.btnStartSO.Text = "Start SO";
            this.btnStartSO.UseVisualStyleBackColor = true;
            this.btnStartSO.Click += new System.EventHandler(this.StartServiceObject);
            //
            // btnGenerateStatistics
            //
            this.btnGenerateStatistics.Location = new System.Drawing.Point(45, 75);
            this.btnGenerateStatistics.Name = "btnGenerateStatistics";
            this.btnGenerateStatistics.Size = new System.Drawing.Size(133, 23);
            this.btnGenerateStatistics.TabIndex = 1;
            this.btnGenerateStatistics.Text = "GenerateStatistics";
            this.btnGenerateStatistics.UseVisualStyleBackColor = true;
            this.btnGenerateStatistics.Click += new System.EventHandler(this.GenerateStatistics);
            //
            // btnRetrieveStatistics
            //
            this.btnRetrieveStatistics.Location = new System.Drawing.Point(45, 117);
            this.btnRetrieveStatistics.Name = "btnRetrieveStatistics";
            this.btnRetrieveStatistics.Size = new System.Drawing.Size(133, 23);
            this.btnRetrieveStatistics.TabIndex = 2;
            this.btnRetrieveStatistics.Text = "Retrieve Statistics";
            this.btnRetrieveStatistics.UseVisualStyleBackColor = true;
            this.btnRetrieveStatistics.Click += new System.EventHandler(this.RetrieveStatistics);
            //
            // txtStatisticName
            //
            this.txtStatisticName.Location = new System.Drawing.Point(16, 68);
            this.txtStatisticName.Name = "txtStatisticName";
            this.txtStatisticName.Size = new System.Drawing.Size(205, 20);
            this.txtStatisticName.TabIndex = 4;
            this.txtStatisticName.TextChanged += new System.EventHandler(this.StatisticSizeChanged);
            //
            // txtRetrievedStatistics
            //
            this.txtRetrievedStatistics.BackColor = System.Drawing.Color.White;
            this.txtRetrievedStatistics.Location = new System.Drawing.Point(45, 157);
            this.txtRetrievedStatistics.Multiline = true;
            this.txtRetrievedStatistics.Name = "txtRetrievedStatistics";
            this.txtRetrievedStatistics.ReadOnly = true;
            this.txtRetrievedStatistics.ScrollBars = System.Windows.Forms.ScrollBars.Both;
            this.txtRetrievedStatistics.Size = new System.Drawing.Size(476, 247);
            this.txtRetrievedStatistics.TabIndex = 5;
            //
            // btnRetrieveStatistic
            //
            this.btnRetrieveStatistic.Location = new System.Drawing.Point(16, 30);
            this.btnRetrieveStatistic.Name = "btnRetrieveStatistic";
            this.btnRetrieveStatistic.Size = new System.Drawing.Size(133, 23);
            this.btnRetrieveStatistic.TabIndex = 6;
            this.btnRetrieveStatistic.Text = "Retrieve Statistic";
            this.btnRetrieveStatistic.UseVisualStyleBackColor = true;
            this.btnRetrieveStatistic.Click += new System.EventHandler(this.RetrieveOneStatistic);
            //
            // groupBox1
            //
            this.groupBox1.Controls.Add(this.btnRetrieveStatistic);
            this.groupBox1.Controls.Add(this.txtStatisticName);
            this.groupBox1.Location = new System.Drawing.Point(219, 35);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(302, 105);
            this.groupBox1.TabIndex = 7;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Single Statistic";
            //
            // SampleStatistics
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.SystemColors.MenuBar;
            this.ClientSize = new System.Drawing.Size(565, 439);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.txtRetrievedStatistics);
            this.Controls.Add(this.btnRetrieveStatistics);
            this.Controls.Add(this.btnGenerateStatistics);
            this.Controls.Add(this.btnStartSO);
            this.Name = "SampleStatistics";
            this.Text = "Form1";
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Button btnStartSO;
        private System.Windows.Forms.Button btnGenerateStatistics;
        private System.Windows.Forms.Button btnRetrieveStatistics;
        private System.Windows.Forms.TextBox txtStatisticName;
        private System.Windows.Forms.TextBox txtRetrievedStatistics;
        private System.Windows.Forms.Button btnRetrieveStatistic;
        private System.Windows.Forms.GroupBox groupBox1;
    }
}
// File STATISTICSSO.CS
using System;
using System.Collections.Generic;
using System.Text;

using Microsoft.PointOfService;
using Microsoft.PointOfService.BaseServiceObjects;

[assembly: PosAssembly("Service Object Contractors, Inc.")]

namespace SOSamples.Statistics
{
    [ServiceObject(DeviceType.Msr,
        "SampleStatistics",
        "Sample Statistics Service Object",
        1,
        9)]

    public class StatisticsTest : MsrBase
    {
        // This will be incremented every time DeviceEnabled
        // is set so that different sets of demonstration
        // statistics can be generated.
        int enableCount = 0;

        // The name of a custom created statistic used to demonstrate
        // custom Statistic handlers.
        private const string PollingStatistic = "Polling Interval";

        // Statistic used to demonstrate IncrementStatistic.
        private const string TestIncrement = "MyIncrementableStat";

        // String returned from CheckHealth
        private string MyHealthText;

        public StatisticsTest()
        {
            DevicePath = "Sample Statistics";
        }

        // This is the delegate which will be called for each
        // statistic that we have associated with this delegate by
        // calling SetStatisticHandler().
        //
        // Delegates like this should most commonly be used
        // to get and set statistics in hardware. The delegate
        // allows the POS for .NET statistic subsystem to query
        // the value of a statistic in real time, before it is
        // returned to the application.
        private string GetHardwareInfo(string name)
        {
            // Add your code to query values from hardware here.

            // Very simple demonstration: just return the name
            // of the statistic as its value;
            return name;
        }

        // In a typical Service Object implementation, statistics
        // will be modified throughout the Service Object code. This
        // method demonstrates the methods used to modify statistic
        // values.
        public void SetDemonstrationStatistics()
        {
            // IncrementStatistic can be used to easily
            // increment a numeric statistic.
            IncrementStatistic(TestIncrement);

            switch(enableCount)
            {
                case 0:
                    SetStatisticValue(StatisticManufacturerName,
                        "Microsoft Corporation");
                    break;
                case 1:
                    SetStatisticValue(StatisticManufacturerName,
                        "Service Control Contractors, Inc.");
                    break;
                case 2:
                    SetStatisticValue(StatisticManufacturerName,
                        "Point of Service Controls .com");
                    break;
            }

            if (++enableCount == 3 )
            {
                enableCount = 0;
            }
        }

        #region PosCommon overrides
        // Returns the result of the last call to CheckHealth()

        public override void Open()
        {
            base.Open();

            // In your implementation of Open(), your Service Object
            // code should:
            //    1. Initialize statistics.
            //    2. Create custom statistics.
            //    3. Set statistic handlers for hardware Statistics.

            // 1. Initialize statistics
            SetStatisticValue(StatisticManufacturerName,
                            "Microsoft Corporation");
            SetStatisticValue(StatisticManufactureDate,
                            "2004-10-23");
            SetStatisticValue(StatisticModelName,
                            "Statistic Sample");
            SetStatisticValue(StatisticMechanicalRevision,
                            "1.0");
            SetStatisticValue(StatisticInterface,
                            "USB");

            // 2a. Create a new statistic to test Increment
            // method. No custom handler needed.
            CreateStatistic(TestIncrement, false, "blobs");

            // 2b. Create a new manufacturer statistic to demonstrate
            // custom attributes with StatisticHandlers.
            CreateStatistic(PollingStatistic, false,
                            "milliseconds");

            // 3. Set handlers for statistics stored in hardware.
            SetStatisticHandlers(PollingStatistic,
                        new GetStatistic(GetHardwareInfo), null);
            SetStatisticHandlers(StatisticSerialNumber,
                        new GetStatistic(GetHardwareInfo), null);
        }

        public override bool DeviceEnabled
        {
            get
            {
                return base.DeviceEnabled;
            }
            set
            {
                // This method will set various statistics to
                // demonstrate the statistic APIs. We are going
                // to change statistic values every time the device
                // is enabled. This operation is just for
                // demonstration and would not be found in live code.
                SetDemonstrationStatistics();

                base.DeviceEnabled = value;
            }
        }

        public override string CheckHealthText
        {
            get
            {
                // MsrBasic.VerifyState(musBeClaimed,
                // mustBeEnabled). This may throw an exception
                VerifyState(false, false);

                return MyHealthText;
            }
        }

        public override string CheckHealth(
                        HealthCheckLevel level)
        {
            // Verify that device is open, claimed, and enabled.
            VerifyState(true, true);

            // Your code here:
            // check the health of the device and return a
            // descriptive string.

            // Cache result in the CheckHealthText property.
            MyHealthText = "Ok";
            return MyHealthText;
        }

        public override DirectIOData DirectIO(
                        int command,
                        int data,
                        object obj)
        {
            // Verify that the device is open.
            VerifyState(false, false);

            return new DirectIOData(data, obj);
        }
        #endregion  PosCommon overrides

        #region MsrBasic Overrides
        protected override MsrFieldData ParseMsrFieldData(
                        byte[] track1Data,
                        byte[] track2Data,
                        byte[] track3Data,
                        byte[] track4Data,
                        CardType cardType)
        {
            // Your code here:
            // Implement this method to parse track data
            // into fields which will be returned as
            // properties to the application (e.g.,FirstName,
            // AccountNumber, etc.)
            return new MsrFieldData();
        }

        protected override MsrTrackData ParseMsrTrackData(
                        byte[] track1Data,
                        byte[] track2Data,
                        byte[] track3Data,
                        byte[] track4Data,
                        CardType cardType)
        {
            // Your code here:
            // Implement this method to convert raw track data.
            return new MsrTrackData();
        }
        #endregion MsrBasic Overrides
    }
}

코드 컴파일

또한 참조하십시오

기타 리소스