public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            string Temp = reader.Value.ToString();

            short Value = short.Parse(Temp);

            return(TimeZoneKey.GetTimeZoneKey(Value));
        }
Exemple #2
0
 /// <summary>
 /// Creates a new client options set with default values.
 /// </summary>
 public PrestoClientSessionConfig()
 {
     this.Host                 = _DEFAULT_HOST;
     this.Port                 = _DEFAULT_PORT;
     this.User                 = Environment.GetEnvironmentVariable("USERNAME") ?? Environment.GetEnvironmentVariable("USER");
     this.CheckInterval        = _QUERY_STATE_CHECK_INTERVAL;
     this.IgnoreSslErrors      = false;
     this.UseSsl               = false;
     this.Version              = PrestoApiVersion.V1;
     this.ClientTags           = new HashSet <string>();
     this.Debug                = false;
     this.Properties           = new Dictionary <string, string>();
     this.PreparedStatements   = new Dictionary <string, string>();
     this.TimeZone             = TimeZoneKey.GetTimeZoneKey(0);
     this.Locale               = CultureInfo.CurrentCulture;
     this.ClientRequestTimeout = _DEFAULT_TIMEOUT;
 }