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); } }
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()); }
public ChargeById(string id) { this.Id = ChargeId.With(Guid.Parse(id)).Value; }
public SpyChargeAggregate(ChargeId id) : base(id) { }
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)); }