コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DncList" /> class.
 /// </summary>
 /// <param name="Name">The name of the list. (required).</param>
 /// <param name="Version">Required for updates, must match the version number of the most recent update.</param>
 /// <param name="ImportStatus">the status of the import process.</param>
 /// <param name="DncCodes">the list of dnc.com codes to be treated as DNC.</param>
 public DncList(string Name = null, int?Version = null, ImportStatus ImportStatus = null, List <string> DncCodes = null)
 {
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for DncList and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     this.Version      = Version;
     this.ImportStatus = ImportStatus;
     this.DncCodes     = DncCodes;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ContactList" /> class.
 /// </summary>
 /// <param name="Name">Name.</param>
 /// <param name="Version">Required for updates, must match the version number of the most recent update.</param>
 /// <param name="ColumnNames">the contact column names (required).</param>
 /// <param name="PhoneColumns">the columns containing phone numbers (required).</param>
 /// <param name="ImportStatus">the status of the import process.</param>
 /// <param name="PreviewModeColumnName">the name of the column that holds the indicators for contacts that are to be dialed in preview mode only.</param>
 /// <param name="PreviewModeAcceptedValues">list of user-defined values indicating the contact is to be dialed in preview mode only.</param>
 public ContactList(string Name = null, int?Version = null, List <string> ColumnNames = null, List <ContactPhoneNumberColumn> PhoneColumns = null, ImportStatus ImportStatus = null, string PreviewModeColumnName = null, List <string> PreviewModeAcceptedValues = null)
 {
     // to ensure "ColumnNames" is required (not null)
     if (ColumnNames == null)
     {
         throw new InvalidDataException("ColumnNames is a required property for ContactList and cannot be null");
     }
     else
     {
         this.ColumnNames = ColumnNames;
     }
     // to ensure "PhoneColumns" is required (not null)
     if (PhoneColumns == null)
     {
         throw new InvalidDataException("PhoneColumns is a required property for ContactList and cannot be null");
     }
     else
     {
         this.PhoneColumns = PhoneColumns;
     }
     this.Name                      = Name;
     this.Version                   = Version;
     this.ImportStatus              = ImportStatus;
     this.PreviewModeColumnName     = PreviewModeColumnName;
     this.PreviewModeAcceptedValues = PreviewModeAcceptedValues;
 }