/// <summary>
        /// Gets a string representation of the person item.
        /// </summary>
        ///
        /// <returns>
        /// A string representation of the person item.
        /// </returns>
        ///
        public override string ToString()
        {
            StringBuilder result = new StringBuilder(200);

            if (Name != null)
            {
                result.Append(Name);
            }

            if (Organization != null)
            {
                result.AppendFormat(
                    Resources.ListFormat,
                    Organization);
            }

            if (ProfessionalTraining != null)
            {
                result.AppendFormat(
                    Resources.ListFormat,
                    ProfessionalTraining);
            }

            if (PersonId != null)
            {
                result.AppendFormat(
                    Resources.ListFormat,
                    PersonId);
            }

            if (ContactInformation != null)
            {
                result.AppendFormat(
                    Resources.ListFormat,
                    ContactInformation.ToString());
            }

            if (PersonType != null &&
                !string.IsNullOrEmpty(PersonType.Text))
            {
                result.AppendFormat(
                    Resources.ListFormat,
                    PersonType.Text);
            }

            return(result.ToString());
        }
 public void ToString_WhenCalled_ReturnsIDString()
 {
     Expect(contactInformationFixture_Home.ToString(), Is.EqualTo(contactInformationFixture_Home.ID.ToString()));
 }
Esempio n. 3
0
 public override string ToString()
 {
     return(ContactInformation.ToString());
 }