/// <summary> /// International phone number /// </summary> /// <param name="number"></param> public Address(long number) { string stringNumber = number.ToString(); //this.m_AddressLength = stringNumber.Length; this.m_TypeOfNumber = TypeOfNumber.InternationalNumber; this.m_NumberingPlanIdentification = NumberingPlanIdentification.ISDN_telephoneNumberingPlan; this.m_AddressValue = stringNumber; }
public Address(string codedAddressField) { int length = int.Parse(codedAddressField.Substring(0, 2), System.Globalization.NumberStyles.HexNumber); this.m_AddressValue = BaseConversionHelper.DecimalSemiOctetToDecimal(codedAddressField.Substring(4, codedAddressField.Length - 4)).ToString(); if (this.m_AddressValue.Length != length) { throw new NotImplementedException(); } int[] typeOfAddress = BaseConversionHelper.HexToBinary(codedAddressField.Substring(2, 2)); this.m_TypeOfNumber = (TypeOfNumber)BaseConversionHelper.BinaryToDecimal(new int[] { typeOfAddress[4], typeOfAddress[5], typeOfAddress[6] }); this.m_NumberingPlanIdentification = (NumberingPlanIdentification)BaseConversionHelper.BinaryToDecimal(new int[] { typeOfAddress[0], typeOfAddress[1], typeOfAddress[2], typeOfAddress[3] }); }