コード例 #1
0
        /// <summary>
        /// Converts the value of the specified <see cref="NycPublicOfficeType"/> to its equivalent <see cref="String"/> representation.
        /// </summary>
        /// <param name="office">A New York City publicly elected office.</param>
        /// <returns>The <see cref="String"/> equivalent of the value of <paramref name="office"/>.</returns>
        public static string ToString(NycPublicOfficeType office)
        {
            switch (office)
            {
            case NycPublicOfficeType.BoroughPresident: return("Borough President");

            case NycPublicOfficeType.CityCouncilMember: return("City Council Member");

            case NycPublicOfficeType.Comptroller: return("Comptroller");

            case NycPublicOfficeType.Mayor: return("Mayor");

            case NycPublicOfficeType.PublicAdvocate: return("Public Advocate");

            case NycPublicOfficeType.Undeclared: return("Undeclared");

            default: return(string.Empty);
            }
        }
コード例 #2
0
ファイル: NycPublicOffice.cs プロジェクト: simoncwu/CAccess
 /// <summary>
 /// Declares a Borough President of New York City.
 /// </summary>
 /// <param name="borough">The borough presided over.</param>
 public NycPublicOffice(NycBorough borough)
 {
     _type    = NycPublicOfficeType.BoroughPresident;
     _borough = borough;
 }
コード例 #3
0
ファイル: NycPublicOffice.cs プロジェクト: simoncwu/CAccess
 /// <summary>
 /// Initializes an undeclared public office of New York City.
 /// </summary>
 public NycPublicOffice()
 {
     _type = NycPublicOfficeType.Undeclared;
 }
コード例 #4
0
ファイル: NycPublicOffice.cs プロジェクト: simoncwu/CAccess
 /// <summary>
 /// Declares a public office of New York City.
 /// </summary>
 /// <param name="type">The office type.</param>
 public NycPublicOffice(NycPublicOfficeType type)
 {
     _type = type;
 }