Class PhonenumberUtils

    Definition

    Namespace:
    Tizen.PhonenumberUtils
    Assembly:
    Tizen.PhonenumberUtils.dll

    The PhonenumberUtils class provides the methods for parsing, formatting, and normalizing the phone numbers.

    public class PhonenumberUtils : IDisposable
    Inheritance
    object
    PhonenumberUtils
    Implements
    System.IDisposable

    Constructors

    View Source

    PhonenumberUtils()

    Creates a PhonenumberUtils.

    Declaration
    public PhonenumberUtils()
    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.NotSupportedException

    Thrown when the feature is not supported.

    Methods

    View Source

    Dispose()

    Releases all the resources used by the PhonenumberUtils. It should be called after it has finished using the object.

    Declaration
    public void Dispose()
    View Source

    ~PhonenumberUtils()

    The destructor.

    Declaration
    protected ~PhonenumberUtils()
    View Source

    GetFormattedNumber(string, Region)

    Gets the formatted number.

    Declaration
    public string GetFormattedNumber(string number, Region region)
    Parameters
    Type Name Description
    string number

    The number.

    Region region

    The region of number.

    Returns
    Type Description
    string

    The formatted number string.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.NotSupportedException

    Thrown when the feature is not supported.

    System.ArgumentException

    Thrown when the input coordinates are invalid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    View Source

    GetLocationFromNumber(string, Region, Language)

    Gets the location string from the number, region, and language.

    Declaration
    public string GetLocationFromNumber(string number, Region region, Language language)
    Parameters
    Type Name Description
    string number

    The number.

    Region region

    The region of number.

    Language language

    The language of location.

    Returns
    Type Description
    string

    The location string.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.NotSupportedException

    Thrown when the feature is not supported.

    System.ArgumentException

    Thrown when the input coordinates are invalid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    View Source

    GetNormalizedNumber(string)

    Gets the normalized number.

    Declaration
    public string GetNormalizedNumber(string number)
    Parameters
    Type Name Description
    string number

    The number.

    Returns
    Type Description
    string

    The normalized number.

    Remarks

    Normalized number starts with plus('+') and country code, and excludes the separators such as dash or space. It is a format of the E.164 standard including the country code based on the current network.

    Exceptions
    Type Condition
    System.InvalidOperationException

    Thrown when the method failed due to an invalid operation.

    System.NotSupportedException

    Thrown when the feature is not supported.

    System.ArgumentException

    Thrown when the input coordinates are invalid.

    System.OutOfMemoryException

    Thrown when failed due to out of memory.

    System.UnauthorizedAccessException

    Thrown when the application does not have proper privileges.

    Implements

    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX