public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (TransactionId != null ? TransactionId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ChargeStatus != null ? ChargeStatus.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PaymentProcessor != null ? PaymentProcessor.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ AddressIsActive.GetHashCode();
         hashCode = (hashCode * 397) ^ (Status != null ? Status.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Type != null ? Type.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ChargeId.GetHashCode();
         hashCode = (hashCode * 397) ^ AddressId.GetHashCode();
         hashCode = (hashCode * 397) ^ (ShopifyId != null ? ShopifyId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ShopifyOrderId != null ? ShopifyOrderId.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ShopifyOrderNumber.GetHashCode();
         hashCode = (hashCode * 397) ^ (ShopifyCartToken != null ? ShopifyCartToken.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ShippingDate.GetHashCode();
         hashCode = (hashCode * 397) ^ ScheduledAt.GetHashCode();
         hashCode = (hashCode * 397) ^ ShippedDate.GetHashCode();
         hashCode = (hashCode * 397) ^ ProcessedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ CustomerId.GetHashCode();
         hashCode = (hashCode * 397) ^ (FirstName != null ? FirstName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LastName != null ? LastName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Hash != null ? Hash.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsPrepaid.GetHashCode();
         hashCode = (hashCode * 397) ^ CreatedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ UpdatedAt.GetHashCode();
         hashCode = (hashCode * 397) ^ (Email != null ? Email.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (TotalPrice != null ? TotalPrice.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ShippingAddress != null ? ShippingAddress.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (BillingAddress != null ? BillingAddress.GetHashCode() : 0);
         return(hashCode);
     }
 }
Beispiel #2
0
        public async Task <IActionResult> ChargesByLocationAndUser([CustomizeValidator(Skip = true)][FromBody]
                                                                   CloseCharges model)
        {
            await Task.WhenAll(model.Charges.Select(async id =>
                                                    await this.commandBus
                                                    .PublishAsync(new CloseCharge(ChargeId.With(Guid.Parse(id))), CancellationToken.None)
                                                    .ConfigureAwait(false))).ConfigureAwait(false);

            return(this.Ok());
        }
Beispiel #3
0
 public ChargeById(string id)
 {
     this.Id = ChargeId.With(Guid.Parse(id)).Value;
 }
Beispiel #4
0
 public SpyChargeAggregate(ChargeId id) : base(id)
 {
 }
Beispiel #5
0
 private void MapViewModelsToCommands()
 {
     this.CreateMap <AddChargeViewModel, AddChargeCommand>()
     .ConstructUsing(source => new AddChargeCommand(ChargeId.NewComb(), source.Location, source.Car,
                                                    source.Date, source.LoadStart, source.LoadEnd, source.PricePerKw, source.BatteryCapacity));
 }