<commit_before>﻿using System;
using OpenIIoT.SDK.Common;
using OpenIIoT.SDK.Package;
using OpenIIoT.SDK.Packaging.Manifest;

namespace OpenIIoT.Core.Package
{
    public class Package : PackageManifest, IPackage
    {
        #region Public Constructors

        public Package(string fileName, DateTime modifiedOn, PackageManifest manifest)
        {
            this.MapFrom(manifest);

            FileName = fileName;
            ModifiedOn = modifiedOn;
        }

        #endregion Public Constructors

        #region Public Properties

        public string FileName { get; }

        public string FQN => Namespace + "." + Title;

        public bool IsSigned => Signature?.Digest != default(string);

        public bool IsTrusted => Signature?.Trust != default(string);

        public DateTime ModifiedOn { get; }

        #endregion Public Properties
    }
}<commit_msg>Added documentation to Package.<commit_after>﻿/*
      █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀  ▀  ▀      ▀▀
      █
      █      ▄███████▄
      █     ███    ███
      █     ███    ███   ▄█████   ▄██████    █  █▄     ▄█████     ▄████▄     ▄█████
      █     ███    ███   ██   ██ ██    ██   ██ ▄██▀    ██   ██   ██    ▀    ██   █
      █   ▀█████████▀    ██   ██ ██    ▀    ██▐█▀      ██   ██  ▄██        ▄██▄▄
      █     ███        ▀████████ ██    ▄  ▀▀████     ▀████████ ▀▀██ ███▄  ▀▀██▀▀
      █     ███          ██   ██ ██    ██   ██ ▀██▄    ██   ██   ██    ██   ██   █
      █    ▄████▀        ██   █▀ ██████▀    ▀█   ▀█▀   ██   █▀   ██████▀    ███████
      █
 ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄  ▄▄ ▄▄   ▄▄▄▄ ▄▄     ▄▄     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄
 █████████████████████████████████████████████████████████████ ███████████████ ██  ██ ██   ████ ██     ██     ████████████████ █ █
      ▄
      █  Represents an installable extension archive.
      █
      █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀     ▀▀               ▀
      █  The GNU Affero General Public License (GNU AGPL)
      █
      █  Copyright (C) 2016-2017 <NAME> (<EMAIL>)
      █
      █  This program is free software: you can redistribute it and/or modify
      █  it under the terms of the GNU Affero General Public License as published by
      █  the Free Software Foundation, either version 3 of the License, or
      █  (at your option) any later version.
      █
      █  This program is distributed in the hope that it will be useful,
      █  but WITHOUT ANY WARRANTY; without even the implied warranty of
      █  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      █  GNU Affero General Public License for more details.
      █
      █  You should have received a copy of the GNU Affero General Public License
      █  along with this program.  If not, see <http://www.gnu.org/licenses/>.
      █
      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
                                                                                                   ██
                                                                                               ▀█▄ ██ ▄█▀
                                                                                                 ▀████▀
                                                                                                   ▀▀                            */

using System;
using OpenIIoT.SDK.Common;
using OpenIIoT.SDK.Package;
using OpenIIoT.SDK.Packaging.Manifest;

namespace OpenIIoT.Core.Package
{
    /// <summary>
    ///     Represents an installable extension archive.
    /// </summary>
    public class Package : PackageManifest, IPackage
    {
        #region Public Constructors

        /// <summary>
        ///     Initializes a new instance of the <see cref="Package"/> class.
        /// </summary>
        /// <param name="fileName">The fully qualified filename of the archive file.</param>
        /// <param name="modifiedOn">The time at which the archive was last modified, according to the host filesystem.</param>
        /// <param name="manifest">The manifest contained within the archive.</param>
        public Package(string fileName, DateTime modifiedOn, PackageManifest manifest)
        {
            this.MapFrom(manifest);

            FileName = fileName;
            ModifiedOn = modifiedOn;
        }

        #endregion Public Constructors

        #region Public Properties

        /// <summary>
        ///     Gets the fully qualified filename of the archive file.
        /// </summary>
        public string FileName { get; }

        /// <summary>
        ///     Gets the Fully Qualified Name of the Package.
        /// </summary>
        public string FQN => Namespace + "." + Title;

        /// <summary>
        ///     Gets a value indicating whether the Package is signed.
        /// </summary>
        public bool IsSigned => Signature?.Digest != default(string);

        /// <summary>
        ///     Gets a value indicating whether the Package is trusted.
        /// </summary>
        public bool IsTrusted => Signature?.Trust != default(string);

        /// <summary>
        ///     Gets the time at which the archive was last modified, according to the host filesystem.
        /// </summary>
        public DateTime ModifiedOn { get; }

        #endregion Public Properties
    }
}
{'fraction_non_alphanumeric': 0.20121167615201027, 'fraction_numerical': 0.001652285661832201, 'mean_word_length': 1.6230139624458353, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4540120', 'n_tokens_mistral': 1885, 'n_tokens_neox': 2118, 'n_words': 498}