Example #1
0
		public Contact() {
			name = new Name();

			notes = null;
			xTags = null;

			businessDetail = new BusinessDetail();
			personalDetail = new PersonalDetail();
			categories = new Property();
		}
Example #2
0
		private StringBuilder ComposeFieldName(Name name) {
			if (name.LastName.Value == null &&
				name.FirstName.Value == null &&
				name.MiddleName.Value == null &&
				name.Salutation.Value == null &&
				name.Suffix.Value == null) {
				return new StringBuilder(0);
			}

			//TODO: optimize this to avoid inserting ';' character too many times...

			StringBuilder output = new StringBuilder(120); // Estimate 120 as needed
			ArrayList properties = new ArrayList();

			if (name.LastName.Value != null) {
				output.Append(name.LastName.Value);
				properties.Add(name.LastName);
			}

			output.Append(";");

			if (name.FirstName.Value != null) {
				output.Append(name.FirstName.Value);
				properties.Add(name.FirstName);
			}

			output.Append(";");

			if (name.MiddleName.Value != null) {
				output.Append(name.MiddleName.Value);
				properties.Add(name.MiddleName);
			}

			output.Append(";");

			if (name.Salutation.Value != null) {
				output.Append(name.Salutation.Value);
				properties.Add(name.Salutation);
			}

			output.Append(";");

			if (name.Suffix.Value != null) {
				output.Append(name.Suffix.Value);
				properties.Add(name.Suffix);
			}

			return ComposevCardComponent(output.ToString(), properties, "N");
		}