Skip to content

Commit

Permalink
Fixed #9
Browse files Browse the repository at this point in the history
  • Loading branch information
gdivis committed Aug 16, 2018
1 parent ee22d73 commit c3d0839
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/Inedo.UPack/Packaging/PackageRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,25 @@ public sealed class PackageRegistry : IDisposable
{
private bool disposed;

private PackageRegistry(string registryRoot) => this.RegistryRoot = registryRoot;
/// <summary>
/// Initializes a new instance of the <see cref="PackageRegistry"/> class.
/// </summary>
/// <param name="registryRoot">The root directory of the registry. This must be an absolute path.</param>
/// <exception cref="ArgumentNullException"><paramref name="registryRoot"/> is null or empty.</exception>
/// <exception cref="ArgumentException"><paramref name="registryRoot"/> is not an absolute path.</exception>
/// <remarks>
/// To initialize a <see cref="PackageRegistry"/> instance with one of the standard registry locations, use the
/// <see cref="GetRegistry(bool)"/> static method.
/// </remarks>
public PackageRegistry(string registryRoot)
{
if (string.IsNullOrWhiteSpace(registryRoot))
throw new ArgumentNullException(nameof(registryRoot));
if (!Path.IsPathRooted(registryRoot))
throw new ArgumentException("Registry root must be an absolute path.");

this.RegistryRoot = registryRoot;
}

/// <summary>
/// Gets the root directory of the package registry.
Expand Down

0 comments on commit c3d0839

Please sign in to comment.