<commit_before>using System;
using System.ComponentModel.Composition;
using System.Linq;
using System.Reflection;
using System.Windows;
using GitHub.VisualStudio;

namespace GitHub.Exports
{
    /// <summary>
    /// Defines the types of global visual studio menus available.
    /// </summary>
    public enum MenuType
    {
        GitHubPane,
        OpenPullRequests
    }

    /// <summary>
    /// Defines the type of repository link to navigate to
    /// </summary>
    public enum LinkType
    {
        Blob,
        Blame
    }

    /// <summary>
    /// A MEF export attribute that defines an export of type <see cref="FrameworkElement"/> with
    /// <see cref="ViewModelType"/> metadata.
    /// </summary>
    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public sealed class ExportViewForAttribute : ExportAttribute
    {
        public ExportViewForAttribute(Type viewModelType)
            : base(typeof(FrameworkElement))
        {
            ViewModelType = viewModelType;
        }

        public Type ViewModelType { get; }
    }

    /// <summary>
    /// A MEF export attribute that defines an export of type <see cref="IMenuHandler"/> with
    /// <see cref="MenuType"/> metadata.
    /// </summary>
    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public sealed class ExportMenuAttribute : ExportAttribute
    {
        public ExportMenuAttribute() : base(typeof(IMenuHandler))
        {
        }

        public MenuType MenuType { get; set; }
    }

    /// <summary>
    /// Defines a MEF metadata view that matches <see cref="ExportViewModelForAttribute"/> and
    /// <see cref="ExportViewForAttribute"/>.
    /// </summary>
    /// <remarks>
    /// For more information see the Metadata and Metadata views section at
    /// https://msdn.microsoft.com/en-us/library/ee155691(v=vs.110).aspx#Anchor_3
    /// </remarks>
    public interface IViewModelMetadata
    {
        Type[] ViewModelType { get; }
    }

    /// <summary>
    /// Defines a MEF metadata view that matches <see cref="ExportMenuAttribute"/>.
    /// </summary>
    /// <remarks>
    /// For more information see the Metadata and Metadata views section at
    /// https://msdn.microsoft.com/en-us/library/ee155691(v=vs.110).aspx#Anchor_3
    /// </remarks>
    public interface IMenuMetadata
    {
        MenuType MenuType { get; }<commit_msg>Supress CA error.`<commit_after>using System;
using System.ComponentModel.Composition;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using System.Windows;
using GitHub.VisualStudio;

namespace GitHub.Exports
{
    /// <summary>
    /// Defines the types of global visual studio menus available.
    /// </summary>
    public enum MenuType
    {
        GitHubPane,
        OpenPullRequests
    }

    /// <summary>
    /// Defines the type of repository link to navigate to
    /// </summary>
    public enum LinkType
    {
        Blob,
        Blame
    }

    /// <summary>
    /// A MEF export attribute that defines an export of type <see cref="FrameworkElement"/> with
    /// <see cref="ViewModelType"/> metadata.
    /// </summary>
    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public sealed class ExportViewForAttribute : ExportAttribute
    {
        public ExportViewForAttribute(Type viewModelType)
            : base(typeof(FrameworkElement))
        {
            ViewModelType = viewModelType;
        }

        public Type ViewModelType { get; }
    }

    /// <summary>
    /// A MEF export attribute that defines an export of type <see cref="IMenuHandler"/> with
    /// <see cref="MenuType"/> metadata.
    /// </summary>
    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public sealed class ExportMenuAttribute : ExportAttribute
    {
        public ExportMenuAttribute() : base(typeof(IMenuHandler))
        {
        }

        public MenuType MenuType { get; set; }
    }

    /// <summary>
    /// Defines a MEF metadata view that matches <see cref="ExportViewModelForAttribute"/> and
    /// <see cref="ExportViewForAttribute"/>.
    /// </summary>
    /// <remarks>
    /// For more information see the Metadata and Metadata views section at
    /// https://msdn.microsoft.com/en-us/library/ee155691(v=vs.110).aspx#Anchor_3
    /// </remarks>
    public interface IViewModelMetadata
    {
        [SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
        Type[] ViewModelType { get; }
    }

    /// <summary>
    /// Defines a MEF metadata view that matches <see cref="ExportMenuAttribute"/>.
    /// </summary>
    /// <remarks>
    /// For more information see the Metadata and Metadata views section at
    /// https://msdn.microsoft.com/en-us/library/ee155691(v=vs.110).aspx#Anchor_3
    /// </remarks>
    public interface IMenuMetadata
    {
        MenuType MenuType { get; }
{'fraction_non_alphanumeric': 0.11839744867450668, 'fraction_numerical': 0.00877018138329679, 'mean_word_length': 2.4299384825700616, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, 'https://': 4, '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': '4143210', 'n_tokens_mistral': 1421, 'n_tokens_neox': 1356, 'n_words': 372}