Esempio n. 1
0
 private static string Mask(ConstituentInfoType data)
 {
     switch (data)
     {
         case ConstituentInfoType.Header: return "HD";
         case ConstituentInfoType.Attributes: return "AT";
         case ConstituentInfoType.Constituencies: return "CT";
         case ConstituentInfoType.Contributions: return "CN";
         case ConstituentInfoType.Interests: return "IN";
         case ConstituentInfoType.EmailAddresses: return "EA";
         case ConstituentInfoType.Rankings: return "RN";
         case ConstituentInfoType.Associations: return "AS";
         case ConstituentInfoType.Memberships: return "MB";
         case ConstituentInfoType.PhoneNumbers: return "PH";
         case ConstituentInfoType.Addresses: return "AD";
         case ConstituentInfoType.ProgramListings: return "PR";
     }
     throw new ApiParameterMaskException(data.ToString());
 }
Esempio n. 2
0
 private static string Mask(ConstituentInfoType[] data)
 {
     if (data == null || data.Length == 0)
     {
         return String.Empty;
     }
     return String.Join(",", (from t in data
                             select Mask(t)).ToArray<string>());
 }