Class AddressesService
Inheritance
System.Object
AddressesService
Implements
Namespace: DirectScale.Disco.Extension.Services
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public class AddressesService : Object, IAddressesService
Constructors
AddressesService(IApiService)
Declaration
public AddressesService(IApiService apiService)
Parameters
Type | Name | Description |
---|---|---|
IApiService | apiService |
Methods
GetAddress(Int32)
Gets the address with specified addressId
.
Declaration
public Task<Address> GetAddress(int addressId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | addressId | The address DB ID. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Address> | Address if found, otherwise an empty address where all properties are null. |
See Also
GetAddresses(Int32[])
Gets the addresses with specified addressIds
.
Declaration
public Task<IReadOnlyDictionary<int, Address>> GetAddresses(int[] addressIds)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | addressIds | The address DB IDs. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyDictionary<System.Int32, Address>> | A dictionary containing the addresses found with |
Remarks
Ids in addressIds
that are not found in the DB will not be included in the dictionary. Be careful not to get KeyNotFound exceptions.
See Also
GetLocalization(Address)
Gets specific Localization information such as currency.
Declaration
public Task<Localization> GetLocalization(Address address)
Parameters
Type | Name | Description |
---|---|---|
Address | address | Address to get more information about. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Localization> | Currency and region info. |