Added additional overloads to IPackageManager

--- OpenIIoT.SDK/Packaging/IPackageManager.cs
+++ OpenIIoT.SDK/Packaging/IPackageManager.cs
@@ -41,20 +41,55 @@

 namespace OpenIIoT.SDK.Packaging
 {
+    using System;
     using System.Collections.Generic;
     using System.Threading.Tasks;
     using OpenIIoT.SDK.Common;
     using OpenIIoT.SDK.Common.OperationResult;
+    using OpenIIoT.SDK.Common.Provider.EventProvider;

     /// <summary>
     ///     Handles the installation and file management of the Pacakges used to extend the functionality of the application.
     /// </summary>
     public interface IPackageManager : IManager
     {
+        #region Public Events
+
+        /// <summary>
+        ///     Occurs when a <see cref="IPackage"/> is added.
+        /// </summary>
+        [Event(Description = "Occurs when a Package is added.")]
+        event EventHandler<PackageEventArgs> PackageAdded;
+
+        /// <summary>
+        ///     Occurs when a <see cref="IPackage"/> is deleted.
+        /// </summary>
+        [Event(Description = "Occurs when a Package is deleted.")]
+        event EventHandler<PackageEventArgs> PackageDeleted;
+
+        /// <summary>
+        ///     Occurs when a <see cref="IPackage"/> is installed.
+        /// </summary>
+        [Event(Description = "Occurs when a Package is installed.")]
+        event EventHandler<PackageInstallEventArgs> PackageInstalled;
+
+        /// <summary>
+        ///     Occurs when a <see cref="IPackage"/> is uninstalled.
+        /// </summary>
+        [Event(Description = "Occurs when a Package is uninstalled.")]
+        event EventHandler<PackageInstallEventArgs> PackageUninstalled;
+
+        #endregion Public Events
+
         #region Public Properties

         /// <summary>
-        ///     Gets the list of Packages available for installation.
+        ///     Gets the list of <see cref="IPackageArchive"/> files available for installation.
+        /// </summary>
+        IReadOnlyList<IPackageArchive> PackageArchives { get; }
+
+        /// <summary>
+        ///     Gets the list of installed <see cref="IPackage"/> s.
         /// </summary>
         IReadOnlyList<IPackage> Packages { get; }

@@ -63,155 +98,340 @@
         #region Public Methods

         /// <summary>
-        ///     Adds a <see cref="IPackage"/> file from the specified binary <paramref name="data"/>.
+        ///     Adds a <see cref="IPackageArchive"/> from the specified binary <paramref name="data"/>.
         /// </summary>
         /// <remarks>
-        ///     The resulting Package file is saved to the Packages directory with a filename composed of the Fully Qualified Name
-        ///     and Version of the Package.
+        ///     The resulting Package archive file is saved to the Packages directory with a filename composed of the Fully
+        ///     Qualified Name and Version of the Package.
         /// </remarks>
         /// <param name="data">The binary data to save.</param>
-        /// <returns>A Result containing the result of the operation and the created IPackage instance.</returns>
-        IResult<IPackage> AddPackage(byte[] data);
-
-        /// <summary>
-        ///     Asynchronously adds a <see cref="IPackage"/> file from the specified binary <paramref name="data"/>.
+        /// <returns>A Result containing the result of the operation and the created <see cref="IPackageArchive"/> instance.</returns>
+        IResult<IPackageArchive> AddPackageArchive(byte[] data);
+
+        /// <summary>
+        ///     Asynchronously adds a <see cref="IPackageArchive"/> from the specified binary <paramref name="data"/>.
         /// </summary>
         /// <remarks>
-        ///     The resulting Package file is saved to the Packages directory with a filename composed of the Fully Qualified Name
-        ///     and Version of the Package.
+        ///     The resulting Package archive file is saved to the Packages directory with a filename composed of the Fully
+        ///     Qualified Name and Version of the Package.
         /// </remarks>
         /// <param name="data">The binary data to save.</param>
-        /// <returns>A Result containing the result of the operation and the created IPackage instance.</returns>
-        Task<IResult<IPackage>> AddPackageAsync(byte[] data);
-
-        /// <summary>
-        ///     Deletes the <see cref="IPackage"/> matching the specified Fully Qualified Name from disk.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackage"/> to delete.</param>
-        /// <returns>A Result containing the result of the operation.</returns>
-        IResult DeletePackage(string fqn);
-
-        /// <summary>
-        ///     Asynchronously deletes the <see cref="IPackage"/> matching the specified Fully Qualified Name from disk.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackage"/> to delete.</param>
-        /// <returns>A Result containing the result of the operation.</returns>
-        Task<IResult> DeletePackageAsync(string fqn);
-
-        /// <summary>
-        ///     Fetches the <see cref="IPackage"/> file matching the specified Fully Qualified Name and returns the binary data.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackage"/> to fetch.</param>
-        /// <returns>A Result containing the result of the operation and the read binary data.</returns>
-        IResult<byte[]> FetchPackage(string fqn);
-
-        /// <summary>
-        ///     Asynchronously fetches the <see cref="IPackage"/> file matching the specified Fully Qualified Name and returns the
-        ///     binary data.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackage"/> to fetch.</param>
-        /// <returns>A Result containing the result of the operation and the read binary data.</returns>
-        Task<IResult<byte[]>> FetchPackageAsync(string fqn);
-
-        /// <summary>
-        ///     <para>
-        ///         Scans the <see cref="Packages"/> list for a Package matching the specified Fully Qualified Name and, if found,
-        ///         returns the found Package.
+        /// <returns>A Result containing the result of the operation and the created <see cref="IPackageArchive"/> instance.</returns>
+        Task<IResult<IPackageArchive>> AddPackageArchiveAsync(byte[] data);
+
+        /// <summary>
+        ///     Deletes the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/> from disk.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to delete.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        IResult DeletePackageArchive(string fqn);
+
+        /// <summary>
+        ///     Deletes the specified <see cref="IPackageArchive"/> from disk.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to delete.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        IResult DeletePackageArchive(IPackageArchive packageArchive);
+
+        /// <summary>
+        ///     Asynchronously deletes the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/> from disk.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to delete.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        Task<IResult> DeletePackageArchiveAsync(string fqn);
+
+        /// <summary>
+        ///     Asynchronously deletes the specified <see cref="IPackageArchive"/> from disk.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to delete.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        Task<IResult> DeletePackageArchiveAsync(IPackageArchive packageArchive);
+
+        /// <summary>
+        ///     Fetches the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/> and returns the binary data.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to fetch.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and the <see cref="byte"/> array containing the fetched data.
+        /// </returns>
+        IResult<byte[]> FetchPackageArchive(string fqn);
+
+        /// <summary>
+        ///     Fetches the specified <paramref name="packageArchive"/> and returns the binary data.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to fetch.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and the <see cref="byte"/> array containing the fetched data.
+        /// </returns>
+        IResult<byte[]> FetchPackageArchive(IPackageArchive packageArchive);
+
+        /// <summary>
+        ///     Asynchronously fetches the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/> and returns
+        ///     the binary data.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to fetch.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and the <see cref="byte"/> array containing the fetched data.
+        /// </returns>
+        Task<IResult<byte[]>> FetchPackageArchiveAsync(string fqn);
+
+        /// <summary>
+        ///     Asynchronously fetches the specified <paramref name="packageArchive"/> and returns the binary data.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to fetch.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and the <see cref="byte"/> array containing the fetched data.
+        /// </returns>
+        Task<IResult<byte[]>> FetchPackageArchiveAsync(IPackageArchive packageArchive);
+
+        /// <summary>
+        ///     <para>
+        ///         Searches the <see cref="Packages"/> list for a <see cref="IPackage"/> matching the specified
+        ///         <paramref name="fqn"/> and, if found, returns the found instance.
         ///     </para>
         ///     <para>
         ///         If a matching Package is not found, the <see cref="ScanPackages()"/> method is invoked to refresh the
         ///         <see cref="Packages"/> list from disk.
         ///     </para>
         /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to find.</param>
-        /// <returns>The found Package, if applicable.</returns>
-        IPackage FindPackage(string fqn);
-
-        /// <summary>
-        ///     <para>
-        ///         Asynchronously scans the <see cref="Packages"/> list for a Package matching the specified Fully Qualified Name
-        ///         and, if found, returns the found Package.
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackage"/> to find.</param>
+        /// <returns>The found <see cref="IPackage"/>.</returns>
+        IPackageArchive FindPackage(string fqn);
+
+        /// <summary>
+        ///     <para>
+        ///         Searches the <see cref="PackageArchives"/> list for a <see cref="IPackageArchive"/> matching the specified
+        ///         <paramref name="fqn"/> and, if found, returns the found instance.
+        ///     </para>
+        ///     <para>
+        ///         If a matching Package archive is not found, the <see cref="ScanPackageArchives()"/> method is invoked to
+        ///         refresh the <see cref="PackageArchives"/> list from disk.
+        ///     </para>
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to find.</param>
+        /// <returns>The found <see cref="IPackageArchive"/>.</returns>
+        IPackageArchive FindPackageArchive(string fqn);
+
+        /// <summary>
+        ///     <para>
+        ///         Asynchronously searches the <see cref="PackageArchives"/> list for a <see cref="IPackageArchive"/> matching the
+        ///         specified <paramref name="fqn"/> and, if found, returns the found instance.
+        ///     </para>
+        ///     <para>
+        ///         If a matching Package archive is not found, the <see cref="ScanPackageArchives()"/> method is invoked to
+        ///         refresh the <see cref="PackageArchives"/> list from disk.
+        ///     </para>
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to find.</param>
+        /// <returns>The found <see cref="IPackageArchive"/>.</returns>
+        Task<IPackageArchive> FindPackageArchiveAsync(string fqn);
+
+        /// <summary>
+        ///     <para>
+        ///         Asynchronously searches the <see cref="Packages"/> list for a <see cref="IPackage"/> matching the specified
+        ///         <paramref name="fqn"/> and, if found, returns the found instance.
         ///     </para>
         ///     <para>
         ///         If a matching Package is not found, the <see cref="ScanPackages()"/> method is invoked to refresh the
         ///         <see cref="Packages"/> list from disk.
         ///     </para>
         /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to find.</param>
-        /// <returns>The found Package, if applicable.</returns>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackage"/> to find.</param>
+        /// <returns>The found <see cref="IPackage"/>.</returns>
         Task<IPackage> FindPackageAsync(string fqn);

         /// <summary>
-        ///     Installs the specified <see cref="IPackage"/> (extracts it to disk).
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to install.</param>
+        ///     Installs the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to install.</param>
         /// <returns>A Result containing the result of the operation.</returns>
         IResult InstallPackage(string fqn);

         /// <summary>
-        ///     Installs the specified <see cref="IPackage"/> (extracts it to disk) using the specified options.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to install.</param>
-        /// <param name="options">The installation options for the operation.</param>
+        ///     Installs the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/> with the specified <paramref name="options"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to install.</param>
+        /// <param name="options">The <see cref="PackageInstallationOptions"/> for the installation.</param>
         /// <returns>A Result containing the result of the operation.</returns>
         IResult InstallPackage(string fqn, PackageInstallationOptions options);

         /// <summary>
-        ///     Asynchronously installs the specified <see cref="IPackage"/> (extracts it to disk).
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to install.</param>
+        ///     Installs the specified <paramref name="packageArchive"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to install.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        IResult InstallPackage(IPackageArchive packageArchive);
+
+        /// <summary>
+        ///     Installs the specified <paramref name="packageArchive"/> with the specified <paramref name="options"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to install.</param>
+        /// <param name="options">The <see cref="PackageInstallationOptions"/> for the installation.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        IResult InstallPackage(IPackageArchive packageArchive, PackageInstallationOptions options);
+
+        /// <summary>
+        ///     Asynchronously installs the specified <paramref name="packageArchive"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to install.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        Task<IResult> InstallPackageAsync(IPackageArchive packageArchive);
+
+        /// <summary>
+        ///     Asynchronously installs the specified <paramref name="packageArchive"/> with the specified <paramref name="options"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to install.</param>
+        /// <param name="options">The <see cref="PackageInstallationOptions"/> for the installation.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        Task<IResult> InstallPackageAsync(IPackageArchive packageArchive, PackageInstallationOptions options);
+
+        /// <summary>
+        ///     Asynchronously installs the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to install.</param>
         /// <returns>A Result containing the result of the operation.</returns>
         Task<IResult> InstallPackageAsync(string fqn);

         /// <summary>
-        ///     Asynchronously installs the specified <see cref="IPackage"/> (extracts it to disk) using the specified options.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to install.</param>
-        /// <param name="options">The installation options for the operation.</param>
+        ///     Asynchronously installs the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to install.</param>
+        /// <param name="options">The options for the installation.</param>
         /// <returns>A Result containing the result of the operation.</returns>
         Task<IResult> InstallPackageAsync(string fqn, PackageInstallationOptions options);

         /// <summary>
-        ///     Scans for and returns a list of all Package files in the configured Packages directory.
-        /// </summary>
-        /// <returns>A Result containing the result of the operation and the list of found Packages.</returns>
+        ///     Scans for and returns a list of all Package archive files in the configured Packages directory.
+        /// </summary>
+        /// <returns>
+        ///     A Result containing the result of the operation and the list of found <see cref="IPackageArchive"/> s
+        /// </returns>
+        IResult<IList<IPackageArchive>> ScanPackageArchives();
+
+        /// <summary>
+        ///     Asynchronously scans for and returns a list of all Package archive files in the configured Packages directory.
+        /// </summary>
+        /// <returns>
+        ///     A Result containing the result of the operation and the list of found <see cref="IPackageArchive"/> s.
+        /// </returns>
+        Task<IResult<IList<IPackageArchive>>> ScanPackageArchivesAsync();
+
+        /// <summary>
+        ///     Scans for and returns a list of all installed Packages in the configured Packages directory.
+        /// </summary>
+        /// <returns>A Result containing the result of the operation and the list of found <see cref="IPackage"/> s.</returns>
         IResult<IList<IPackage>> ScanPackages();

         /// <summary>
-        ///     Asynchronously scans for and returns a list of all Package files in the configured Package directory.
-        /// </summary>
-        /// <returns>A Result containing the result of the operation and the list of found Packages.</returns>
+        ///     Asynchronously scans for and returns a list of all installed Packages in the configured Packages directory.
+        /// </summary>
+        /// <returns>A Result containing the result of the operation and the list of found <see cref="IPackage"/> s.</returns>
         Task<IResult<IList<IPackage>>> ScanPackagesAsync();

         /// <summary>
-        ///     Verifies the specified <see cref="IPackage"/>.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to verify.</param>
-        /// <returns>A Result containing the result of the operation and a value indicating whether the Package is valid.</returns>
-        IResult<bool> VerifyPackage(string fqn);
-
-        /// <summary>
-        ///     Verifies the specified <see cref="IPackage"/> using the optionally specified PGP Public Key.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to verify.</param>
-        /// <param name="publicKey">The optional PGP Public Key with which to verify the package.</param>
-        /// <returns>A Result containing the result of the operation and a value indicating whether the Package is valid.</returns>
-        IResult<bool> VerifyPackage(string fqn, string publicKey);
-
-        /// <summary>
-        ///     Asynchronously verifies the specified <see cref="IPackage"/>.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to verify.</param>
-        /// <returns>A Result containing the result of the operation and a value indicating whether the Package is valid.</returns>
-        Task<IResult<bool>> VerifyPackageAsync(string fqn);
-
-        /// <summary>
-        ///     Asynchronously verifies the specified <see cref="IPackage"/> using the optionally specified PGP Public Key.
-        /// </summary>
-        /// <param name="fqn">The Fully Qualified Name of the Package to verify.</param>
-        /// <param name="publicKey">The optional PGP Public Key with which to verify the package.</param>
-        /// <returns>A Result containing the result of the operation and a value indicating whether the Package is valid.</returns>
-        Task<IResult<bool>> VerifyPackageAsync(string fqn, string publicKey);
+        ///     Uninstalls the <see cref="IPackage"/> matching the specified <paramref name="fqn"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackage"/> to uninstall.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        IResult UninstallPackage(string fqn);
+
+        /// <summary>
+        ///     Uninstalls the specified <paramref name="package"/>.
+        /// </summary>
+        /// <param name="package">The <see cref="IPackage"/> to uninstall.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        IResult UninstallPackage(IPackage package);
+
+        /// <summary>
+        ///     Asynchronously uninstalls the specified <paramref name="package"/>.
+        /// </summary>
+        /// <param name="package">The <see cref="IPackage"/> to uninstall.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        Task<IResult> UninstallPackageAsync(IPackage package);
+
+        /// <summary>
+        ///     Asynchronously uninstalls the <see cref="IPackage"/> matching the specified <paramref name="fqn"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackage"/> to uninstall.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        Task<IResult> UninstallPackageAsync(string fqn);
+
+        /// <summary>
+        ///     Verifies the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/> using the specified <paramref name="publicKey"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to verify.</param>
+        /// <param name="publicKey">The PGP Public Key with which to verify the package.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and a value indicating whether the <see cref="IPackageArchive"/> is valid.
+        /// </returns>
+        IResult<bool> VerifyPackageArchive(string fqn, string publicKey);
+
+        /// <summary>
+        ///     Verifies the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to verify.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and a value indicating whether the <see cref="IPackageArchive"/> is valid.
+        /// </returns>
+        IResult<bool> VerifyPackageArchive(string fqn);
+
+        /// <summary>
+        ///     Verifies the specified <paramref name="packageArchive"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to verify.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and a value indicating whether the <see cref="IPackageArchive"/> is valid.
+        /// </returns>
+        IResult<bool> VerifyPackageArchive(IPackageArchive packageArchive);
+
+        /// <summary>
+        ///     Verifies the specified <paramref name="packageArchive"/> using the specified <paramref name="publicKey"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to verify.</param>
+        /// <param name="publicKey">The PGP Public Key with which to verify the package.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and a value indicating whether the <see cref="IPackageArchive"/> is valid.
+        /// </returns>
+        IResult<bool> VerifyPackageArchive(IPackageArchive packageArchive, string publicKey);
+
+        /// <summary>
+        ///     Asynchronously verifies the specified <paramref name="packageArchive"/> using the specified <paramref name="publicKey"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to verify.</param>
+        /// <param name="publicKey">The PGP Public Key with which to verify the package.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and a value indicating whether the <see cref="IPackageArchive"/> is valid.
+        /// </returns>
+        Task<IResult<bool>> VerifyPackageArchiveAsync(IPackageArchive packageArchive, string publicKey);
+
+        /// <summary>
+        ///     Asynchronously verifies the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/> using the
+        ///     specified <paramref name="publicKey"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to verify.</param>
+        /// <param name="publicKey">The PGP Public Key with which to verify the package.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and a value indicating whether the <see cref="IPackageArchive"/> is valid.
+        /// </returns>
+        Task<IResult<bool>> VerifyPackageArchiveAsync(string fqn, string publicKey);
+
+        /// <summary>
+        ///     Asynchronously verifies the <see cref="IPackageArchive"/> matching the specified <paramref name="fqn"/>.
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to verify.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and a value indicating whether the <see cref="IPackageArchive"/> is valid.
+        /// </returns>
+        Task<IResult<bool>> VerifyPackageArchiveAsync(string fqn);
+
+        /// <summary>
+        ///     Asynchronously verifies the specified <paramref name="packageArchive"/>.
+        /// </summary>
+        /// <param name="packageArchive">The <see cref="IPackageArchive"/> to verify.</param>
+        /// <returns>
+        ///     A Result containing the result of the operation and a value indicating whether the <see cref="IPackageArchive"/> is valid.
+        /// </returns>
+        Task<IResult<bool>> VerifyPackageArchiveAsync(IPackageArchive packageArchive);

         #endregion Public Methods
     }


catch exceptions in OnTimerTick

catch exceptions in OnTimerTick

--- PalasoUIWindowsForms/Keyboarding/IBusAdaptor.cs
+++ PalasoUIWindowsForms/Keyboarding/IBusAdaptor.cs
@@ -151,10 +151,17 @@

 		private static void OnTimerTick(object sender, EventArgs e)
 		{
-			_timer.Stop();
-			var ibus = new InputBusWrapper(_connection);
-			var inputContextBus = TryGetFocusedInputContext(ibus);
-			inputContextBus.InputContext.SetEngine(_requestActivateName);
+			try
+			{
+				_timer.Stop();
+				var ibus = new InputBusWrapper(_connection);
+				var inputContextBus = TryGetFocusedInputContext(ibus);
+				inputContextBus.InputContext.SetEngine(_requestActivateName);
+			}
+			catch (Exception x)
+			{
+				Console.WriteLine ("OnTimerTick Exception: {0}", x.Message);
+			}
 		}

 		/// <summary>


Uncommented FindPackage and FindPackageAsync from IPackageManager

--- OpenIIoT.SDK/Packaging/IPackageManager.cs
+++ OpenIIoT.SDK/Packaging/IPackageManager.cs
@@ -198,33 +198,33 @@
         ///// <returns>The found <see cref="IPackage"/>.</returns>
         //IPackageArchive FindPackage(string fqn);

-        ///// <summary>
-        /////     <para>
-        /////         Searches the <see cref="PackageArchives"/> list for a <see cref="IPackageArchive"/> matching the specified
-        /////         <paramref name="fqn"/> and, if found, returns the found instance.
-        /////     </para>
-        /////     <para>
-        /////         If a matching Package archive is not found, the <see cref="ScanPackageArchives()"/> method is invoked to
-        /////         refresh the <see cref="PackageArchives"/> list from disk.
-        /////     </para>
-        ///// </summary>
-        ///// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to find.</param>
-        ///// <returns>The found <see cref="IPackageArchive"/>.</returns>
-        //IPackageArchive FindPackageArchive(string fqn);
-
-        ///// <summary>
-        /////     <para>
-        /////         Asynchronously searches the <see cref="PackageArchives"/> list for a <see cref="IPackageArchive"/> matching the
-        /////         specified <paramref name="fqn"/> and, if found, returns the found instance.
-        /////     </para>
-        /////     <para>
-        /////         If a matching Package archive is not found, the <see cref="ScanPackageArchives()"/> method is invoked to
-        /////         refresh the <see cref="PackageArchives"/> list from disk.
-        /////     </para>
-        ///// </summary>
-        ///// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to find.</param>
-        ///// <returns>The found <see cref="IPackageArchive"/>.</returns>
-        //Task<IPackageArchive> FindPackageArchiveAsync(string fqn);
+        /// <summary>
+        ///     <para>
+        ///         Searches the <see cref="PackageArchives"/> list for a <see cref="IPackageArchive"/> matching the specified
+        ///         <paramref name="fqn"/> and, if found, returns the found instance.
+        ///     </para>
+        ///     <para>
+        ///         If a matching Package archive is not found, the <see cref="ScanPackageArchives()"/> method is invoked to
+        ///         refresh the <see cref="PackageArchives"/> list from disk.
+        ///     </para>
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to find.</param>
+        /// <returns>The found <see cref="IPackageArchive"/>.</returns>
+        IPackageArchive FindPackageArchive(string fqn);
+
+        /// <summary>
+        ///     <para>
+        ///         Asynchronously searches the <see cref="PackageArchives"/> list for a <see cref="IPackageArchive"/> matching the
+        ///         specified <paramref name="fqn"/> and, if found, returns the found instance.
+        ///     </para>
+        ///     <para>
+        ///         If a matching Package archive is not found, the <see cref="ScanPackageArchives()"/> method is invoked to
+        ///         refresh the <see cref="PackageArchives"/> list from disk.
+        ///     </para>
+        /// </summary>
+        /// <param name="fqn">The Fully Qualified Name of the <see cref="IPackageArchive"/> to find.</param>
+        /// <returns>The found <see cref="IPackageArchive"/>.</returns>
+        Task<IPackageArchive> FindPackageArchiveAsync(string fqn);

         ///// <summary>
         /////     <para>


Fix: method update of user by Admin

Fix: method update of user by Admin

--- PhoneBook.Core/Controllers/AccountController.cs
+++ PhoneBook.Core/Controllers/AccountController.cs
@@ -107,6 +107,7 @@
             var users = UserManager.FindByFirstName(searchData);
             var viewsUser = users.Select(user=> new
             {
+                Email = user.Email,
                 FirstName = user.FirstName,
                 MiddleName = user.MiddleName,
                 LastName = user.LastName,
@@ -129,37 +130,8 @@
         {
             if (!ModelState.IsValid) return BadRequest("Wrong model");
             var user = await UserManager.FindByIdAsync(User.Identity.GetUserId());
-            if(updatedUser.FirstName != null)
-                user.FirstName = updatedUser.FirstName;
-            if (updatedUser.MiddleName != null)
-                user.MiddleName = updatedUser.MiddleName;
-            if (updatedUser.LastName != null)
-                user.LastName = updatedUser.LastName;
-            if (updatedUser.PositionInCompany != null)
-                user.PositionInCompany = updatedUser.PositionInCompany;
-            if (updatedUser.PhonePrivate != null)
-                user.PhonePrivate = updatedUser.PhonePrivate;
-            if (updatedUser.PhoneWork != null)
-                user.PhoneWork = updatedUser.PhoneWork;
-            if (updatedUser.Notes != null)
-                user.Notes = updatedUser.Notes;
-            if (updatedUser.NotesForBoss != null)
-                user.Notes = updatedUser.NotesForBoss;
-            var response = await UserManager.UpdateAsync(user);
-            return response.Succeeded ? Ok(new { Msg = response.Errors, IsOk = response.Succeeded }) : GetErrorResult(response);
-        }
-
-
-
-        // POST api/Account/UpdateAllUserInfoByAdmin
-        [HostAuthentication(DefaultAuthenticationTypes.ExternalBearer)]
-        [Route("UpdateAllUserInfoByAdmin")]
-        public async Task<IHttpActionResult> UpdateAllUserInfoByAdmin(PersonalUserInfoViewModer updatedUser)
-        {
-            var d = updatedUser;
-            var dbg = "dbg";
-            if (!ModelState.IsValid) return BadRequest("Wrong model");
-            var user = await UserManager.FindByIdAsync(User.Identity.GetUserId()); // TODO: change to search by email of serched user
+            if (updatedUser.Email != null)
+                user.Email = updatedUser.Email;
             if (updatedUser.FirstName != null)
                 user.FirstName = updatedUser.FirstName;
             if (updatedUser.MiddleName != null)
@@ -180,6 +152,39 @@
             return response.Succeeded ? Ok(new { Msg = response.Errors, IsOk = response.Succeeded }) : GetErrorResult(response);
         }

+
+
+        // POST api/Account/UpdateAllUserInfoByAdmin
+        [HostAuthentication(DefaultAuthenticationTypes.ExternalBearer)]
+        [Route("UpdateAllUserInfoByAdmin")]
+        public async Task<IHttpActionResult> UpdateAllUserInfoByAdmin(PersonalUserInfoViewModer updatedUser)
+        {
+            var d = updatedUser;
+            var dbg = "dbg";
+            if (!ModelState.IsValid) return BadRequest("Wrong model");
+            var user = await UserManager.FindByEmailAsync(updatedUser.Email); // TODO: change to search by email of serched user
+            if (updatedUser.Email != null)
+                user.Email = updatedUser.Email;
+            if (updatedUser.FirstName != null)
+                user.FirstName = updatedUser.FirstName;
+            if (updatedUser.MiddleName != null)
+                user.MiddleName = updatedUser.MiddleName;
+            if (updatedUser.LastName != null)
+                user.LastName = updatedUser.LastName;
+            if (updatedUser.PositionInCompany != null)
+                user.PositionInCompany = updatedUser.PositionInCompany;
+            if (updatedUser.PhonePrivate != null)
+                user.PhonePrivate = updatedUser.PhonePrivate;
+            if (updatedUser.PhoneWork != null)
+                user.PhoneWork = updatedUser.PhoneWork;
+            if (updatedUser.Notes != null)
+                user.Notes = updatedUser.Notes;
+            if (updatedUser.NotesForBoss != null)
+                user.Notes = updatedUser.NotesForBoss;
+            var response = await UserManager.UpdateAsync(user);
+            return response.Succeeded ? Ok(new { Msg = response.Errors, IsOk = response.Succeeded }) : GetErrorResult(response);
+        }
+
         [Route("Upload")]
         // POST api/Account/Upload
         [MimeMultipart]


On initial opensim setup, don't ask the user whether they want to join an existing opensim estate when there aren't any.  Proceed directly to estate setup instead.

--- OpenSim/Region/Application/OpenSimBase.cs
+++ OpenSim/Region/Application/OpenSimBase.cs
@@ -793,6 +793,25 @@
         }

         /// <summary>
+        /// Create an estate with an initial region.
+        /// </summary>
+        /// <param name="regInfo"></param>
+        public void CreateEstate(RegionInfo regInfo)
+        {
+            // Create a new estate
+            regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true);
+
+            regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
+
+            // FIXME: Later on, the scene constructor will reload the estate settings no matter what.
+            // Therefore, we need to do an initial save here otherwise the new estate name will be reset
+            // back to the default.  The reloading of estate settings by scene could be eliminated if it
+            // knows that the passed in settings in RegionInfo are already valid.  Also, it might be
+            // possible to eliminate some additional later saves made by callers of this method.
+            regInfo.EstateSettings.Save();
+        }
+
+        /// <summary>
         /// Load the estate information for the provided RegionInfo object.
         /// </summary>
         /// <param name="regInfo"></param>
@@ -804,56 +823,61 @@
             if (regInfo.EstateSettings.EstateID == 0) // No record at all
             {
                 MainConsole.Instance.Output("Your region is not part of an estate.");
+
+                List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
+
                 while (true)
                 {
-                    string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() { "yes", "no" });
-                    if (response == "no")
-                    {
-                        // Create a new estate
-                        regInfo.EstateSettings = EstateDataService.LoadEstateSettings(regInfo.RegionID, true);
-
-                        regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
+                    if (estates.Count == 0)
+                    {
+                        MainConsole.Instance.Output(
+                            "There aren't any existing estates.  You will need to create a new one for this region.");

-                        // FIXME: Later on, the scene constructor will reload the estate settings no matter what.
-                        // Therefore, we need to do an initial save here otherwise the new estate name will be reset
-                        // back to the default.  The reloading of estate settings by scene could be eliminated if it
-                        // knows that the passed in settings in RegionInfo are already valid.  Also, it might be
-                        // possible to eliminate some additional later saves made by callers of this method.
-                        regInfo.EstateSettings.Save();
+                        CreateEstate(regInfo);
                         break;
                     }
                     else
                     {
-                        List<EstateSettings> estates = EstateDataService.LoadEstateSettingsAll();
+                        string response
+                            = MainConsole.Instance.CmdPrompt(
+                                "Do you wish to join an existing estate (yes/no)?", "no", new List<string>() { "yes", "no" });

-                        List<string> estateNames = new List<string>();
-                        foreach (EstateSettings estate in estates)
-                            estateNames.Add(estate.EstateName);
-
-                        response
-                            = MainConsole.Instance.CmdPrompt(
-                                string.Format(
-                                    "Name of estate to join.  Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())),
-                                "None");
-
-                        if (response == "None")
-                            continue;
-
-                        List<int> estateIDs = EstateDataService.GetEstates(response);
-                        if (estateIDs.Count < 1)
+                        if (response == "no")
                         {
-                            MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again");
-                            continue;
+                            CreateEstate(regInfo);
+                            break;
                         }
-
-                        int estateID = estateIDs[0];
-
-                        regInfo.EstateSettings = EstateDataService.LoadEstateSettings(estateID);
-
-                        if (EstateDataService.LinkRegion(regInfo.RegionID, estateID))
-                            break;
-
-                        MainConsole.Instance.Output("Joining the estate failed. Please try again.");
+                        else
+                        {
+                            List<string> estateNames = new List<string>();
+                            foreach (EstateSettings estate in estates)
+                                estateNames.Add(estate.EstateName);
+
+                            response
+                                = MainConsole.Instance.CmdPrompt(
+                                    string.Format(
+                                        "Name of estate to join.  Existing estate names are ({0})", string.Join(", ", estateNames.ToArray())),
+                                    "None");
+
+                            if (response == "None")
+                                continue;
+
+                            List<int> estateIDs = EstateDataService.GetEstates(response);
+                            if (estateIDs.Count < 1)
+                            {
+                                MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again");
+                                continue;
+                            }
+
+                            int estateID = estateIDs[0];
+
+                            regInfo.EstateSettings = EstateDataService.LoadEstateSettings(estateID);
+
+                            if (EstateDataService.LinkRegion(regInfo.RegionID, estateID))
+                                break;
+
+                            MainConsole.Instance.Output("Joining the estate failed. Please try again.");
+                        }
                     }
                 }
             }


Allow Control-C and Control-Insert on the string dialog listview to act the same way as the "Copy Text" context menu.

--- PlayOnline.FFXI.Utils.DataBrowser/MainWindow.cs
+++ PlayOnline.FFXI.Utils.DataBrowser/MainWindow.cs
@@ -889,6 +889,7 @@
       this.lstEntries.Text = resources.GetString("lstEntries.Text");
       this.lstEntries.View = System.Windows.Forms.View.Details;
       this.lstEntries.Visible = ((bool)(resources.GetObject("lstEntries.Visible")));
+      this.lstEntries.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lstEntries_KeyDown);
       this.lstEntries.SizeChanged += new System.EventHandler(this.lstEntries_SizeChanged);
       //
       // colXIEntryNum
@@ -1160,7 +1161,7 @@

     #region String Table Context Menu Events

-    private void mnuSTCCopy_Click(object sender, System.EventArgs e) {
+    private void CopyStringTableText() {
     string ItemText = String.Empty;
       foreach (ListViewItem LVI in this.lstEntries.SelectedItems) {
 	if (ItemText != String.Empty)
@@ -1169,6 +1170,15 @@
       }
       if (ItemText != String.Empty)
 	Clipboard.SetDataObject(ItemText);
+    }
+
+    private void lstEntries_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) {
+      if (e.Modifiers == Keys.Control && (e.KeyCode == Keys.C || e.KeyCode == Keys.Insert))
+	this.CopyStringTableText();
+    }
+
+    private void mnuSTCCopy_Click(object sender, System.EventArgs e) {
+      this.CopyStringTableText();
     }

     #endregion


If both string table items and images are returned from the file scan (and in equal numbers), add the images to the listview.

--- PlayOnline.FFXI.Utils.DataBrowser/MainWindow.cs
+++ PlayOnline.FFXI.Utils.DataBrowser/MainWindow.cs
@@ -1190,6 +1190,7 @@
 	    this.tabViewers.TabPages.Add(this.tabViewerStringTable);
 	    Application.DoEvents();
 	    this.lstEntries.Select();
+	    this.lstEntries.SmallImageList = null;
 	  int i = 0;
 	    foreach (Array A in FSD.StringTableEntries) {
 	      if (i == 0) {
@@ -1197,15 +1198,20 @@
 		this.lstEntries.Columns.Add(I18N.GetText("ColumnHeader:Entry"), 1, HorizontalAlignment.Center);
 		foreach (ColumnHeader CH in A)
 		  this.lstEntries.Columns.Add(CH);
-		++i;
 	      }
 	      else {
-	      ListViewItem LVI = this.lstEntries.Items.Add(String.Format("{0:00000000}", i++));
+	      ListViewItem LVI = this.lstEntries.Items.Add(String.Format("{0:00000000}", i), i - 1);
 		foreach (string S in A)
 		  LVI.SubItems.Add(S);
 	      }
-	      if ((i % 100) == 0)
+	      if ((++i % 100) == 0)
 		Application.DoEvents();
+	    }
+	    if (FSD.Images.Count == FSD.StringTableEntries.Count - 1) {
+	    ImageList EntryIcons = new ImageList();
+	      foreach (FFXIGraphic G in FSD.Images)
+		EntryIcons.Images.Add(G.Bitmap);
+	      this.lstEntries.SmallImageList = EntryIcons;
 	    }
 	    foreach (ColumnHeader CH in this.lstEntries.Columns) {
 	      CH.Width = -1;


nudge improvement on ST bounds

nudge improvement on ST bounds

--- PowerArgs/CLI/Physics/Space/SpacialAwareness.cs
+++ PowerArgs/CLI/Physics/Space/SpacialAwareness.cs
@@ -237,7 +237,7 @@
                         var effectiveAngle = angle % 360;
                         var testLoc = desiredLocation.MoveTowards(effectiveAngle, d);
                         var testArea = RectangularF.Create(testLoc.Left, testLoc.Top, desiredLocation.Width, desiredLocation.Height);
-                        if (obstacles.Where(o => o.Touches(testArea)).None())
+                        if (obstacles.Where(o => o.Touches(testArea)).None() && SpaceTime.CurrentSpaceTime.Bounds.Contains(testArea))
                         {
                             return testLoc.TopLeft();
                         }


Fix colors

Fix colors

--- PartPreviewWindow/PlusTab/ExplorePanel.cs
+++ PartPreviewWindow/PlusTab/ExplorePanel.cs
@@ -163,7 +163,7 @@

 			toolBarA.AddChild(new VerticalLine(50) { Margin = new BorderDouble(12, 0) });

-			toolBarA.AddChild(new TextWidget("Open Existing".Localize() + ":", pointSize: theme.DefaultFontSize)
+			toolBarA.AddChild(new TextWidget("Open Existing".Localize() + ":", textColor: theme.Colors.PrimaryTextColor, pointSize: theme.DefaultFontSize)
 			{
 				VAnchor = VAnchor.Center
 			});


added POST names to the split account fields so they can be collected

--- Purchasing.Web/Views/OrderMockup/Request.cshtml
+++ Purchasing.Web/Views/OrderMockup/Request.cshtml
@@ -484,11 +484,10 @@
 }


feature: scraped entrants now sorted by saddle number

--- RacingWebScraper/SportingLife/ScrapeEntrants.cs
+++ RacingWebScraper/SportingLife/ScrapeEntrants.cs
@@ -88,6 +88,8 @@
                 entrants.Add(entrantOut);
             }

+            entrants = entrants.OrderBy(x => x.SaddleNumber).ToList();
+
             return entrants;
         }


Fixed bug with record values not being pulled out

--- SQLDatabase/Extensions/TransactionExtensions.cs
+++ SQLDatabase/Extensions/TransactionExtensions.cs
@@ -97,6 +97,7 @@
                         {
                             var name = _reader.GetName(i);
                             var value = _reader.GetValue(i);
+                            record[name] = value;
                         }
                         return (IReadOnlyDictionary<string, object>)record;
                     });


MaterialMatrixBuilder method signature changed

IList<Strain> parameter was unused by method, so removed from method
signature.

--- SharpFE.Core/Materials/MaterialMatrixBuilder.cs
+++ SharpFE.Core/Materials/MaterialMatrixBuilder.cs
@@ -45,11 +45,11 @@

         protected KeyedSquareMatrix<Strain> CreateMaterialMatrix(IList<Strain> supportedStrains, double lameConstantLambda, double lameConstantMu)
         {
-            KeyedSquareMatrix<Strain> matrix = CreateFullMaterialMatrix(supportedStrains, lameConstantLambda, lameConstantMu);
+            KeyedSquareMatrix<Strain> matrix = CreateMaterialMatrix(lameConstantLambda, lameConstantMu);
             return matrix.SubMatrix(supportedStrains);
         }

-        protected KeyedSquareMatrix<Strain> CreateFullMaterialMatrix(IList<Strain> supportedStrains, double lameConstantLambda, double lameConstantMu)
+        protected KeyedSquareMatrix<Strain> CreateMaterialMatrix(double lameConstantLambda, double lameConstantMu)
         {
             IList<Strain> keys = new List<Strain>
             {


resize img added

resize img added

--- Source/Code.Library/Code.Library/ImageHelper.cs
+++ Source/Code.Library/Code.Library/ImageHelper.cs
@@ -1,4 +1,5 @@
-using System.Drawing;
+using System;
+using System.Drawing;
 using System.Drawing.Drawing2D;
 using System.Drawing.Imaging;
 using System.IO;
@@ -79,5 +80,33 @@

             return ImageFormat.Png;
         }
+
+        /// <summary>
+        /// Resize Image
+        /// Author : Abhith
+        /// Date : 14 July 2015
+        /// Reference : Sysberries
+        /// </summary>
+        /// <param name="image"></param>
+        /// <param name="maxWidth"></param>
+        /// <param name="maxHeight"></param>
+        /// <returns></returns>
+        public static Bitmap ResizeImage(Image image, int maxWidth, int maxHeight)
+        {
+            var ratioX = (double)maxWidth / image.Width;
+            var ratioY = (double)maxHeight / image.Height;
+
+            var ratio = Math.Min(ratioX, ratioY);
+
+            var newWidth = (int)(image.Width * ratio);
+            var newHeight = (int)(image.Height * ratio);
+
+            var newImage = new Bitmap(newWidth, newHeight);
+
+            Graphics.FromImage(newImage).DrawImage(image, 0, 0, newWidth, newHeight);
+            Bitmap bmp = new Bitmap(newImage);
+
+            return bmp;
+        }
     }
 }


GSF.Core: Added suppression for superfluous first chance exceptions from System.IO

--- Source/Libraries/GSF.Core.Shared/IO/FilePath.cs
+++ Source/Libraries/GSF.Core.Shared/IO/FilePath.cs
@@ -58,6 +58,7 @@
 using System.Text;
 using System.Text.RegularExpressions;
 using System.Threading;
+using GSF.Diagnostics;

 namespace GSF.IO
 {
@@ -733,14 +734,17 @@
         /// </remarks>
         public static string GetDirectoryName(string filePath)
         {
-            // Test for case where valid path does not end in directory separator, Path.GetDirectoryName assumes
-            // this is a file name - whether is exists or not :-(
-            string directoryName = AddPathSuffix(filePath);
-
-            if (Directory.Exists(directoryName))
-                return directoryName;
-
-            return AddPathSuffix(Path.GetDirectoryName(filePath) ?? filePath);
+            using (Logger.SuppressFirstChanceExceptionLogMessages())
+            {
+                // Test for case where valid path does not end in directory separator, Path.GetDirectoryName assumes
+                // this is a file name - whether is exists or not :-(
+                string directoryName = AddPathSuffix(filePath);
+
+                if (Directory.Exists(directoryName))
+                    return directoryName;
+
+                return AddPathSuffix(Path.GetDirectoryName(filePath) ?? filePath);
+            }
         }

         /// <summary>


Typed actors: calling overloaded methods

--- Source/Orleankka.Tests/Features/Typed_actors.cs
+++ Source/Orleankka.Tests/Features/Typed_actors.cs
@@ -14,32 +14,37 @@

         public class TestActor : TypedActor
         {
-            string text = "";
+            public string TextField = "";
+
+            public string TextProperty
+            {
+                get; set;
+            }

             public void SetText(string arg)
             {
-                text = arg;
+                TextField = arg;
             }

             public string GetText()
             {
-                return text;
+                return TextField;
             }

             public Task SetTextAsync(string arg)
             {
-                text = arg;
+                TextField = arg;
                 return TaskDone.Done;
             }

             public Task<string> GetTextAsync()
             {
-                return Task.FromResult(text);
+                return Task.FromResult(TextField);
             }

-            public string TextProperty
+            public void SetText(string arg1, string arg2)
             {
-                get; set;
+                TextField = arg1 ?? arg2;
             }
         }

@@ -76,6 +81,16 @@
             }

             [Test]
+            public async void Calling_overloaded_methods()
+            {
+                var actor = system.FreshTypedActorOf<TestActor>();
+
+                await actor.Call(x => x.SetText(null, "foo"));
+
+                Assert.AreEqual("foo", await actor.Call(x => x.GetText()));
+            }
+
+            [Test]
             public async void Calling_properties()
             {
                 var actor = system.FreshTypedActorOf<TestActor>();


Fix broken test

Fix broken test

--- Sources/Libs/ManagedIrbis/Source/RecordField.cs
+++ Sources/Libs/ManagedIrbis/Source/RecordField.cs
@@ -191,7 +191,7 @@
         /// Является ли поле фиксированным.
         /// </summary>
         [XmlIgnore]
-        //[Browsable(false)]
+        [JsonIgnore]
         public bool IsFixed
         {
             [DebuggerStepThrough]


Automated dotnet-format update from commit 970274cd45a3538fb419a708a0cc9a53c83346fa on refs/heads/master

--- SparkTodo.API/Controllers/CategoryController.cs
+++ SparkTodo.API/Controllers/CategoryController.cs
@@ -116,7 +116,7 @@
         var result = await _categoryRepository.UpdateAsync(category, t => t.IsDeleted);
         if (result > 0)
         {
-            await _todoItemRepository.UpdateAsync((x) => x.SetProperty(_ => _.CategoryId, _ => -1), _ => _.WithPredict(t=> t.CategoryId == categoryId));
+            await _todoItemRepository.UpdateAsync((x) => x.SetProperty(_ => _.CategoryId, _ => -1), _ => _.WithPredict(t => t.CategoryId == categoryId));
             return Ok();
         }


Trees only grow where trees already are

Trees only grow where trees already are

--- Island/Landscapes/Plain.cs
+++ Island/Landscapes/Plain.cs
@@ -10,12 +10,18 @@
   {
     public Plain() : base(Color.Bisque)
     {
-      Resources.Set<Wood>(Random.Next(0, 100));
+      if (Random.Next(0, 3) == 0)
+      {
+        Resources.Set<Wood>(Random.Next(0, 100));
+      }
     }

     public override void ReplenishResources()
     {
-      Resources.Add<Wood>(1);
+      if (Resources.Get<Wood>() > 0)
+      {
+        Resources.Add<Wood>(1);
+      }
     }

     public override void Draw(Graphics graphics, float x, float y, float width, float height)


Support ^[ mode escape

Support ^[ mode escape

--- JustEnoughVi/ViEditMode.cs
+++ JustEnoughVi/ViEditMode.cs
@@ -62,6 +62,7 @@
             // generic mode escape handler
             if (
                 (modifier == 0 && key == Gdk.Key.Escape) ||
+                (modifier == Gdk.ModifierType.ControlMask && key == Gdk.Key.bracketleft) ||
                 (modifier == Gdk.ModifierType.ControlMask && key == Gdk.Key.c))
             {
                 _currentMode.InternalDeactivate((ExtensibleTextEditor)Editor, Data);


Fixed Matrix4 * Vector4.

Fixed Matrix4 * Vector4.

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@338 bb9bf1cf-960d-0410-9a3a-baeba60cf407


[V2] Wrapping pre and post builds into utility functions


New Interface

New Interface

--- King.Service/Interfaces.cs
+++ King.Service/Interfaces.cs
@@ -94,4 +94,14 @@
         double Exponential(ulong attempts, int max, int min = 1);
         #endregion
     }
+
+    /// <summary>
+    /// Dynamic Timing
+    /// </summary>
+    public interface IDynamicTiming
+    {
+        #region Methods
+        double Get(bool workWasDone, int max, int min);
+        #endregion
+    }
 }


Fix incorrect section alignments

Fix incorrect section alignments

--- LSLib/Granny/GR2/Writer.cs
+++ LSLib/Granny/GR2/Writer.cs
@@ -252,7 +252,7 @@
             if (Writer == MainWriter)
             {
                 // Align the struct so its size (and the address of the subsequent struct) is a multiple of 4
-                while ((MainStream.Position % 4) != 0)
+                while ((MainStream.Position % Header.alignment) != 0)
                 {
                     Writer.Write((Byte)0);
                 }
@@ -260,7 +260,7 @@
             else
             {
                 // Align the struct so its size (and the address of the subsequent struct) is a multiple of 4
-                while ((DataStream.Position % 4) != 0)
+                while ((DataStream.Position % Header.alignment) != 0)
                 {
                     Writer.Write((Byte)0);
                 }
@@ -772,13 +772,17 @@
                 foreach (var section in Sections)
                 {
                     relocSection.WriteSectionRelocations(section);
+                }
+
+                foreach (var section in Sections)
+                {
                     relocSection.WriteSectionMixedMarshallingRelocations(section);
                 }

                 foreach (var section in Sections)
                 {
-                    // Pad section size to a multiple of 4
-                    while (section.MainStream.Position % 4 > 0)
+                    // Pad section size to a multiple of the section alignment
+                    while ((section.MainStream.Position % section.Header.alignment) > 0)
                         section.Writer.Write((Byte)0);

                     section.MainStream.Flush();


Remove call to AddConsole()

Remove call to AddConsole()

Remove call to AddConsole() which is now obsolete.

--- tests/Website.Tests/Integration/HttpServerFixture.cs
+++ tests/Website.Tests/Integration/HttpServerFixture.cs
@@ -45,12 +45,7 @@
                 .UseContentRoot(projectPath)
                 .UseEnvironment("Development")
                 .UseLoggerFactory(new LoggerFactory())
-                .ConfigureLogging<LoggerFactory>(
-                    (hostingContext, factory) =>
-                    {
-                        factory.AddDebug();
-                        factory.AddConsole(hostingContext.Configuration);
-                    })
+                .ConfigureLogging<LoggerFactory>((p) => p.AddDebug())
                 .UseStartup<TestStartup>();

             _server = new TestServer(builder);


cleanup/docs

cleanup/docs

--- Frost.DirectX.Formatting/LineItem.cs
+++ Frost.DirectX.Formatting/LineItem.cs
@@ -8,6 +8,9 @@

 namespace Frost.DirectX.Formatting
 {
+	/// <summary>
+	///   This struct stores data as a box, glue, or penalty item.
+	/// </summary>
 	internal struct LineItem
 	{
 		public static readonly double Infinity = 10000.0;
@@ -24,6 +27,11 @@

 		private readonly ItemType _Type;

+		/// <summary>
+		///   This constructor creates a new box item.
+		/// </summary>
+		/// <param name="width"> This parameter indicates the width of the box. </param>
+		/// <param name="position"> This parameter indicates the user-defined index position. </param>
 		private LineItem(double width, int position) : this()
 		{
 			Contract.Requires(Check.IsPositive(width));
@@ -34,6 +42,13 @@
 			Position = position;
 		}

+		/// <summary>
+		///   This constructor creates a new glue item.
+		/// </summary>
+		/// <param name="width"> This parameter indicates the width of the glue. </param>
+		/// <param name="position"> This parameter indicates the user-defined index position. </param>
+		/// <param name="stretch"> This parameter indicates the number of units the glue may stretch. </param>
+		/// <param name="shrink"> This parameter indicates the number of units the glue may shrink. </param>
 		private LineItem(double width, int position, double stretch, double shrink) : this()
 		{
 			Contract.Requires(Check.IsPositive(width));
@@ -48,6 +63,13 @@
 			Shrink = shrink;
 		}

+		/// <summary>
+		///   This constructor creates a new penalty item.
+		/// </summary>
+		/// <param name="width"> This parameter indicates the width of the penalty item. </param>
+		/// <param name="position"> This parameter indicates the user-defined index position. </param>
+		/// <param name="penalty"> This parameter indicates the penalty incurred when the item is chosen. </param>
+		/// <param name="flagged"> This parameter indicates the flagged penalty. </param>
 		private LineItem(double width, int position, Demerits penalty, Demerits flagged) : this()
 		{
 			Contract.Requires(Check.IsPositive(width));
@@ -60,21 +82,33 @@
 			Flagged = flagged;
 		}

+		/// <summary>
+		///   This property indicates whether the item is glue.
+		/// </summary>
 		public bool IsGlue
 		{
 			get { return _Type == ItemType.Glue; }
 		}

+		/// <summary>
+		///   This property indicates whether the item is a box.
+		/// </summary>
 		public bool IsBox
 		{
 			get { return _Type == ItemType.Box; }
 		}

+		/// <summary>
+		///   This property indicates whether the item is a penalty.
+		/// </summary>
 		public bool IsPenalty
 		{
 			get { return _Type == ItemType.Penalty; }
 		}

+		/// <summary>
+		///   This property indicates whether the item is a forced break.
+		/// </summary>
 		public bool IsForcedBreak
 		{
 			get
@@ -88,6 +122,12 @@
 			}
 		}

+		/// <summary>
+		///   This method creates a new box item.
+		/// </summary>
+		/// <param name="width"> This parameter indicates the width of the box. </param>
+		/// <param name="position"> This parameter indicates the user-defined index position. </param>
+		/// <returns> This method returns a new box item. </returns>
 		public static LineItem CreateBox(double width, int position)
 		{
 			Contract.Requires(Check.IsPositive(width));
@@ -95,6 +135,14 @@
 			return new LineItem(width, position);
 		}

+		/// <summary>
+		///   This method creates a new glue item.
+		/// </summary>
+		/// <param name="width"> This parameter indicates the width of the glue. </param>
+		/// <param name="position"> This parameter indicates the user-defined index position. </param>
+		/// <param name="stretch"> This parameter indicates the number of units the glue may stretch. </param>
+		/// <param name="shrink"> This parameter indicates the number of units the glue may shrink. </param>
+		/// <returns> This method returns a new glue item. </returns>
 		public static LineItem CreateGlue(double width, int position, double shrink, double stretch)
 		{
 			Contract.Requires(Check.IsPositive(width));
@@ -104,6 +152,14 @@
 			return new LineItem(width, position, stretch, shrink);
 		}

+		/// <summary>
+		///   This method creates a new penalty item.
+		/// </summary>
+		/// <param name="width"> This parameter indicates the width of the penalty item. </param>
+		/// <param name="position"> This parameter indicates the user-defined index position. </param>
+		/// <param name="penalty"> This parameter indicates the penalty incurred when the item is chosen. </param>
+		/// <param name="flagged"> This parameter indicates the flagged penalty. </param>
+		/// <returns> This method returns a new penalty item. </returns>
 		public static LineItem CreatePenalty(
 			double width, int position, Demerits penalty, Demerits flagged)
 		{
@@ -112,6 +168,11 @@
 			return new LineItem(width, position, penalty, flagged);
 		}

+		/// <summary>
+		///   This method computes the width of the item.
+		/// </summary>
+		/// <param name="lineRatio"> This parameter indicates the current line ratio. </param>
+		/// <returns> The method returns the computed item width. </returns>
 		public double ComputeWidth(double lineRatio)
 		{
 			Contract.Requires(Check.IsFinite(lineRatio));
@@ -119,6 +180,12 @@
 			return ComputeWidth(lineRatio, false);
 		}

+		/// <summary>
+		///   This method computes the width of the item.
+		/// </summary>
+		/// <param name="lineRatio"> This parameter indicates the current line ratio. </param>
+		/// <param name="isPenaltyActive"> This parameter indicates whether a penalty is active. </param>
+		/// <returns> The method returns the computed item width. </returns>
 		public double ComputeWidth(double lineRatio, bool isPenaltyActive)
 		{
 			Contract.Requires(Check.IsFinite(lineRatio));
@@ -141,6 +208,11 @@
 			return Width;
 		}

+		/// <summary>
+		///   This method computes the demerits of the item.
+		/// </summary>
+		/// <param name="lineRatio"> This parameter indicates the current line ratio. </param>
+		/// <returns> This method returns the computed demerits for the item. </returns>
 		public Demerits ComputeDemerits(double lineRatio)
 		{
 			Contract.Requires(Check.IsFinite(lineRatio));
@@ -160,6 +232,12 @@
 			return Math.Pow(10 + badness, 2.0);
 		}

+		/// <summary>
+		///   This method combines flagged demerits with another item.
+		/// </summary>
+		/// <param name="other"> This parameter contains the other item to combine. </param>
+		/// <param name="demerits"> This parameter indicates the current demerits. </param>
+		/// <returns> This method returns the combined demerits. </returns>
 		public Demerits CombineFlaggedDemerits(LineItem other, Demerits demerits)
 		{
 			if(IsPenalty && other.IsPenalty)


Added check for Gw2-64 client if the 32-bit client process is not found

--- GW2PAO.API/Services/SystemService.cs
+++ GW2PAO.API/Services/SystemService.cs
@@ -47,7 +47,7 @@
         {
             get
             {
-                this.gw2Process = Process.GetProcessesByName("Gw2").FirstOrDefault();
+                this.gw2Process = Process.GetProcessesByName("Gw2").FirstOrDefault() ?? Process.GetProcessesByName("Gw2-64").FirstOrDefault();
                 return this.gw2Process;
             }
         }


Fixed parsing gcc errors.

Fixed parsing gcc errors.


Prevent update of test parse to determine quote system if bundle is not in its original location and user declined to find it.

(Note: this crash happened to me when I opened a left-over test project. It might be an impossible -- or at least highly improbable -- scenario for normal projects.)

--- Glyssen/Dialogs/QuotationMarksDlg.cs
+++ Glyssen/Dialogs/QuotationMarksDlg.cs
@@ -92,7 +92,7 @@

 				SetFilterControlsFromMode();

-				if (m_project.ProjectState == ProjectState.NeedsQuoteSystemConfirmation)
+				if (m_project.ProjectState == ProjectState.NeedsQuoteSystemConfirmation && !readOnly)
 					UpdateTestParse(false);

 				ReadOnly = readOnly;


Update EdgeBase.cs to support new ReversePath property.

Added support for reversing the geometry.  This is required for animating shapes along a path where the direction needs to be reversed without using the Storyboard.AutoReverse property.

--- GraphX.PCL.Common/Models/EdgeBase.cs
+++ GraphX.PCL.Common/Models/EdgeBase.cs
@@ -67,5 +67,9 @@
         /// </summary>
         public double Weight { get; set; }

+		/// <summary>
+		/// Reverse the calculated routing path points.
+		/// </summary>
+		public bool ReversePath { get; set; }
     }
 }


while AST  dumping

while AST  dumping

--- samples/while/model/BinaryOperation.cs
+++ samples/while/model/BinaryOperation.cs
@@ -41,7 +41,7 @@
             StringBuilder dmp = new StringBuilder();
             dmp.AppendLine($"{tab}(OPERATION [{Operator}]");
             dmp.AppendLine($"{Left.Dump("\t"+tab)},");
-            dmp.AppendLine(Left.Dump("\t" + tab));
+            dmp.AppendLine(Right.Dump("\t" + tab));
             dmp.AppendLine($"{tab})");
             return dmp.ToString();
         }


INTEGRATION: CWS jl18 (1.5.4); FILE MERGED 2005/03/18 16:00:07 jl 1.5.4.1: #45409# TestPolystruct was used with unsigned long literal rather then  long

--- testtools/source/bridgetest/cli/cli_cs_bridgetest.cs
+++ testtools/source/bridgetest/cli/cli_cs_bridgetest.cs
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: cli_cs_bridgetest.cs,v $
  *
- *  $Revision: 1.5 $
- *
- *  last change: $Author: rt $ $Date: 2004-09-20 14:49:46 $
+ *  $Revision: 1.6 $
+ *
+ *  last change: $Author: vg $ $Date: 2005-03-23 08:51:41 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -572,7 +572,7 @@
         bRet &= check(
             (bool) xLBT.transportPolyBoolean(poly).member,
             "transportPolyBoolean");
-        poly = new TestPolyStruct(12345UL);
+        poly = new TestPolyStruct(12345L);
         xLBT.transportPolyHyper(ref poly);
         bRet &= check((long)poly.member == 12345L, "transportPolyUnsignedHyper");


windows compiler handholding

windows compiler handholding

Prevent windows csharp compiler 4.0.0.0 from complaining about the use
of unassigned local variables.

--- IdleLandsRedux.WebService/Program.cs
+++ IdleLandsRedux.WebService/Program.cs
@@ -29,8 +29,8 @@
 				var session = Bootstrapper.CreateSession();
 				using (var transaction = session.BeginTransaction()) {
 					DateTime now = DateTime.UtcNow;
-					Player player;
-					StatsObject statsObject;
+					Player player = null;
+					StatsObject statsObject = null;

 					try {
 						var users = session.QueryOver<LoggedInUser>()


Added missing failure exit code changes.

--- tools/NetCoreCsProjSync/NetCoreCsProjSync/Program.cs
+++ tools/NetCoreCsProjSync/NetCoreCsProjSync/Program.cs
@@ -79,6 +79,7 @@
                         Console.ForegroundColor = ConsoleColor.Red;
                         Console.WriteLine($"{desktopFileName}: Could not locate management library containing {managementPackageName}");
                         Console.ForegroundColor = priorColor;
+                        Environment.ExitCode = 1;
                         continue;
                     }

@@ -95,8 +96,9 @@
                     {
                         var priorColor = Console.ForegroundColor;
                         Console.ForegroundColor = ConsoleColor.Red;
-                        Console.WriteLine($"{netCoreFileName}:Could not locate management library containing {managementPackageName}");
+                        Console.WriteLine($"{netCoreFileName}: Could not locate management library containing {managementPackageName}");
                         Console.ForegroundColor = priorColor;
+                        Environment.ExitCode = 1;
                         continue;
                     }

@@ -111,6 +113,7 @@
                         Console.ForegroundColor = ConsoleColor.Red;
                         Console.WriteLine($"Version mismatch: {oldVersionString} > {newVersionString} : {managementPackageName}");
                         Console.ForegroundColor = priorColor;
+                        Environment.ExitCode = 1;
                     }
                 }
             }


Added stronger regex to be used when adding a new track


bumped version to 1.1.2

bumped version to 1.1.2

--- src/Cake.Putty/Properties/AssemblyInfo.cs
+++ src/Cake.Putty/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.1.0")]
-[assembly: AssemblyFileVersion("1.1.1.0")]
+[assembly: AssemblyVersion("1.1.2.0")]
+[assembly: AssemblyFileVersion("1.1.2.0")]


Use double to get the mean

Use double to get the mean

--- src/DataStax.Driver.Benchmarks/Program.cs
+++ src/DataStax.Driver.Benchmarks/Program.cs
@@ -79,9 +79,9 @@
                 }
                 var averageMs = elapsed.Average();
                 Console.WriteLine("Insert Throughput:\n\tAverage {0:0} ops/s (elapsed {1:0}) - Median {2} ops/s",
-                    1000 * statementLength / averageMs,
+                    1000D * statementLength / averageMs,
                     averageMs,
-                    1000 * statementLength / elapsed.OrderBy(x => x).Skip(2).First());
+                    1000D * statementLength / elapsed.OrderBy(x => x).Skip(2).First());
             }).Wait();
             GC.Collect();
             Task.Run(async () =>
@@ -97,9 +97,9 @@
                 }
                 var averageMs = elapsed.Average();
                 Console.WriteLine("Select Throughput:\n\tAverage {0:0} ops/s (elapsed {1:0}) - Median {2} ops/s",
-                    1000 * statementLength / averageMs,
+                    1000D * statementLength / averageMs,
                     averageMs,
-                    1000 * statementLength / elapsed.OrderBy(x => x).Skip(2).First());
+                    1000D * statementLength / elapsed.OrderBy(x => x).Skip(2).First());
             }).Wait();
         }
     }


5.0.0.4

--- Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs
+++ Src/Asp.Net/SqlSugar/Properties/AssemblyInfo.cs
@@ -31,5 +31,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("5.0.0.3")]
-[assembly: AssemblyFileVersion("5.0.0.3")]
+[assembly: AssemblyVersion("5.0.0.4")]
+[assembly: AssemblyFileVersion("5.0.0.4")]


Truncate table when writing to SQL Server

TRUNCATE TABLE performs much better than DELETE.

--- src/EduHub.Data/Entities/EduHubDataSet.cs
+++ src/EduHub.Data/Entities/EduHubDataSet.cs
@@ -181,7 +181,7 @@
             using (var transaction = Connection.BeginTransaction(IsolationLevel.Serializable))
             {
                 // Drop records
-                using (var command = new SqlCommand($"DELETE {Name}", Connection, transaction))
+                using (var command = new SqlCommand($"TRUNCATE TABLE {Name}", Connection, transaction))
                 {
                     command.ExecuteNonQuery();
                 }


Added GetFileDistributedWithApplication to FileLocator

--- Palaso/IO/FileLocator.cs
+++ Palaso/IO/FileLocator.cs
@@ -3,6 +3,7 @@
 using System.IO;
 using System.Reflection;
 using System.Windows.Forms;
+using Palaso.Code;
 using Palaso.Reporting;
 using Palaso.Extensions;

@@ -91,5 +92,26 @@
 			}
 		}

+
+		/// <summary>
+		/// Find a file which, on a development machine, lives in [solution]/[distFileFolderName]/[subPath],
+		/// and when installed, lives in
+		/// [applicationFolder]/[distFileFolderName]/[subPath]  or
+		/// [applicationFolder]/[subPath]
+		/// </summary>
+		/// <example>GetFileDistributedWithApplication("DistFiles", "realeaseNotes.htm");</example>
+		public static string GetFileDistributedWithApplication(string distFileFolderName, string subPath)
+		{
+			var x = FileLocator.DirectoryOfApplicationOrSolution;
+			var dirIfUsingDistFilesFolder = Path.Combine(x, distFileFolderName);
+			if (Directory.Exists(dirIfUsingDistFilesFolder))
+			{
+				x = dirIfUsingDistFilesFolder;
+			}
+			RequireThat.Directory(x).Exists();
+			var filePath = Path.Combine(x, subPath);
+			RequireThat.File(filePath).Exists();
+			return filePath;
+		}
 	}
 }


Port of matt-snyder's fix https://github.com/mattfrear/Swashbuckle.AspNetCore.Examples/pull/8

--- Swashbuckle.Examples/ExamplesOperationFilter.cs
+++ Swashbuckle.Examples/ExamplesOperationFilter.cs
@@ -32,7 +32,12 @@
                 {
                     var provider = (IExamplesProvider)Activator.CreateInstance(attr.ExamplesProviderType);

-                    var parts = schema.@ref.Split('/');
+                    var parts = schema.@ref?.Split('/');
+                    if (parts == null)
+                    {
+                        continue;
+                    }
+
                     var name = parts.Last();

                     var definitionToUpdate = schemaRegistry.Definitions[name];
@@ -66,7 +71,7 @@
                     if (response.Value != null)
                     {
                         var provider = (IExamplesProvider)Activator.CreateInstance(attr.ExamplesProviderType);
-                        var serializerSettings = new JsonSerializerSettings { ContractResolver = attr.ContractResolver };
+                        var serializerSettings = new JsonSerializerSettings { ContractResolver = attr.ContractResolver, NullValueHandling = NullValueHandling.Ignore };
                         response.Value.examples = FormatAsJson(provider, serializerSettings);
                     }
                 }


Add ability to check to see if a message type has subscribers before doing work

--- src/Foundatio/Messaging/MessageBusBase.cs
+++ src/Foundatio/Messaging/MessageBusBase.cs
@@ -94,8 +94,20 @@
             await SubscribeImplAsync(handler, cancellationToken).AnyContext();
         }

+        protected bool MessageTypeHasSubscribers(Type messageType) {
+            var subscribers = _subscribers.Values.Where(s => s.IsAssignableFrom(messageType)).ToList();
+            return subscribers.Count == 0;
+        }
+
         protected void SendMessageToSubscribers(MessageBusData message, ISerializer serializer) {
             var messageType = GetMessageBodyType(message);
+            if (messageType == null)
+                return;
+
+            SendMessageToSubscribers(messageType, message.Data, serializer);
+        }
+
+        protected void SendMessageToSubscribers(Type messageType, byte[] data, ISerializer serializer) {
             if (messageType == null)
                 return;

@@ -108,7 +120,7 @@

             object body;
             try {
-                body = serializer.Deserialize(message.Data, messageType);
+                body = serializer.Deserialize(data, messageType);
             } catch (Exception ex) {
                 if (_logger.IsEnabled(LogLevel.Warning))
                     _logger.LogWarning(ex, "Error deserializing message body: {Message}", ex.Message);


hack for social providers throwing on logout

--- src/Host/Controllers/AccountController.cs
+++ src/Host/Controllers/AccountController.cs
@@ -201,7 +201,14 @@
                 }

                 string url = "/Account/Logout?logoutId=" + model.LogoutId;
-                await HttpContext.Authentication.SignOutAsync(idp, new AuthenticationProperties { RedirectUri = url });
+                try
+                {
+                    // hack: try/catch to handle social providers that throw
+                    await HttpContext.Authentication.SignOutAsync(idp, new AuthenticationProperties { RedirectUri = url });
+                }
+                catch(NotSupportedException)
+                {
+                }
             }

             // delete authentication cookie


Ya no explota mas :smile: #16 pero no se ve nada debe ser por falta de configuracion de la camara

--- TGC.Examples/SceneLoader/EjemploExportarMesh.cs
+++ TGC.Examples/SceneLoader/EjemploExportarMesh.cs
@@ -1,3 +1,5 @@
+using System.IO;
+using Microsoft.DirectX;
 using TGC.Core.SceneLoader;
 using TGC.Core.UserControls;
 using TGC.Core.UserControls.Modifier;
@@ -32,6 +34,12 @@
             //TgcScene sceneOriginal2 = loader.loadSceneFromFile(this.MediaDir + "ModelosTgc\\Box\\" + "Box-TgcScene.xml");

             var destFolder = MediaDir + "PruebaExporter";
+
+            if (!Directory.Exists(destFolder))
+            {
+                Directory.CreateDirectory(destFolder);
+            }
+
             var unifiedScene = new TgcScene("PruebaExporter", destFolder);
             unifiedScene.Meshes.AddRange(sceneOriginal.Meshes);
             unifiedScene.Meshes.AddRange(sceneOriginal2.Meshes);


Fixing 25454: Exporting translation could end up in infinite loop

[TFS Changeset #65013]

--- umbraco/cms/businesslogic/translation/Translation.cs
+++ umbraco/cms/businesslogic/translation/Translation.cs
@@ -112,10 +112,8 @@
             tmpStr = tmpStr.Replace("\n", " ");
             tmpStr = tmpStr.Replace("\r", " ");

-            while (tmpStr.IndexOf("  ") != -1)
-                tmpStr = tmpStr.Replace("  ", " ");
-
-            return tmpStr.Split(' ').Length;
+            MatchCollection collection = Regex.Matches(tmpStr, @"[\S]+");
+            return collection.Count;
         }
     }
 }


Quick bug fix

Quick bug fix

--- TVSPlayer/Pages/Episodes/EpisodeButtons.xaml.cs
+++ TVSPlayer/Pages/Episodes/EpisodeButtons.xaml.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Globalization;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -86,7 +87,7 @@
         }

         private void WatchAll_MouseUp(object sender, MouseButtonEventArgs e) {
-            var eps = Database.GetEpisodes(owner.series.id);
+            var eps = Database.GetEpisodes(owner.series.id).Where( x=> !String.IsNullOrEmpty(x.firstAired) && DateTime.ParseExact(x.firstAired, "yyyy-MM-dd", CultureInfo.InvariantCulture) < DateTime.Now);
             foreach (var ep in eps) {
                 ep.finised = true;
                 Database.EditEpisode(owner.series.id, ep.id, ep);


code stype fix

code stype fix

--- TableDependency.SqlClient/SqlTableDependency.cs
+++ TableDependency.SqlClient/SqlTableDependency.cs
@@ -100,7 +100,7 @@
         /// <param name="mapper">The model to column table mapper.</param>
         /// <param name="updateOf">Column's names white list used to specify interested columns. Only when one of these columns is updated a notification is received.</param>
         /// <param name="automaticDatabaseObjectsTeardown">Destroy all database objects created for receive notifications.</param>
-        /// /// <param name="namingConventionForDatabaseObjects">The naming convention for database objects.</param>
+        /// <param name="namingConventionForDatabaseObjects">The naming convention for database objects.</param>
         public SqlTableDependency(string connectionString, string tableName, ModelToTableMapper<T> mapper = null, IEnumerable<string> updateOf = null, bool automaticDatabaseObjectsTeardown = true, string namingConventionForDatabaseObjects = null)
         {
             if (string.IsNullOrWhiteSpace(connectionString)) throw new ArgumentNullException(nameof(connectionString));


Updated demo script

Updated demo script

--- Templates/Full/game/scripts/server/mountTest.cs
+++ Templates/Full/game/scripts/server/mountTest.cs
@@ -38,6 +38,16 @@
    %itemRock.car = %obj;
    %obj.mountObject(%itemRock, %this.turretSlot, "-1.4 0 .5 0 0 1 0");

+   // RigidShape
+   %rigidRock = new RigidShape() {
+      datablock = BouncingBoulder;
+      scale = "0.2 0.2 0.2";
+   };
+   %rigidRock.setShapeName("RigidShape");
+   %obj.rigidRock = %itemRock;
+   %rigidRock.car = %obj;
+   %obj.mountObject(%rigidRock, %this.turretSlot, "0 1.4 .6 0 0 1 0");
+
    // Vehicle
    %vehicleMount = new WheeledVehicle() {
       datablock = CheetahCar;
@@ -72,6 +82,12 @@
       %obj.vehicleMount.delete();
    }

+   if( isObject(%obj.rigidRock) )
+   {
+      %obj.unmountObject(%obj.rigidRock);
+      %obj.rigidRock.delete();
+   }
+
    if( isObject(%obj.itemRock) )
    {
       %obj.unmountObject(%obj.itemRock);


Fixed Typo

Fixed Typo

--- KodiInterop/KodiInterop/PyConsole.cs
+++ KodiInterop/KodiInterop/PyConsole.cs
@@ -49,7 +49,7 @@
 		/// Writes the text representation of the specified object to kodi.log with "sys.stdout.write"
 		/// </summary>
 		/// <param name="value"></param>
-		public static void Write(object value) {)
+		public static void Write(object value) {
 			string valueStr = PythonInterop.EscapeArgument(value);
 			PythonInterop.Eval(string.Format("sys.stdout.write({0})", valueStr));
 		}


[DOC] Remove empty OnGet function.

[DOC] Remove empty OnGet function.

--- LearnosityDemo/Pages/Index.cshtml.cs
+++ LearnosityDemo/Pages/Index.cshtml.cs
@@ -17,9 +17,9 @@
             _logger = logger;
         }

-        public void OnGet()
-        {
+//        public void OnGet()
+//        {

-        }
+//       }
     }
 }


No longer throws an exception if there's no mod directory

--- Libraries/Farmhand/Mods/ModLoader.cs
+++ Libraries/Farmhand/Mods/ModLoader.cs
@@ -373,6 +373,11 @@
         // Loads mod manifests from a given directory
         private static void LoadModManifests(String modDirectory)
         {
+            if (!Directory.Exists(modDirectory))
+            {
+                return;
+            }
+
             foreach (var perModPath in Directory.GetDirectories(modDirectory))
             {
                 var modJsonFiles = Directory.GetFiles(perModPath, "manifest.json");


Create GetCommandHelp method

Create GetCommandHelp method

Create GetCommandHelp method

--- UartOscilloscope/CSharpFiles/CommandDatabase.cs
+++ UartOscilloscope/CSharpFiles/CommandDatabase.cs
@@ -35,8 +35,7 @@
 				"help",                                                         //	指令名稱
 				new System.Threading.Tasks.Task(() =>                           //	建立指令工作
 				{                                                               //	進入指令工作內容
-
-
+
 				})));                                                           //	結束指令工作內容
 			CommandSet.Add(new CommandClass(                                    //	新增指令
 				3,                                                              //	指令編號
@@ -94,5 +93,10 @@
 		{                                                                       //	進入GetCommandSetCount方法
 			return this.CommandSet.Count;                                       //	回傳命令集合指令數量
 		}                                                                       //	結束GetCommandSetCount方法
+		private string GetCommandHelp()                                         //	GetCommandHelp方法
+		{                                                                       //	進入GetCommandHelp方法
+			string OutputStr = "";
+			return OutputStr;
+		}                                                                       //	結束GetCommandHelp方法
 	}                                                                           //	結束CommandDatabase類別
 }                                                                               //	結束UartOscilloscope命名空間


Updated version information.

Updated version information.

--- LinqCache/Properties/AssemblyInfo.cs
+++ LinqCache/Properties/AssemblyInfo.cs
@@ -37,7 +37,7 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.1.0")]
-[assembly: AssemblyFileVersion("0.1.1.0")]
+[assembly: AssemblyVersion("0.1.2.0")]
+[assembly: AssemblyFileVersion("0.1.2.0")]
 [assembly: CLSCompliant(true)]
 [assembly: InternalsVisibleTo("LinqCache.Test, PublicKey=00240000048000009400000006020000002400005253413100040000010001005ba4b82d98ef19e804c7a53988d8ab03ca23a2e16db4ac69eae7879f0852e2d186bd5f1a80453005147a774791468f6a416248804b44a15a6b039788048c5136ba44f65fb71d91e00a8ec012b1757d3793dc2d0763bd416267cdc5b7e606e85037ff2be7338bbf1d2856274d4bc7abf2c088305b9f02619261760489c5b303b8")]


Add tests

Add tests

--- MAB.DotIgnore.Test/WildMatchTests.cs
+++ MAB.DotIgnore.Test/WildMatchTests.cs
@@ -81,6 +81,22 @@
             Assert.IsTrue(match == WildMatch.MATCH);
         }

+        [Test]
+        public void Handle_Unclosed_Character_Class()
+        {
+            var match = WildMatch.IsMatch("abc.t[:x]t", "abc.txt", MatchFlags.NONE);
+            Assert.IsTrue(match == WildMatch.MATCH);
+        }
+
+        [Test]
+        public void Tmp()
+        {
+            var match = WildMatch.IsMatch("**[!te]", "ten", MatchFlags.NONE);
+            Assert.IsTrue(match == WildMatch.ABORT_MALFORMED);
+        }
+
+
+
         [TearDown]
         public void TearDown()
         {


correctly read diagrams

correctly read diagrams

--- MagicdrawMigrator/MagicDrawReader.cs
+++ MagicdrawMigrator/MagicDrawReader.cs
@@ -238,45 +238,47 @@
 									var elementIDNode = diagramObjectNode.SelectSingleNode(".//elementID");
 									if (elementIDNode != null)
 									{
-										try
+
+										//first theck the href attribute
+										XmlAttribute hrefAttribute = elementIDNode.Attributes["href"];
+										string elementID = string.Empty;
+										if (hrefAttribute != null)
 										{
 											string fullHrefString = elementIDNode.Attributes["href"].Value;
 											int seperatorIndex = fullHrefString.IndexOf('#');
 											if (seperatorIndex >= 0 )
 											{
-												string elementID =  fullHrefString.Substring(seperatorIndex +1);
-												//get the geometry
-												var geometryNode = diagramObjectNode.SelectSingleNode(".//geometry");
-												if (geometryNode != null
-												    && ! string.IsNullOrEmpty(geometryNode.InnerText))
-												{
-													if (currentDiagram ==null) currentDiagram = new MDDiagram(diagramName);
-													var diagramObject = new MDDiagramObject(elementID,geometryNode.InnerText);
-													currentDiagram.addDiagramObject(diagramObject);
-												}
+												elementID =  fullHrefString.Substring(seperatorIndex +1);
 											}
 										}
-										catch(NullReferenceException)
+										else
 										{
-											//no href attribute, just log it for now as error
-											//TODO: figure out if we need to create additional elements like notes in EA
-											EAOutputLogger.log(this.model,this.outputName
-								                   ,string.Format("{0} File '{1}' has elementIDNode '{2}' without href attribute"
-								                                  ,DateTime.Now.ToLongTimeString()
-								                                  , diagramFileName
-								                                 , elementIDNode.InnerText)
-								                   ,0
-								                  ,LogTypeEnum.error);
+											//check the "xmi:idref attribute
+											XmlAttribute idRefAttribute = elementIDNode.Attributes["xmi:idref"];
+											if (idRefAttribute != null) elementID = idRefAttribute.Value;
 										}
+
+										if (!string.IsNullOrEmpty(elementID))
+										{
+											//get the geometry
+											var geometryNode = diagramObjectNode.SelectSingleNode(".//geometry");
+											if (geometryNode != null
+											    && ! string.IsNullOrEmpty(geometryNode.InnerText))
+											{
+												if (currentDiagram ==null) currentDiagram = new MDDiagram(diagramName);
+												var diagramObject = new MDDiagramObject(elementID,geometryNode.InnerText);
+												currentDiagram.addDiagramObject(diagramObject);
+											}
+										}
+
 									}
-
 								}
-							}
-							//add the diagram to the list
-							if (currentDiagram != null
-							    && ! foundDiagrams.ContainsKey(diagramID))
-							{
-								foundDiagrams.Add(diagramID,currentDiagram);
+								//add the diagram to the list
+								if (currentDiagram != null
+								    && ! foundDiagrams.ContainsKey(diagramID))
+								{
+									foundDiagrams.Add(diagramID,currentDiagram);
+								}
 							}
 						}
 						catch(NullReferenceException)


Fixed unit test for clipping path.

Fixed unit test for clipping path.

--- Magick.NET.Tests/MagickImageTests.cs
+++ Magick.NET.Tests/MagickImageTests.cs
@@ -52,6 +52,34 @@
       Assert.IsNotNull(arguments.Message);
     }

+    private static void Test_Clip(bool inside, QuantumType value)
+    {
+      using (MagickImage image = new MagickImage(Files.InvitationTif))
+      {
+        image.Alpha(AlphaOption.Transparent);
+        image.Clip("Pad A", inside);
+        image.Alpha(AlphaOption.Opaque);
+
+        using (MagickImage mask = image.Mask)
+        {
+          Assert.IsNotNull(mask);
+          Assert.AreEqual(false, mask.HasAlpha);
+
+          using (PixelCollection pixels = mask.GetReadOnlyPixels())
+          {
+            var pixelA = pixels.GetPixel(0, 0).ToColor();
+            var pixelB = pixels.GetPixel(pixels.Width - 1, pixels.Height - 1).ToColor();
+
+            Assert.AreEqual(pixelA, pixelB);
+            Assert.AreEqual(value, pixelA.R);
+            Assert.AreEqual(value, pixelA.G);
+            Assert.AreEqual(value, pixelA.B);
+            Assert.AreEqual(Quantum.Max, pixelA.A);
+          }
+        }
+      }
+    }
+
     private static void Test_Clone(MagickImage first, MagickImage second)
     {
       Assert.AreEqual(first, second);
@@ -293,22 +321,8 @@
     [TestMethod, TestCategory(_Category)]
     public void Test_Clip()
     {
-      using (MagickImage image = new MagickImage(Files.InvitationTif))
-      {
-        image.Clip("Pad A", false);
-        Assert.IsNotNull(image.Mask);
-
-        using (PixelCollection pixels = image.Mask.GetReadOnlyPixels())
-        {
-          Pixel pixelA = pixels.GetPixel(0, 0);
-          Pixel pixelB = pixels.GetPixel(pixels.Width - 1, pixels.Height - 1);
-          for (int i = 0; i < 3; i++)
-          {
-            Assert.AreEqual(0, pixelA.GetChannel(i));
-            Assert.AreEqual(0, pixelB.GetChannel(i));
-          }
-        }
-      }
+      Test_Clip(false, Quantum.Max);
+      Test_Clip(true, 0);
     }

     [TestMethod, TestCategory(_Category)]


Use debug flags after CCSycles has properly loaded DLL.

--- Plugin.cs
+++ Plugin.cs
@@ -48,18 +48,6 @@
 		{
 			RhinoApp.Initialized += RhinoApp_Initialized;

-			if (RhinoApp.RunningOnVMWare() || RcCore.It.EngineSettings.OpenClDeviceType == 0)
-			{
-				CSycles.debug_set_opencl_device_type(0);
-			}
-			else
-			{
-				CSycles.debug_set_opencl_device_type(RcCore.It.EngineSettings.OpenClDeviceType);
-			}
-			CSycles.debug_set_opencl_kernel(RcCore.It.EngineSettings.OpenClKernelType);
-			CSycles.debug_set_opencl_single_program(RcCore.It.EngineSettings.OpenClSingleProgram);
-			CSycles.debug_set_cpu_kernel(RcCore.It.EngineSettings.CPUSplitKernel);
-
 			// code got moved to separate DLL so use that to register from.
 			var rccoreass = typeof(RcCore).Assembly;
 			RenderContent.RegisterContent(rccoreass, Id);
@@ -81,6 +69,18 @@
 			RcCore.It.DataUserPath = userPath;

 			CSycles.path_init(RcCore.It.KernelPath, RcCore.It.DataUserPath);
+
+			if (RhinoApp.RunningOnVMWare() || RcCore.It.EngineSettings.OpenClDeviceType == 0)
+			{
+				CSycles.debug_set_opencl_device_type(0);
+			}
+			else
+			{
+				CSycles.debug_set_opencl_device_type(RcCore.It.EngineSettings.OpenClDeviceType);
+			}
+			CSycles.debug_set_opencl_kernel(RcCore.It.EngineSettings.OpenClKernelType);
+			CSycles.debug_set_opencl_single_program(RcCore.It.EngineSettings.OpenClSingleProgram);
+			CSycles.debug_set_cpu_kernel(RcCore.It.EngineSettings.CPUSplitKernel);

 			RcCore.It.Initialised = false;
 			AsyncInitialise();


Use RenderWindow for progressive preview thumbnails.

#RH-32124

--- Plugin.cs
+++ Plugin.cs
@@ -16,6 +16,7 @@

 using System;
 using System.Drawing;
+using System.Drawing.Imaging;
 using System.IO;
 using System.Reflection;
 using System.Runtime.InteropServices;
@@ -253,22 +254,22 @@

 			InitialiseCSycles();

-			if (scene.Quality == PreviewSceneQuality.RealtimeQuick)
+			/*if (scene.Quality == PreviewSceneQuality.RealtimeQuick)
 			{
 				scene.PreviewImage = null;
 				return;
-			}
+			}*/

 			AsyncRenderContext a_rc = new PreviewRenderEngine(scene, Id);
 			var engine = (PreviewRenderEngine)a_rc;
 			engine.Settings = EngineSettings;
-			engine.Settings.SetQuality(scene.Quality);
+			engine.Settings.SetQuality(PreviewSceneQuality.RefineThirdPass);

 			engine.RenderDimension = scene.PreviewImageSize;
-			engine.RenderWindow = null;
+			engine.RenderWindow = Rhino.Render.RenderWindow.Create(scene.PreviewImageSize);

 			// New preview bitmap
-			engine.RenderBitmap = new Bitmap(scene.PreviewImageSize.Width, scene.PreviewImageSize.Height);
+			//engine.RenderBitmap = new Bitmap(scene.PreviewImageSize.Width, scene.PreviewImageSize.Height);

 			engine.CreateWorld();

@@ -276,7 +277,12 @@
 			PreviewRenderEngine.Renderer(engine);

 			/* set final preview bitmap, or null if cancelled */
-			scene.PreviewImage = scene.Cancel ? null : engine.RenderBitmap;
+			scene.PreviewImage = /*scene.Cancel ? null : */ engine.RenderWindow.GetBitmap();
+
+#if DEBUG
+			var prev = string.Format("{0}\\{1}.jpg", System.Environment.GetEnvironmentVariable("TEMP"), "previmg");
+			scene.PreviewImage.Save(prev, ImageFormat.Jpeg);
+#endif
 		}
 	}
 }


Paste gets multiline text (win), closes #1175

--- src/ui/windows/TogglDesktop/TogglDesktop/AutoCompleteTextBox.cs
+++ src/ui/windows/TogglDesktop/TogglDesktop/AutoCompleteTextBox.cs
@@ -34,6 +34,17 @@
             this.BackAlpha = 0;
         }

+        protected override void WndProc(ref Message m)
+        {
+            // Paste occurred
+            if (m.Msg == 0x302)
+            {
+                //Paste occurred get text from all lines
+                Text = Clipboard.GetText();
+            }
+            base.WndProc(ref m);
+        }
+
         void autoCompleteListBox_MouseLeave(object sender, EventArgs e)
         {
             mouseEntered = false;