Search Results for

    Show / Hide Table of Contents

    Class CountryService

    Inheritance
    System.Object
    CountryService
    Implements
    ICountryService
    Namespace: DirectScale.Disco.Extension.Services
    Assembly: DirectScale.Disco.Extension.Abstractions.dll
    Syntax
    public class CountryService : Object, ICountryService

    Constructors

    CountryService(IApiService)

    Declaration
    public CountryService(IApiService apiService)
    Parameters
    Type Name Description
    IApiService apiService

    Methods

    GetAllCountryLanguages()

    Gets the languages for every active country.

    Declaration
    public Task<CountryLanguage[]> GetAllCountryLanguages()
    Returns
    Type Description
    System.Threading.Tasks.Task<CountryLanguage[]>

    Array of objects mapping countries to languages.

    GetCountries()

    Gets all country details for countries set in admin page "Countries"

    Declaration
    public Task<Country[]> GetCountries()
    Returns
    Type Description
    System.Threading.Tasks.Task<Country[]>

    Array of Countries.

    GetCountry(String)

    Gets the information about countryCode

    Declaration
    public Task<Country> GetCountry(string countryCode)
    Parameters
    Type Name Description
    System.String countryCode

    Country code to find.

    Returns
    Type Description
    System.Threading.Tasks.Task<Country>

    A Country instance with information about the country. Null if the countryCode is null or not active.

    GetCountryLanguages(String)

    Gets the configured languages for specified countryCode.

    Declaration
    public Task<CountryLanguage[]> GetCountryLanguages(string countryCode)
    Parameters
    Type Name Description
    System.String countryCode

    The specific country to find language information for.

    Returns
    Type Description
    System.Threading.Tasks.Task<CountryLanguage[]>

    All languages configured for that country.

    GetDefaultLanguageCode(String)

    Gets the default language specified for countryCode.

    Declaration
    public Task<CountryLanguage> GetDefaultLanguageCode(string countryCode)
    Parameters
    Type Name Description
    System.String countryCode

    The specific country to find language information for.

    Returns
    Type Description
    System.Threading.Tasks.Task<CountryLanguage>

    The default language configured for that country.

    GetState(String, String)

    Gets state details for specified countryCode and stateCode.

    Declaration
    public Task<State> GetState(string countryCode, string stateCode)
    Parameters
    Type Name Description
    System.String countryCode

    ISO 3166-1 alpha-2 country code.

    System.String stateCode

    ISO 3166-2 state code

    Returns
    Type Description
    System.Threading.Tasks.Task<State>

    Full name for state.

    GetStates(String)

    Gets all state details for specified countryCode.

    Declaration
    public Task<State[]> GetStates(string countryCode)
    Parameters
    Type Name Description
    System.String countryCode

    ISO 3166-1 alpha-2 country code.

    Returns
    Type Description
    System.Threading.Tasks.Task<State[]>

    All state names and code in countryCode.

    Implements

    ICountryService
    In This Article
    Back to top Copyright © 2022 DirectScale
    Generated by DocFX