1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
|
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace System.IdentityModel.Metadata
{
/// <summary>
/// Defines the contact person class.
/// </summary>
public class ContactPerson
{
ContactType _type = ContactType.Unspecified;
string _company;
string _givenName;
string _surname;
Collection<string> _emailAddresses = new Collection<string>();
Collection<string> _telephoneNumbers = new Collection<string>();
/// <summary>
/// Empty constructor for contact person.
/// </summary>
public ContactPerson()
{
}
/// <summary>
/// Creates a contact person object with the contact type.
/// </summary>
/// <param name="contactType">The <see cref="ContactType"/> for this object.</param>
public ContactPerson(ContactType contactType)
{
_type = contactType;
}
/// <summary>
/// Gets or sets the company name.
/// </summary>
public string Company
{
get { return _company; }
set { _company = value; }
}
/// <summary>
/// Gets the email address collection.
/// </summary>
public ICollection<string> EmailAddresses
{
get { return _emailAddresses; }
}
/// <summary>
/// Gets or sets the given name.
/// </summary>
public string GivenName
{
get { return _givenName; }
set { _givenName = value; }
}
/// <summary>
/// Gets or sets the surname.
/// </summary>
public string Surname
{
get { return _surname; }
set { _surname = value; }
}
/// <summary>
/// Gets the collection of telephone numbers.
/// </summary>
public ICollection<string> TelephoneNumbers
{
get { return _telephoneNumbers; }
}
/// <summary>
/// Gets or sets the contact type.
/// </summary>
public ContactType Type
{
get { return _type; }
set { _type = value; }
}
}
}
|