TimeZoneCloudClient¶
Namespace: ThinkGeo.Core
A class provides the methods to access the TimeZone APIs.
public class TimeZoneCloudClient : CloudClient, System.IDisposable
Inheritance Object → CloudClient → TimeZoneCloudClient
Implements IDisposable
Remarks:
A class provides the methods to access the TimeZone APIs.
Properties¶
TimeoutInSeconds¶
The request timeout, default 100 seconds
public int TimeoutInSeconds { get; set; }
Property Value¶
WebProxy¶
The proxy used for requesting a Web Response.
public IWebProxy WebProxy { get; set; }
Property Value¶
IWebProxy
ClientId¶
A GIS Server NativeConfidential client ID.
public string ClientId { get; set; }
Property Value¶
ClientSecret¶
A GIS Server NativeConfidential client secret.
public string ClientSecret { get; set; }
Property Value¶
BaseUris¶
Candidate Gis Server Uris. This collection must have one uri at least before sending any request.
public Collection<Uri> BaseUris { get; }
Property Value¶
Constructors¶
TimeZoneCloudClient()¶
Initilizes an instance. You need apply client Id and secret by properties.
public TimeZoneCloudClient()
TimeZoneCloudClient(String, String)¶
Initializes an instance with ClientID and ClientSecret. It will send a request to GIS Server to gain the token which will be added to the Header for all the requests.
public TimeZoneCloudClient(string clientId, string clientSecret)
Parameters¶
clientId
String
The ClientID for the auth.
clientSecret
String
The ClientSecret for the auth.
Exceptions¶
ArgumentNullException
Thrown when the or is null.
Methods¶
GetTimeZoneByCoordinate(Double, Double)¶
Get the time zone of a coodinate.
public CloudTimeZoneResult GetTimeZoneByCoordinate(double latitude, double longitude)
Parameters¶
latitude
Double
The latitude of the coodinate.
longitude
Double
The longitude of the coodinate.
Returns¶
CloudTimeZoneResult
The time zone result.
GetTimeZoneByCoordinate(Double, Double, Int32)¶
Get the time zone of a coodinate.
public CloudTimeZoneResult GetTimeZoneByCoordinate(double x, double y, int projectionInSrid)
Parameters¶
x
Double
The X of the coordinate.
y
Double
The Y of the coordinate.
projectionInSrid
Int32
The Srid of the coordinate.
Returns¶
CloudTimeZoneResult
The time zone result.
GetTimeZoneByCoordinate(Double, Double, String)¶
Get the time zone of a coodinate.
public CloudTimeZoneResult GetTimeZoneByCoordinate(double x, double y, string projectionInProj4String)
Parameters¶
x
Double
The X of the coordinate.
y
Double
The Y of the coordinate.
projectionInProj4String
String
The Proj4String of the coordinate.
Returns¶
CloudTimeZoneResult
The time zone result.
GetTimeZoneByCoordinateAsync(Double, Double)¶
Get the time zone of a coodinate.
public Task<CloudTimeZoneResult> GetTimeZoneByCoordinateAsync(double latitude, double longitude)
Parameters¶
latitude
Double
The latitude of the coodinate.
longitude
Double
The longitude of the coodinate.
Returns¶
Task<CloudTimeZoneResult>
The time zone result.
GetTimeZoneByCoordinateAsync(Double, Double, Int32)¶
Get the time zone of a coodinate.
public Task<CloudTimeZoneResult> GetTimeZoneByCoordinateAsync(double x, double y, int projectionInSrid)
Parameters¶
x
Double
The X of the coordinate.
y
Double
The Y of the coordinate.
projectionInSrid
Int32
The Srid of the coordinate.
Returns¶
Task<CloudTimeZoneResult>
The time zone result.
GetTimeZoneByCoordinateAsync(Double, Double, String)¶
Get the time zone of a coodinate.
public Task<CloudTimeZoneResult> GetTimeZoneByCoordinateAsync(double x, double y, string projectionInProj4String)
Parameters¶
x
Double
The X of the coordinate.
y
Double
The Y of the coordinate.
projectionInProj4String
String
The Proj4String of the coordinate.
Returns¶
Task<CloudTimeZoneResult>
The time zone result.
GetAllTimeZoneNames()¶
Get the names of all the time zones.
public Collection<string> GetAllTimeZoneNames()
Returns¶
GetAllTimeZoneNamesAsync()¶
Get the names of all the time zones.
public Task<Collection<string>> GetAllTimeZoneNamesAsync()
Returns¶
GetAllTimeZones()¶
Get all the time zones.
public Collection<CloudTimeZoneResult> GetAllTimeZones()
Returns¶
Collection<CloudTimeZoneResult>
GetAllTimeZonesAsync()¶
Get all the time zones.
public Task<Collection<CloudTimeZoneResult>> GetAllTimeZonesAsync()
Returns¶
Task<Collection<CloudTimeZoneResult>>
Events¶
GettingAccessToken¶
Occurs before getting an AccessToken.
public event EventHandler<GettingAccessTokenEventArgs> GettingAccessToken;
SendingWebRequest¶
Occurs before sending a web request.
public event EventHandler<SendingWebRequestEventArgs> SendingWebRequest;
SentWebRequest¶
Occurs after the response of a web request is gotten.
public event EventHandler<SentWebRequestEventArgs> SentWebRequest;