示例#1
0
        private InformationData ConvertInformationDataInteger(Generated.InformationData infoData)
        {
            var infoDataInteger = infoData as Generated.InformationDataInt;

            if (infoDataInteger == null)
            {
                throw new ArgumentException("Must be InformationDataInt", "infoData");
            }

            var cultureInfo = this.ConvertCulture(infoData.Culture);

            var convertedInfoDataInteger = new InformationDataInt(cultureInfo, infoDataInteger.AttributeId, infoDataInteger.Value);

            return(convertedInfoDataInteger);
        }
示例#2
0
        private InformationData ConvertInformationDataString(Generated.InformationData infoData)
        {
            var infoDataString = infoData as Generated.InformationDataString;

            if (infoDataString == null)
            {
                throw new ArgumentException("Must be InformationDataString", "infoData");
            }

            var cultureInfo = this.ConvertCulture(infoData.Culture);

            var convertedInfoDataString = new InformationDataString(cultureInfo, infoDataString.AttributeId, infoDataString.Value);

            return(convertedInfoDataString);
        }
示例#3
0
        private InformationData ConvertInformationDataBoolean(Generated.InformationData infoData)
        {
            var infoDataBool = infoData as Generated.InformationDataBoolean;

            if (infoDataBool == null)
            {
                throw new ArgumentException("Must be InformationDataBoolean", "infoData");
            }

            var cultureInfo = this.ConvertCulture(infoData.Culture);

            var convertedInfoDataBool = new InformationDataBool(cultureInfo, infoDataBool.AttributeId, infoDataBool.Value);

            return(convertedInfoDataBool);
        }