コード例 #1
0
ファイル: TrackingEvent.cs プロジェクト: follesoe/Geta.Bring
 public TrackingEvent(
     string description,
     string status,
     RecipientSignature recipientSignature,
     string unitId,
     Uri unitInformationUrl,
     string unitType,
     string postalCode,
     string city,
     string countryCode,
     string country,
     DateTime dateIso,
     string displayDate,
     string displayTime,
     bool consignmentEvent,
     IEnumerable <TrackingEventDefinition> definitions)
 {
     Definitions        = definitions ?? Enumerable.Empty <TrackingEventDefinition>();
     ConsignmentEvent   = consignmentEvent;
     DisplayTime        = displayTime ?? throw new ArgumentNullException(nameof(displayTime));
     DisplayDate        = displayDate ?? throw new ArgumentNullException(nameof(displayDate));
     DateIso            = dateIso;
     Country            = country ?? throw new ArgumentNullException(nameof(country));
     CountryCode        = countryCode ?? throw new ArgumentNullException(nameof(countryCode));
     City               = city ?? throw new ArgumentNullException(nameof(city));
     PostalCode         = postalCode ?? throw new ArgumentNullException(nameof(postalCode));
     UnitType           = unitType ?? throw new ArgumentNullException(nameof(unitType));
     UnitInformationUrl = unitInformationUrl;
     UnitId             = unitId ?? throw new ArgumentNullException(nameof(unitId));
     RecipientSignature = recipientSignature ?? throw new ArgumentNullException(nameof(recipientSignature));
     Status             = status ?? throw new ArgumentNullException(nameof(status));
     Description        = description ?? throw new ArgumentNullException(nameof(description));
 }
コード例 #2
0
 public TrackingEvent(
     string description,
     string status,
     RecipientSignature recipientSignature,
     string unitId,
     Uri unitInformationUrl,
     string unitType,
     string postalCode,
     string city,
     string countryCode,
     string country,
     DateTime dateIso,
     string displayDate,
     string displayTime,
     bool consignmentEvent,
     IEnumerable <TrackingEventDefinition> definitions)
 {
     if (description == null)
     {
         throw new ArgumentNullException("description");
     }
     if (status == null)
     {
         throw new ArgumentNullException("status");
     }
     if (recipientSignature == null)
     {
         throw new ArgumentNullException("recipientSignature");
     }
     if (unitId == null)
     {
         throw new ArgumentNullException("unitId");
     }
     if (unitType == null)
     {
         throw new ArgumentNullException("unitType");
     }
     if (postalCode == null)
     {
         throw new ArgumentNullException("postalCode");
     }
     if (city == null)
     {
         throw new ArgumentNullException("city");
     }
     if (countryCode == null)
     {
         throw new ArgumentNullException("countryCode");
     }
     if (country == null)
     {
         throw new ArgumentNullException("country");
     }
     if (displayDate == null)
     {
         throw new ArgumentNullException("displayDate");
     }
     if (displayTime == null)
     {
         throw new ArgumentNullException("displayTime");
     }
     Definitions        = definitions ?? Enumerable.Empty <TrackingEventDefinition>();
     ConsignmentEvent   = consignmentEvent;
     DisplayTime        = displayTime;
     DisplayDate        = displayDate;
     DateIso            = dateIso;
     Country            = country;
     CountryCode        = countryCode;
     City               = city;
     PostalCode         = postalCode;
     UnitType           = unitType;
     UnitInformationUrl = unitInformationUrl;
     UnitId             = unitId;
     RecipientSignature = recipientSignature;
     Status             = status;
     Description        = description;
 }