2017-02-08 19:26:05 +01:00
|
|
|
|
using Microsoft.eShopOnContainers.Services.Ordering.Domain.SeedWork;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2016-11-21 12:41:36 +01:00
|
|
|
|
|
2017-01-25 17:10:08 +01:00
|
|
|
|
namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate
|
|
|
|
|
{
|
2016-11-21 12:41:36 +01:00
|
|
|
|
public class Address
|
2017-02-08 19:26:05 +01:00
|
|
|
|
:ValueObject
|
2016-11-21 12:41:36 +01:00
|
|
|
|
{
|
2017-02-08 19:26:05 +01:00
|
|
|
|
public String Street { get; private set; }
|
2016-11-21 12:41:36 +01:00
|
|
|
|
|
2017-02-08 19:26:05 +01:00
|
|
|
|
public String City { get; private set; }
|
2016-11-21 12:41:36 +01:00
|
|
|
|
|
2017-02-08 19:26:05 +01:00
|
|
|
|
public String State { get; private set; }
|
2016-11-21 12:41:36 +01:00
|
|
|
|
|
2017-02-08 19:26:05 +01:00
|
|
|
|
public String Country { get; private set; }
|
2016-11-21 12:41:36 +01:00
|
|
|
|
|
2017-02-08 19:26:05 +01:00
|
|
|
|
public String ZipCode { get; private set; }
|
2016-11-21 12:41:36 +01:00
|
|
|
|
|
2017-05-18 11:42:22 +02:00
|
|
|
|
private Address() { }
|
|
|
|
|
|
2017-01-25 17:10:08 +01:00
|
|
|
|
public Address(string street, string city, string state, string country, string zipcode)
|
|
|
|
|
{
|
|
|
|
|
Street = street;
|
|
|
|
|
City = city;
|
|
|
|
|
State = state;
|
|
|
|
|
Country = country;
|
|
|
|
|
ZipCode = zipcode;
|
|
|
|
|
}
|
2017-02-08 19:26:05 +01:00
|
|
|
|
|
|
|
|
|
protected override IEnumerable<object> GetAtomicValues()
|
|
|
|
|
{
|
|
|
|
|
yield return Street;
|
|
|
|
|
yield return City;
|
|
|
|
|
yield return State;
|
|
|
|
|
yield return Country;
|
|
|
|
|
yield return ZipCode;
|
|
|
|
|
}
|
2016-11-21 12:41:36 +01:00
|
|
|
|
}
|
|
|
|
|
}
|