Пример #1
0
        public async Task GetTimezoneWindowsToIANA()
        {
            var am  = new AzureMapsToolkit.AzureMapsServices(_KEY);
            var req = new TimezoneWindowsToIANARequest
            {
                Query = "pacific standard time"
            };
            var r = await am.GetTimezoneWindowsToIANA(req);

            Assert.Null(r.Error);

            Assert.NotNull(r.Result);
        }
Пример #2
0
        public void GetTimezoneWindowsToIANA()
        {
            var am  = new AzureMapsToolkit.AzureMapsServices(_KEY);
            var req = new TimezoneWindowsToIANARequest
            {
                Query = "pacific standard time"
            };
            var r = am.GetTimezoneWindowsToIANA(req).Result;

            Assert.Null(r.Error);

            Assert.Equal(6, r.Result.Count());
        }
Пример #3
0
        /// <summary>
        /// This API returns a corresponding IANA ID, given a valid Windows Time Zone ID. Multiple IANA IDs may be returned for a single Windows ID. It is possible to narrow these results by adding an optional territory parameter.
        /// </summary>
        /// <param name="req"></param>
        /// <returns></returns>
        public virtual async Task <Response <IEnumerable <IanaId> > > GetTimezoneWindowsToIANA(TimezoneWindowsToIANARequest req)
        {
            var res = await ExecuteRequest <IEnumerable <IanaId>, TimezoneWindowsToIANARequest>
                          ("https://atlas.microsoft.com/timezone/windowsToIana/json", req);

            return(res);
        }