Exemplo n.º 1
0
        public SnowflakeClientSettings(AuthInfo authInfo, SessionInfo sessionInfo = null, UrlInfo urlInfo = null, JsonSerializerOptions jsonMapperOptions = null)
        {
            AuthInfo          = authInfo ?? new AuthInfo();
            SessionInfo       = sessionInfo ?? new SessionInfo();
            UrlInfo           = urlInfo ?? new UrlInfo();
            JsonMapperOptions = jsonMapperOptions ?? new JsonSerializerOptions()
            {
                PropertyNameCaseInsensitive = true
            };

            UrlInfo.Host = authInfo.GetHostName();
        }
Exemplo n.º 2
0
        public SnowflakeClientSettings(AuthInfo authInfo, SessionInfo sessionInfo = null, UrlInfo urlInfo = null, JsonSerializerOptions jsonMapperOptions = null)
        {
            AuthInfo          = authInfo ?? new AuthInfo();
            SessionInfo       = sessionInfo ?? new SessionInfo();
            UrlInfo           = urlInfo ?? new UrlInfo();
            JsonMapperOptions = jsonMapperOptions ?? new JsonSerializerOptions()
            {
                PropertyNameCaseInsensitive = true
            };

            if (string.IsNullOrEmpty(UrlInfo.Host))
            {
                UrlInfo.Host = BuildHostName(AuthInfo.Account, AuthInfo.Region);
            }
            else
            {
                UrlInfo.Host = ReplaceUnderscores(UrlInfo.Host);
            }
        }