StringConverter

Namespace: CsvHelper
We found 10 examples in language CSharp for this search. You will see 35 fragments of code.

Other methods


        public static void GetStringLength(string str) {
            var stringConverter = new StringConverter();
            stringConverter.GetStringLengthCompleted += StringConverterGetStringLengthCompleted;
            stringConverter.GetStringLengthAsync(str);
        }


        public static void GetStringSync(string str) {
            try {
                var stringConverter = new StringConverter();
                stringConverter.GetStringLength(str);
            }
            catch (Exception e) {
                Console.WriteLine("Error: {0}", e);
            }
        }

using System;

namespace PKHeX.Core
{
    /// <summary>
    /// Secret base format for <see cref="GameVersion.ORAS"/>
    /// </summary>
    public sealed class SecretBase6
    {
        private readonly byte[] Data;
        private readonly int Offset;
        public const int SIZE = 0x3E0;

        public int BaseLocation
        {
            get => BitConverter.ToInt16(Data, Offset);
            set => BitConverter.GetBytes((short)value).CopyTo(Data, Offset);
        }

        public SecretBase6(byte[] data, int offset = 0)
        {
            Data = data;
            Offset = offset;
        }

        public string TrainerName
        {
            get => StringConverter.GetString6(Data, Offset + 0x218, 0x1A);
            set => StringConverter.SetString6(TrainerName, 0x1A / 2).CopyTo(Data, Offset + 0x218);
        }

        public string FlavorText1
        {
            get => StringConverter.GetString6(Data, Offset + 0x232 + (0x22 * 0), 0x22);
            set => StringConverter.SetString6(value, 0x22 / 2).CopyTo(Data, Offset + 0x232 + (0x22 * 0));
        }

        public string FlavorText2
        {
            get => StringConverter.GetString6(Data, Offset + 0x232 + (0x22 * 1), 0x22);
            set => StringConverter.SetString6(value, 0x22 / 2).CopyTo(Data, Offset + 0x232 + (0x22 * 1));
        }

        public string Saying1
        {
            get => StringConverter.GetString6(Data, Offset + 0x276 + (0x22 * 0), 0x22);
            set => StringConverter.SetString6(value, 0x22 / 2).CopyTo(Data, Offset + 0x276 + (0x22 * 0));
        }

        public string Saying2
        {
            get => StringConverter.GetString6(Data, Offset + 0x276 + (0x22 * 1), 0x22);
            set => StringConverter.SetString6(value, 0x22 / 2).CopyTo(Data, Offset + 0x276 + (0x22 * 1));
        }

        public string Saying3
        {
            get => StringConverter.GetString6(Data, Offset + 0x276 + (0x22 * 2), 0x22);
            set => StringConverter.SetString6(value, 0x22 / 2).CopyTo(Data, Offset + 0x276 + (0x22 * 2));
        }

        public string Saying4
        {
            get => StringConverter.GetString6(Data, Offset + 0x276 + (0x22 * 3), 0x22);
            set => StringConverter.SetString6(value, 0x22 / 2).CopyTo(Data, Offset + 0x276 + (0x22 * 3));
        }

        public bool IsDummiedBaseLocation => !IsEmpty && BaseLocation < 3;
        public bool IsEmpty => BaseLocation == 0;
    }
}

			#region ICommand Members

			public string Get(object target) {
				ColorInterpolatorAffector affector = target as ColorInterpolatorAffector;

				return StringConverter.ToString(affector.colorAdj[0]);
			}
			public void Set(object target, string val) {
				ColorInterpolatorAffector affector = target as ColorInterpolatorAffector;

				affector.colorAdj[0] = StringConverter.ParseColor(val);
			}
			#region ICommand Members

			public string Get(object target) {
				ColorInterpolatorAffector affector = target as ColorInterpolatorAffector;

				// TODO: Common way for writing color.
				return StringConverter.ToString(affector.colorAdj[1]);
			}
			public void Set(object target, string val) {
				ColorInterpolatorAffector affector = target as ColorInterpolatorAffector;

				affector.colorAdj[1] = StringConverter.ParseColor(val);
			}
			#region ICommand Members

			public string Get(object target) {
				ColorInterpolatorAffector affector = target as ColorInterpolatorAffector;

				// TODO: Common way for writing color.
				return StringConverter.ToString(affector.colorAdj[2]);
			}
			public void Set(object target, string val) {
				ColorInterpolatorAffector affector = target as ColorInterpolatorAffector;

				affector.colorAdj[2] = StringConverter.ParseColor(val);
			}

using Newtonsoft.Json;
using Nop.Plugin.Misc.FraudLabsPro.Services;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;

namespace Nop.Plugin.Misc.FraudLabsPro.Models.Order
{
    /// <summary>
    /// Represents the FraudLabs Pro order model
    /// </summary>
    public record FraudLabsProOrderModel : BaseNopEntityModel
    {
        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsCountryMatch")]
        public string IsCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsHighRiskCountry")]
        public string IsHighRiskCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.DistanceInKM")]
        public string DistanceInKM { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.DistanceInMile")]
        public string DistanceInMile { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPAddress")]
        public string IPAddress { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPCountry")]
        public string IPCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPRegion")]
        public string IPRegion { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPCity")]
        public string IPCity { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPContinent")]
        public string IPContinent { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPLatitude")]
        public string IPLatitude { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPLongtitude")]
        public string IPLongtitude { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPTimeZone")]
        public string IPTimeZone { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPElevation")]
        public string IPElevation { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPDomain")]
        public string IPDomain { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileMNC")]
        public string IPMobileMNC { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileMCC")]
        public string IPMobileMCC { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileBrand")]
        public string IPMobileBrand { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPNetSpeed")]
        public string IPNetSpeed { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPISPName")]
        public string IPISPName { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPUsageType")]
        public string IPUsageType { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsFreeEmail")]
        public string IsFreeEmail { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDisposableEmail")]
        public string IsDisposableEmail { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsNewDomainName")]
        public string IsNewDomainName { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDomainExists")]
        public string IsDomainExists { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsProxyIPAddress")]
        public string IsProxyIPAddress { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinFound")]
        public string IsBinFound { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinCountryMatch")]
        public string IsBinCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinNameMatch")]
        public string IsBinNameMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinPhoneMatch")]
        public string IsBinPhoneMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinPrepaid")]
        public string IsBinPrepaid { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsAddressShipForward")]
        public string IsAddressShipForward { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipCityMatch")]
        public string IsBillShipCityMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipStateMatch")]
        public string IsBillShipStateMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipCountryMatch")]
        public string IsBillShipCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipPostalMatch")]
        public string IsBillShipPostalMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsIPBlacklist")]
        public string IsIPBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsEmailBlacklist")]
        public string IsEmailBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsCreditCardBlacklist")]
        public string IsCreditCardBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDeviceBlacklist")]
        public string IsDeviceBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsUserBlacklist")]
        public string IsUserBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsShipAddressBlackList")]
        public string IsShipAddressBlackList { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsPhoneBlacklist")]
        public string IsPhoneBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsHighRiskUsernamePassword")]
        public string IsHighRiskUsernamePassword { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsMalwareExploit")]
        public string IsMalwareExploit { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsExportControlledCountry")]
        public string IsExportControlledCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.UserOrderID")]
        public string UserOrderID { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.UserOrderMemo")]
        public string UserOrderMemo { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProScore")]
        public string FraudLabsProScore { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProDistribution")]
        public string FraudLabsProDistribution { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProStatus")]
        public string FraudLabsProStatus { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProID")]
        public string FraudLabsProID { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProVersion")]
        public string FraudLabsProVersion { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProErrorCode")]
        public string FraudLabsProErrorCode { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProMessage")]
        public string FraudLabsProMessage { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProCredit")]
        public string FraudLabsProCredit { get; set; }

        public bool HideBlock { get; set; }

        public string FraudLabsProOriginalStatus { get; set; }
    }
}

using Newtonsoft.Json;
using Nop.Plugin.Misc.FraudLabsPro.Services;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;

namespace Nop.Plugin.Misc.FraudLabsPro.Models.Order
{
    /// <summary>
    /// Represents the FraudLabs Pro order model
    /// </summary>
    public class FraudLabsProOrderModel : BaseNopEntityModel
    {
        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsCountryMatch")]
        public string IsCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsHighRiskCountry")]
        public string IsHighRiskCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.DistanceInKM")]
        public string DistanceInKM { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.DistanceInMile")]
        public string DistanceInMile { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPAddress")]
        public string IPAddress { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPCountry")]
        public string IPCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPRegion")]
        public string IPRegion { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPCity")]
        public string IPCity { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPContinent")]
        public string IPContinent { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPLatitude")]
        public string IPLatitude { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPLongtitude")]
        public string IPLongtitude { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPTimeZone")]
        public string IPTimeZone { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPElevation")]
        public string IPElevation { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPDomain")]
        public string IPDomain { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileMNC")]
        public string IPMobileMNC { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileMCC")]
        public string IPMobileMCC { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileBrand")]
        public string IPMobileBrand { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPNetSpeed")]
        public string IPNetSpeed { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPISPName")]
        public string IPISPName { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPUsageType")]
        public string IPUsageType { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsFreeEmail")]
        public string IsFreeEmail { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDisposableEmail")]
        public string IsDisposableEmail { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsNewDomainName")]
        public string IsNewDomainName { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDomainExists")]
        public string IsDomainExists { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsProxyIPAddress")]
        public string IsProxyIPAddress { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinFound")]
        public string IsBinFound { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinCountryMatch")]
        public string IsBinCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinNameMatch")]
        public string IsBinNameMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinPhoneMatch")]
        public string IsBinPhoneMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinPrepaid")]
        public string IsBinPrepaid { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsAddressShipForward")]
        public string IsAddressShipForward { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipCityMatch")]
        public string IsBillShipCityMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipStateMatch")]
        public string IsBillShipStateMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipCountryMatch")]
        public string IsBillShipCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipPostalMatch")]
        public string IsBillShipPostalMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsIPBlacklist")]
        public string IsIPBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsEmailBlacklist")]
        public string IsEmailBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsCreditCardBlacklist")]
        public string IsCreditCardBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDeviceBlacklist")]
        public string IsDeviceBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsUserBlacklist")]
        public string IsUserBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsShipAddressBlackList")]
        public string IsShipAddressBlackList { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsPhoneBlacklist")]
        public string IsPhoneBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsHighRiskUsernamePassword")]
        public string IsHighRiskUsernamePassword { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsMalwareExploit")]
        public string IsMalwareExploit { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsExportControlledCountry")]
        public string IsExportControlledCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.UserOrderID")]
        public string UserOrderID { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.UserOrderMemo")]
        public string UserOrderMemo { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProScore")]
        public string FraudLabsProScore { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProDistribution")]
        public string FraudLabsProDistribution { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProStatus")]
        public string FraudLabsProStatus { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProID")]
        public string FraudLabsProID { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProVersion")]
        public string FraudLabsProVersion { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProErrorCode")]
        public string FraudLabsProErrorCode { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProMessage")]
        public string FraudLabsProMessage { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProCredit")]
        public string FraudLabsProCredit { get; set; }

        public bool HideBlock { get; set; }

        public string FraudLabsProOriginalStatus { get; set; }
    }
}

			#region ICommand Members

			public string Get(object target) {
				ColorFaderAffector2 affector = target as ColorFaderAffector2;
				return StringConverter.ToString(affector.RedAdjust1);
			}
			public void Set(object target, string val) {
				ColorFaderAffector2 affector = target as ColorFaderAffector2;
				affector.RedAdjust1 = StringConverter.ParseFloat(val);
			}
			#region ICommand Members

			public string Get(object target) {
				ColorFaderAffector2 affector = target as ColorFaderAffector2;
				return StringConverter.ToString(affector.RedAdjust2);
			}
			public void Set(object target, string val) {
				ColorFaderAffector2 affector = target as ColorFaderAffector2;
				affector.RedAdjust2 = StringConverter.ParseFloat(val);
			}
			#region ICommand Members

			public string Get(object target) {
				ColorFaderAffector2 affector = target as ColorFaderAffector2;
				return StringConverter.ToString(affector.GreenAdjust1);
			}
			public void Set(object target, string val) {
				ColorFaderAffector2 affector = target as ColorFaderAffector2;
				affector.GreenAdjust1 = StringConverter.ParseFloat(val);
			}

        [Test]
        public void Convert_WrongTest_NUnit()
        {
            StringConverter stringConverter = new StringConverter();

            Assert.Throws<ArgumentNullException>(() => stringConverter.Convert(null, 2));
        }

        [Test]
        public void Convert_WrongTestEmptyString_NUnit()
        {
            StringConverter stringConverter = new StringConverter();

            Assert.Throws<ArgumentNullException>(() => stringConverter.Convert(string.Empty, 1));
        }

        [Test]
        public void Convert_WrongTestNnull_NUnit()
        {
            StringConverter stringConverter = new StringConverter();

            string s = "Привет Епам!";

            Assert.Throws<ArgumentOutOfRangeException>(() => stringConverter.Convert(s, 0));
        }

        [Test]
        [TestCase("Привет Епам!", 1, ExpectedResult = "Пие пмрвтЕа!")]        
        public string Convert_InputCorrect1_Nunit(string s, int n)
        {
            StringConverter stringConverter = new StringConverter();

            return stringConverter.Convert(s, n);
        }

        [Test]
        [TestCase("Пие пмрвтЕа!", 1, ExpectedResult = "Пепртаи мвЕ!")]
        public string Convert_InputCorrect2_Nunit(string s, int n)
        {
            StringConverter stringConverter = new StringConverter();

            return stringConverter.Convert(s, n);
        }

using Newtonsoft.Json;
using Nop.Plugin.Misc.FraudLabsPro.Services;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;

namespace Nop.Plugin.Misc.FraudLabsPro.Models.Order
{
    /// <summary>
    /// Represents the FraudLabs Pro order model
    /// </summary>
    public record FraudLabsProOrderModel : BaseNopEntityModel
    {
        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsCountryMatch")]
        public string IsCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsHighRiskCountry")]
        public string IsHighRiskCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.DistanceInKM")]
        public string DistanceInKM { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.DistanceInMile")]
        public string DistanceInMile { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPAddress")]
        public string IPAddress { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPCountry")]
        public string IPCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPRegion")]
        public string IPRegion { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPCity")]
        public string IPCity { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPContinent")]
        public string IPContinent { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPLatitude")]
        public string IPLatitude { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPLongtitude")]
        public string IPLongtitude { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPTimeZone")]
        public string IPTimeZone { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPElevation")]
        public string IPElevation { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPDomain")]
        public string IPDomain { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileMNC")]
        public string IPMobileMNC { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileMCC")]
        public string IPMobileMCC { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPMobileBrand")]
        public string IPMobileBrand { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPNetSpeed")]
        public string IPNetSpeed { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPISPName")]
        public string IPISPName { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IPUsageType")]
        public string IPUsageType { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsFreeEmail")]
        public string IsFreeEmail { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDisposableEmail")]
        public string IsDisposableEmail { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsNewDomainName")]
        public string IsNewDomainName { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDomainExists")]
        public string IsDomainExists { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsProxyIPAddress")]
        public string IsProxyIPAddress { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinFound")]
        public string IsBinFound { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinCountryMatch")]
        public string IsBinCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinNameMatch")]
        public string IsBinNameMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinPhoneMatch")]
        public string IsBinPhoneMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBinPrepaid")]
        public string IsBinPrepaid { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsAddressShipForward")]
        public string IsAddressShipForward { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipCityMatch")]
        public string IsBillShipCityMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipStateMatch")]
        public string IsBillShipStateMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipCountryMatch")]
        public string IsBillShipCountryMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsBillShipPostalMatch")]
        public string IsBillShipPostalMatch { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsIPBlacklist")]
        public string IsIPBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsEmailBlacklist")]
        public string IsEmailBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsCreditCardBlacklist")]
        public string IsCreditCardBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsDeviceBlacklist")]
        public string IsDeviceBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsUserBlacklist")]
        public string IsUserBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsShipAddressBlackList")]
        public string IsShipAddressBlackList { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsPhoneBlacklist")]
        public string IsPhoneBlacklist { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsHighRiskUsernamePassword")]
        public string IsHighRiskUsernamePassword { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsMalwareExploit")]
        public string IsMalwareExploit { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.IsExportControlledCountry")]
        public string IsExportControlledCountry { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.UserOrderID")]
        public string UserOrderID { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.UserOrderMemo")]
        public string UserOrderMemo { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProScore")]
        public string FraudLabsProScore { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProDistribution")]
        public string FraudLabsProDistribution { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProStatus")]
        public string FraudLabsProStatus { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProID")]
        public string FraudLabsProID { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProVersion")]
        public string FraudLabsProVersion { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProErrorCode")]
        public string FraudLabsProErrorCode { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProMessage")]
        public string FraudLabsProMessage { get; set; }

        [JsonConverter(typeof(StringConverter))]
        [NopResourceDisplayName("Plugins.Misc.FraudLabsPro.Order.FraudLabsProCredit")]
        public string FraudLabsProCredit { get; set; }

        public bool HideBlock { get; set; }

        public string FraudLabsProOriginalStatus { get; set; }
    }
}


        public static bool AsBool(this string value, bool defaultValue = false)
        {
            return StringConverter.AsBool(value, defaultValue);
        }

        public static byte AsByte(this string value, byte defaultValue = 0)
        {
            return StringConverter.AsByte(value, defaultValue);
        }

        public static ushort AsUInt16(this string value, ushort defaultValue = 0)
        {
            return StringConverter.AsUInt16(value, defaultValue);
        }

        public static short AsInt16(this string value, short defaultValue = 0)
        {
            return StringConverter.AsInt16(value, defaultValue);
        }

        public static uint AsUInt32(this string value, uint defaultValue = 0)
        {
            return StringConverter.AsUInt32(value, defaultValue);
        }

        public static int AsInt32(this string value, int defaultValue = 0)
        {
            return StringConverter.AsInt32(value, defaultValue);
        }


        public object Create(Type type)
             => new BitmapFont(_resourceManager);

		public async Task Deserialize(object resource, byte[] data)
		{
			var bitmapFont = (BitmapFont)resource;

            using var stream = new System.IO.MemoryStream(data);
            using var reader = new System.IO.StreamReader(stream);

            while (stream.Position < stream.Length)
            {
                var line = reader.ReadLine();
                if (line.Length == 0)
                    continue;

                var commands = line.Split(' ');
                switch (commands[0])
                {
                    case "info": // Ignore
                        break;
                    case "common":
                        ParseCommonInfo(bitmapFont, ParseCommands(commands));
                        break;
                    case "page":
                        await ParsePageInfo(bitmapFont, ParseCommands(commands));
                        break;
                    case "chars": // Ignore
                        break;
                    case "char":
                        ParseCharInfo(bitmapFont, ParseCommands(commands));
                        break;
                }
            }
        }

		private Dictionary<string, string> ParseCommands(string[] commands)
		{
			var data = new Dictionary<string, string>();
			foreach (var command in commands)
			{
				if (command.Length == 0 || !command.Contains('='))
					continue;

				var splitCommand = command.Split('=');
				data.Add(splitCommand[0].Trim(), splitCommand[1].Trim());
			}

			return data;
		}

		private void ParseCommonInfo(BitmapFont bitmapFont, Dictionary<string, string> commands)
		{
			bitmapFont.LineHeight = StringConverter.Parse<float>(commands["lineHeight"]);
			bitmapFont.Scale = new Vector2(StringConverter.Parse<float>(commands["scaleW"]), StringConverter.Parse<float>(commands["scaleH"]));
		}

		private async Task ParsePageInfo(BitmapFont bitmapFont, Dictionary<string, string> commands)
		{
			var filename = commands["file"].Replace("\"", "");
			bitmapFont.Textures.Add(await _resourceManager.LoadAsync<Texture>(filename));
		}

		private void ParseCharInfo(BitmapFont bitmapFont, Dictionary<string, string> commands)
		{
			var id = StringConverter.Parse<int>(commands["id"]);
			var x = StringConverter.Parse<int>(commands["x"]);
			var y = StringConverter.Parse<int>(commands["y"]);
			var width = StringConverter.Parse<int>(commands["width"]);
			var height = StringConverter.Parse<int>(commands["height"]);
			var xoffset = StringConverter.Parse<int>(commands["xoffset"]);
			var yoffset = StringConverter.Parse<int>(commands["yoffset"]);
			var xadvance = StringConverter.Parse<int>(commands["xadvance"]);
			var page = StringConverter.Parse<int>(commands["page"]);

			var uvSize = new Vector2(width / bitmapFont.Scale.X, height / bitmapFont.Scale.Y);

			bitmapFont.Glyphs.Add((char)id, new BitmapFont.Glyph()
			{
				UvPosition = new Vector2(x / bitmapFont.Scale.X, y / bitmapFont.Scale.Y + uvSize.Y),
				UvSize = new Vector2(uvSize.X, -uvSize.Y),
				Size = new Vector2(width, height),
				Offset = new Vector2(xoffset, yoffset),
				XAdvance = xadvance,
				Page = page
			});
		}

CsvHelper.TypeConversion.StringConverter : ITypeConverter

Constructors :

public StringConverter()

Methods :

public Object ConvertFromString(String text = , IReaderRow row = , MemberMapData memberMapData = )
public String ConvertToString(Object value = , IWriterRow row = , MemberMapData memberMapData = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()