public StatsDMetricsClient(StatsDMetricsClientOptions options)
        {
            _options  = options;
            _logger   = options.LoggerFactory?.CreateLogger <StatsDMetricsClient>() ?? NullLogger <StatsDMetricsClient> .Instance;
            _endPoint = GetIPEndPointFromHostName(options.ServerName, options.Port, false);

            if (!String.IsNullOrEmpty(options.Prefix))
            {
                options.Prefix = options.Prefix.EndsWith(".") ? options.Prefix : String.Concat(options.Prefix, ".");
            }
        }
示例#2
0
        public StatsDMetricsClient(StatsDMetricsClientOptions options)
        {
            _options  = options;
            _logger   = options.LoggerFactory?.CreateLogger <StatsDMetricsClient>() ?? NullLogger <StatsDMetricsClient> .Instance;
            _endPoint = new IPEndPoint(IPAddress.Parse(options.ServerName), options.Port);

            if (!String.IsNullOrEmpty(options.Prefix))
            {
                options.Prefix = options.Prefix.EndsWith(".") ? options.Prefix : String.Concat(options.Prefix, ".");
            }
        }