added Address CreateFrom helper
All checks were successful
Publish NuGet Packages / build-and-publish (push) Successful in 38s
All checks were successful
Publish NuGet Packages / build-and-publish (push) Successful in 38s
This commit is contained in:
parent
075a803f4f
commit
854658f732
@ -15,4 +15,19 @@ public record Address(bool Normalized = false) : IAddress
|
|||||||
public GeoPoint? Location { get; set; }
|
public GeoPoint? Location { get; set; }
|
||||||
public string? Note { get; set; }
|
public string? Note { get; set; }
|
||||||
public bool IsNormalized() => Normalized;
|
public bool IsNormalized() => Normalized;
|
||||||
|
|
||||||
|
public static Address CreateFrom(IAddress address, GeoPoint? location = null, string? note = null, bool normalized = false)
|
||||||
|
{
|
||||||
|
return new Address(normalized)
|
||||||
|
{
|
||||||
|
Line1 = address.Line1,
|
||||||
|
Line2 = address.Line2,
|
||||||
|
City = address.City,
|
||||||
|
Subdivision = address.Subdivision,
|
||||||
|
PostalCode = address.PostalCode,
|
||||||
|
Country = address.Country,
|
||||||
|
Location = location,
|
||||||
|
Note = note,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user