<commit_before>﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="DemandPermissionAttribute.cs" company="Kephas Software SRL">
//   Copyright (c) Kephas Software SRL. All rights reserved.
//   Licensed under the MIT license. See LICENSE file in the project root for full license information.
// </copyright>
// <summary>
//   Implements the demand permission attribute class.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Kephas.Security.Authorization
{
    using System;

    using Kephas.Diagnostics.Contracts;

    /// <summary>
    /// Attribute indicating the required permission to access/execute/use the decorated element.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
    public class RequiresPermissionAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="RequiresPermissionAttribute"/> class.
        /// </summary>
        /// <param name="permissions">A variable-length parameters list containing the required permissions.</param>
        public RequiresPermissionAttribute(params string[] permissions)
        {
            Requires.NotNullOrEmpty(permissions, nameof(permissions));

            this.Permissions = permissions;
        }

        /// <summary>
        /// Gets the required permissions.
        /// </summary>
        /// <value>
        /// The required permissions.
        /// </value>
        public string[] Permissions { get; }
    }
}<commit_msg>Fix comments<commit_after>﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="RequiresPermissionAttribute.cs" company="Kephas Software SRL">
//   Copyright (c) Kephas Software SRL. All rights reserved.
//   Licensed under the MIT license. See LICENSE file in the project root for full license information.
// </copyright>
// <summary>
//   Implements the requires permission attribute class.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Kephas.Security.Authorization
{
    using System;

    using Kephas.Diagnostics.Contracts;

    /// <summary>
    /// Attribute indicating the required permission to access/execute/use the decorated element.
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Property, AllowMultiple = true, Inherited = false)]
    public class RequiresPermissionAttribute : Attribute
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="RequiresPermissionAttribute"/> class.
        /// </summary>
        /// <param name="permissions">A variable-length parameters list containing the required permissions.</param>
        public RequiresPermissionAttribute(params string[] permissions)
        {
            Requires.NotNullOrEmpty(permissions, nameof(permissions));

            this.Permissions = permissions;
        }

        /// <summary>
        /// Gets the required permissions.
        /// </summary>
        /// <value>
        /// The required permissions.
        /// </value>
        public string[] Permissions { get; }
    }
}
{'fraction_non_alphanumeric': 0.23185078909612625, 'fraction_numerical': 0.0, 'mean_word_length': 1.6774193548387097, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, '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': '419287', 'n_tokens_mistral': 738, 'n_tokens_neox': 736, 'n_words': 223}