コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GeocodeRequest" /> class.
 /// </summary>
 /// <param name="Type">Type (required).</param>
 /// <param name="Preferences">Preferences.</param>
 /// <param name="Addresses">Addresses (required).</param>
 public GeocodeRequest(string Type = null, GeocodePreferences Preferences = null, List <GeocodeRequestAddress> Addresses = null)
 {
     // to ensure "Type" is required (not null)
     if (Type == null)
     {
         throw new InvalidDataException("Type is a required property for GeocodeRequest and cannot be null");
     }
     else
     {
         this.Type = Type;
     }
     // to ensure "Addresses" is required (not null)
     if (Addresses == null)
     {
         throw new InvalidDataException("Addresses is a required property for GeocodeRequest and cannot be null");
     }
     else
     {
         this.Addresses = Addresses;
     }
     this.Preferences = Preferences;
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="KeyLookupRequest" /> class.
 /// </summary>
 /// <param name="Type">Type.</param>
 /// <param name="Preferences">Preferences.</param>
 /// <param name="Keys">Keys.</param>
 public KeyLookupRequest(string Type = null, GeocodePreferences Preferences = null, List <Keys> Keys = null)
 {
     this.Type        = Type;
     this.Preferences = Preferences;
     this.Keys        = Keys;
 }