<commit_before>﻿// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using NATS.Client;
using NATS.Client.JetStream;

// ReSharper disable once CheckNamespace
namespace DotNetCore.CAP
{
    /// <summary>
    /// Provides programmatic configuration for the CAP NATS project.
    /// </summary>
    public class NATSOptions
    {
        /// <summary>
        /// Gets or sets the server url/urls used to connect to the NATs server.
        /// </summary>
        /// <remarks>This may contain username/password information.</remarks>
        public string Servers { get; set; } = "nats://localhost:4222";

        /// <summary>
        /// connection pool size, default is 10
        /// </summary>
        public int ConnectionPoolSize { get; set; } = 10;

        /// <summary>
        /// Used to setup all NATs client options
        /// </summary>
        public Options Options { get; set; }

        public Action<StreamConfiguration.StreamConfigurationBuilder> StreamOptions { get; set; }
    }
}<commit_msg>Provide NormalizeStreamName as a configuration item in NatsOptions. #1047<commit_after>﻿// Copyright (c) .NET Core Community. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
using NATS.Client;
using NATS.Client.JetStream;

// ReSharper disable once CheckNamespace
namespace DotNetCore.CAP
{
    /// <summary>
    /// Provides programmatic configuration for the CAP NATS project.
    /// </summary>
    public class NATSOptions
    {
        /// <summary>
        /// Gets or sets the server url/urls used to connect to the NATs server.
        /// </summary>
        /// <remarks>This may contain username/password information.</remarks>
        public string Servers { get; set; } = "nats://localhost:4222";

        /// <summary>
        /// connection pool size, default is 10
        /// </summary>
        public int ConnectionPoolSize { get; set; } = 10;

        /// <summary>
        /// Used to setup all NATs client options
        /// </summary>
        public Options Options { get; set; }

        public Action<StreamConfiguration.StreamConfigurationBuilder> StreamOptions { get; set; }

        public Func<string, string> NormalizeStreamName { get; set; } = origin => origin.Split('.')[0];
    }
}
{'fraction_non_alphanumeric': 0.11403869905310828, 'fraction_numerical': 0.008645533141210375, 'mean_word_length': 2.3703190013869624, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4658170', 'n_tokens_mistral': 654, 'n_tokens_neox': 631, 'n_words': 230}