コード例 #1
0
        public static ElectoralClass GetElectoralClass(string electionKey)
        {
            var stateCode  = GetStateCodeFromKey(electionKey);
            var countyCode = GetCountyCodeFromKey(electionKey);
            var localCode  = GetLocalCodeFromKey(electionKey);

            return(Offices.GetElectoralClass(stateCode, countyCode, localCode));
        }
コード例 #2
0
 public static bool IsStateOrFederal(this OfficeClass officeClass)
 {
     return(Offices.GetElectoralClass(officeClass) == Vote.ElectoralClass.State ||
            officeClass.IsFederal());
 }
コード例 #3
0
 public static bool IsState(this OfficeClass officeClass)
 {
     return(Offices.GetElectoralClass(officeClass) == Vote.ElectoralClass.State);
 }
コード例 #4
0
 public static bool IsLocal(this OfficeClass officeClass)
 {
     return(Offices.GetElectoralClass(officeClass) == Vote.ElectoralClass.Local);
 }
コード例 #5
0
 public static bool IsCounty(this OfficeClass officeClass)
 {
     return(Offices.GetElectoralClass(officeClass) == Vote.ElectoralClass.County);
 }
コード例 #6
0
 public static ElectoralClass ElectoralClass(this OfficeClass officeClass)
 {
     return(Offices.GetElectoralClass(officeClass));
 }