<commit_before>﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;

namespace Microsoft.CodeAnalysis.Host
{
    // TODO(cyrusn): Make public.  Tracked through https://github.com/dotnet/roslyn/issues/62914
    internal sealed class HostProjectServices
    {
        private readonly HostLanguageServices _services;

        public SolutionServices SolutionServices => _services.WorkspaceServices.SolutionServices;

        // This ensures a single instance of this type associated with each HostLanguageServices.
        [Obsolete("Do not call directly.  Use HostLanguageServices.ProjectServices to acquire an instance")]
        internal HostProjectServices(HostLanguageServices services)
        {
            _services = services;
        }

        /// <inheritdoc cref="HostLanguageServices.Language"/>
        public string Language
            => _services.Language;

        /// <inheritdoc cref="HostLanguageServices.GetService"/>
        public TLanguageService? GetService<TLanguageService>() where TLanguageService : ILanguageService
            => _services.GetService<TLanguageService>();

        /// <inheritdoc cref="HostLanguageServices.GetRequiredService"/>
        public TLanguageService GetRequiredService<TLanguageService>() where TLanguageService : ILanguageService
            => _services.GetRequiredService<TLanguageService>();
    }
}
<commit_msg>Add docs<commit_after>﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;

namespace Microsoft.CodeAnalysis.Host
{
    /// <summary>
    /// Per language services provided by the host environment.
    /// </summary>
    internal sealed class HostProjectServices
    {
        private readonly HostLanguageServices _services;

        public SolutionServices SolutionServices => _services.WorkspaceServices.SolutionServices;

        // This ensures a single instance of this type associated with each HostLanguageServices.
        [Obsolete("Do not call directly.  Use HostLanguageServices.ProjectServices to acquire an instance")]
        internal HostProjectServices(HostLanguageServices services)
        {
            _services = services;
        }

        /// <inheritdoc cref="HostLanguageServices.Language"/>
        public string Language
            => _services.Language;

        /// <inheritdoc cref="HostLanguageServices.GetService"/>
        public TLanguageService? GetService<TLanguageService>() where TLanguageService : ILanguageService
            => _services.GetService<TLanguageService>();

        /// <inheritdoc cref="HostLanguageServices.GetRequiredService"/>
        public TLanguageService GetRequiredService<TLanguageService>() where TLanguageService : ILanguageService
            => _services.GetRequiredService<TLanguageService>();
    }
}

{'fraction_non_alphanumeric': 0.07822135670236936, 'fraction_numerical': 0.0016228497241155468, 'mean_word_length': 3.2805555555555554, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 27, 'https://': 1, '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': '2561313', 'n_tokens_mistral': 690, 'n_tokens_neox': 676, 'n_words': 219}