Exemplo n.º 1
0
        public override string ToString()
        {
            StringBuilder str     = new StringBuilder();
            String        addrStr = base.ToString();

            if (!string.IsNullOrEmpty(addrStr))
            {
                str.AppendLine(addrStr);
            }
            if (!string.IsNullOrEmpty(InternalLocation.GetValueOrDefault()))
            {
                str.AppendLine(InternalLocation.GetValueOrDefault());
            }
            if (!string.IsNullOrEmpty(PostalBox.GetValueOrDefault()))
            {
                str.AppendLine(PostalBox.GetValueOrDefault());
            }
            if (!string.IsNullOrEmpty(Town.GetValueOrDefault()))
            {
                str.AppendLine(Town.GetValueOrDefault());
            }
            if (!string.IsNullOrEmpty(Region.GetValueOrDefault()))
            {
                str.AppendLine(Region.GetValueOrDefault());
            }
            if (!string.IsNullOrEmpty(PostalCode.GetValueOrDefault()))
            {
                str.AppendLine(PostalCode.GetValueOrDefault());
            }
            if (!string.IsNullOrEmpty(Country.GetValueOrDefault()))
            {
                str.AppendLine(Country.GetValueOrDefault());
            }
            return(str.ToString().Trim());
        }
Exemplo n.º 2
0
        public override string GetStepParameters()
        {
            var parameters = new List <string>();

            parameters.Add(Purpose.ToStepValue());
            parameters.Add(Description != null ? Description.ToStepValue() : "$");
            parameters.Add(UserDefinedPurpose != null ? UserDefinedPurpose.ToStepValue() : "$");
            parameters.Add(InternalLocation != null ? InternalLocation.ToStepValue() : "$");
            parameters.Add(AddressLines != null ? AddressLines.ToStepValue() : "$");
            parameters.Add(PostalBox != null ? PostalBox.ToStepValue() : "$");
            parameters.Add(Town != null ? Town.ToStepValue() : "$");
            parameters.Add(Region != null ? Region.ToStepValue() : "$");
            parameters.Add(PostalCode != null ? PostalCode.ToStepValue() : "$");
            parameters.Add(Country != null ? Country.ToStepValue() : "$");

            return(string.Join(", ", parameters.ToArray()));
        }