public IndustryTypeValues getIndustryType(string _industryType)
        {
            IndustryTypeValues i = new IndustryTypeValues();
            if (_industryType == "")
            {
                //ApplicationData SampleCode.CWSServiceInformation.
                i._ApplicationAttended = Convert.ToBoolean(ConfigurationSettings.AppSettings["ApplicationAttended"]);
                i._ApplicationLocation = (SampleCode.CWSServiceInformation.ApplicationLocation)Enum.Parse(typeof(SampleCode.CWSServiceInformation.ApplicationLocation), ConfigurationSettings.AppSettings["ApplicationLocation"]);
                i._PINCapability = (SampleCode.CWSServiceInformation.PINCapability)Enum.Parse(typeof(SampleCode.CWSServiceInformation.PINCapability), ConfigurationSettings.AppSettings["PINCapability"]);
                i._ReadCapability = (SampleCode.CWSServiceInformation.ReadCapability)Enum.Parse(typeof(SampleCode.CWSServiceInformation.ReadCapability), ConfigurationSettings.AppSettings["ReadCapability"]);
                i._EncryptionType = (EncryptionType)Enum.Parse(typeof(EncryptionType), ConfigurationSettings.AppSettings["EncryptionType"]);

                //MerchantData
                i._IndustryType = (SampleCode.CWSServiceInformation.IndustryType)Enum.Parse(typeof(SampleCode.CWSServiceInformation.IndustryType), ConfigurationSettings.AppSettings["IndustryType"]);
                i._CustomerPresent = (SampleCode.CWSServiceInformation.CustomerPresent)Enum.Parse(typeof(SampleCode.CWSServiceInformation.CustomerPresent), ConfigurationSettings.AppSettings["CustomerPresent"]);
                i._RequestACI = (SampleCode.CWSServiceInformation.RequestACI)Enum.Parse(typeof(SampleCode.CWSServiceInformation.RequestACI), ConfigurationSettings.AppSettings["RequestACI"]);
                i._EntryMode = (SampleCode.CWSServiceInformation.EntryMode)Enum.Parse(typeof(SampleCode.CWSServiceInformation.EntryMode), ConfigurationSettings.AppSettings["EntryMode"]);

                //TransactionData
                i._ProcessAsKeyed = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_ProcessAsKeyed"]);
                i._SignatureCaptured = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_SignatureCaptured"]);
                i._IncludeAVS = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_IncludeAVS"]);
                i._IntAVSOverride = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_IntAVSOverride"]);
                i._IncludeCV= Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_IncludeCV"]);
                i._IncludeBilling = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_IncludeBilling"]);
            }
            if (_industryType == "Ecommerce")
            {
                //ApplicationData
                i._ApplicationAttended = false;
                i._ApplicationLocation = SampleCode.CWSServiceInformation.ApplicationLocation.OffPremises;
                i._PINCapability = SampleCode.CWSServiceInformation.PINCapability.PINNotSupported;
                i._ReadCapability = SampleCode.CWSServiceInformation.ReadCapability.KeyOnly;
                i._EncryptionType = EncryptionType.NotSet;

                //MerchantData
                i._IndustryType = SampleCode.CWSServiceInformation.IndustryType.Ecommerce;
                i._CustomerPresent = SampleCode.CWSServiceInformation.CustomerPresent.Ecommerce;
                i._RequestACI = SampleCode.CWSServiceInformation.RequestACI.IsCPSMeritCapable;
                i._EntryMode = SampleCode.CWSServiceInformation.EntryMode.Keyed;

                //TransactionData
                i._ProcessAsKeyed = true;
                i._SignatureCaptured = false;
                i._IncludeAVS = true;
                i._IntAVSOverride = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_IntAVSOverride"]);
                i._IncludeCV = true;
                i._IncludeBilling = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_IncludeBilling"]);
            }
            if (_industryType == "MOTO")
            {
                //ApplicationData
                i._ApplicationAttended = false;
                i._ApplicationLocation = SampleCode.CWSServiceInformation.ApplicationLocation.OffPremises;
                i._PINCapability = SampleCode.CWSServiceInformation.PINCapability.PINNotSupported;
                i._ReadCapability = SampleCode.CWSServiceInformation.ReadCapability.KeyOnly;
                i._EncryptionType = EncryptionType.NotSet;

                //MerchantData
                i._IndustryType = SampleCode.CWSServiceInformation.IndustryType.MOTO;
                i._CustomerPresent = SampleCode.CWSServiceInformation.CustomerPresent.MOTO;
                i._RequestACI = SampleCode.CWSServiceInformation.RequestACI.IsCPSMeritCapable;
                i._EntryMode = SampleCode.CWSServiceInformation.EntryMode.Keyed;

                //TransactionData
                i._ProcessAsKeyed = true;
                i._SignatureCaptured = false;
                i._IncludeAVS = true;
                i._IntAVSOverride = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_IntAVSOverride"]);
                i._IncludeCV = true;
                i._IncludeBilling = Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_IncludeBilling"]);
            }
            if (_industryType == "Retail")
            {
                //ApplicationData
                i._ApplicationAttended = true;
                i._ApplicationLocation = SampleCode.CWSServiceInformation.ApplicationLocation.OnPremises;
                i._PINCapability = SampleCode.CWSServiceInformation.PINCapability.PINNotSupported;
                i._ReadCapability = SampleCode.CWSServiceInformation.ReadCapability.HasMSR;
                if (Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_ProcessMagensaTxn"]))
                    i._EncryptionType = EncryptionType.MagneSafeV4V5Compatible;
                else
                    i._EncryptionType = EncryptionType.NotSet;
                //MerchantData
                i._IndustryType = SampleCode.CWSServiceInformation.IndustryType.Retail;
                i._CustomerPresent = SampleCode.CWSServiceInformation.CustomerPresent.Present;
                i._RequestACI = SampleCode.CWSServiceInformation.RequestACI.IsCPSMeritCapable;
                i._EntryMode = SampleCode.CWSServiceInformation.EntryMode.TrackDataFromMSR;

                //TransactionData
                i._ProcessAsKeyed = false;
                i._SignatureCaptured = true;
                i._IncludeAVS = false;
                i._IncludeCV = true;
            }
            if (_industryType == "Restaurant")
            {
                //ApplicationData
                i._ApplicationAttended = true;
                i._ApplicationLocation = SampleCode.CWSServiceInformation.ApplicationLocation.OnPremises;
                i._PINCapability = SampleCode.CWSServiceInformation.PINCapability.PINNotSupported;
                i._ReadCapability = SampleCode.CWSServiceInformation.ReadCapability.HasMSR;
                if (Convert.ToBoolean(ConfigurationSettings.AppSettings["TxnData_ProcessMagensaTxn"]))
                    i._EncryptionType = EncryptionType.MagneSafeV4V5Compatible;
                else
                    i._EncryptionType = EncryptionType.NotSet;
                //MerchantData
                i._IndustryType = SampleCode.CWSServiceInformation.IndustryType.Restaurant;
                i._CustomerPresent = SampleCode.CWSServiceInformation.CustomerPresent.Present;
                i._RequestACI = SampleCode.CWSServiceInformation.RequestACI.IsCPSMeritCapable;
                i._EntryMode = SampleCode.CWSServiceInformation.EntryMode.TrackDataFromMSR;

                //TransactionData
                i._ProcessAsKeyed = false;
                i._SignatureCaptured = true;
                i._IncludeAVS = false;
                i._IncludeCV = false;
            }
            _ITV = i;
            return i;
        }
 public DataGenerator()
 {
     _ITV = getIndustryType(ConfigurationSettings.AppSettings["IndustryType"]);
 }