<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Build.Evaluation;

namespace MSBuildSdkDiffer
{
    /// <summary>
    /// Interface used to Mock access to MSBuild's Project apis.
    /// </summary>
    public interface IProject
    {
        ICollection<ProjectProperty> Properties { get; }

        ICollection<IProjectItem> Items { get; }

        IProjectProperty GetProperty(string name);

        string GetPropertyValue(string name);
    }

    public interface IProjectProperty
    {
        string Name { get; }
        string EvaluatedValue { get; }
    }

    public interface IProjectItem
    {
        string ItemType { get; }
        string EvaluatedInclude { get; }
    }

    internal class MSBuildProjectProperty : IProjectProperty
    {
        private readonly ProjectProperty _property;

        public MSBuildProjectProperty(ProjectProperty property)
        {
            _property = property;
        }

        public string Name => _property.Name;

        public string EvaluatedValue => _property.EvaluatedValue;
    }

    internal class MSBuildProjectItem : IProjectItem
    {
        private readonly ProjectItem _item;

        public MSBuildProjectItem(ProjectItem item)
        {
            _item = item;
        }

        public string ItemType => _item.ItemType;

        public string EvaluatedInclude => _item.EvaluatedInclude;
    }

    internal class MSBuildProject : IProject
    {
        private readonly Project _project;

        public MSBuildProject(Project project) => _project = project ?? throw new ArgumentNullException(nameof(project));

        public ICollection<ProjectProperty> Properties => _project.Properties;

        public ICollection<IProjectItem> Items => _project.Items.Select(i => new MSBuildProjectItem(i)).ToArray();

        public IProjectProperty GetProperty(string name) => new MSBuildProjectProperty(_project.GetProperty(name));

        public string GetPropertyValue(string name) => _project.GetPropertyValue(name);
    }
}
<commit_msg>Fix the type returned by project.Properties.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Build.Evaluation;

namespace MSBuildSdkDiffer
{
    /// <summary>
    /// Interface used to Mock access to MSBuild's Project apis.
    /// </summary>
    public interface IProject
    {
        ICollection<IProjectProperty> Properties { get; }

        ICollection<IProjectItem> Items { get; }

        IProjectProperty GetProperty(string name);

        string GetPropertyValue(string name);
    }

    public interface IProjectProperty
    {
        string Name { get; }
        string EvaluatedValue { get; }
    }

    public interface IProjectItem
    {
        string ItemType { get; }
        string EvaluatedInclude { get; }
    }

    internal class MSBuildProjectProperty : IProjectProperty
    {
        private readonly ProjectProperty _property;

        public MSBuildProjectProperty(ProjectProperty property)
        {
            _property = property;
        }

        public string Name => _property.Name;

        public string EvaluatedValue => _property.EvaluatedValue;
    }

    internal class MSBuildProjectItem : IProjectItem
    {
        private readonly ProjectItem _item;

        public MSBuildProjectItem(ProjectItem item)
        {
            _item = item;
        }

        public string ItemType => _item.ItemType;

        public string EvaluatedInclude => _item.EvaluatedInclude;
    }

    internal class MSBuildProject : IProject
    {
        private readonly Project _project;

        public MSBuildProject(Project project) => _project = project ?? throw new ArgumentNullException(nameof(project));

        public ICollection<IProjectProperty> Properties => _project.Properties.Select(p => new MSBuildProjectProperty(p)).ToArray();

        public ICollection<IProjectItem> Items => _project.Items.Select(i => new MSBuildProjectItem(i)).ToArray();

        public IProjectProperty GetProperty(string name) => new MSBuildProjectProperty(_project.GetProperty(name));

        public string GetPropertyValue(string name) => _project.GetPropertyValue(name);
    }
}

{'fraction_non_alphanumeric': 0.07739791073124407, 'fraction_numerical': 0.0, 'mean_word_length': 2.8195829555757026, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 36, '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': '915714', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1036, 'n_words': 273}