
* compose all the parts * Fix on obtain and shim maker for better end to end experience * Fix error when there is space in the middle of path of nuget config * Fix path in profile.d is the tmp home path during install * better handle of ~home * remove profile.d file in uninstall script * Fix test since it looks up current directory * folder structure inside nupkg to tools/TFM/RID/mytool.dll * Add check for config file existence * Rename name space to Microsoft.DotNet.ShellShim * Rename name space to Microsoft.DotNet.ToolPackage
28 lines
774 B
C#
28 lines
774 B
C#
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
using System.IO;
|
|
|
|
namespace Microsoft.DotNet.ToolPackage
|
|
{
|
|
internal class PackageVersion
|
|
{
|
|
public PackageVersion(string packageVersion)
|
|
{
|
|
if (packageVersion == null)
|
|
{
|
|
Value = Path.GetRandomFileName();
|
|
IsPlaceholder = true;
|
|
}
|
|
else
|
|
{
|
|
Value = packageVersion;
|
|
IsPlaceholder = false;
|
|
}
|
|
}
|
|
|
|
public bool IsPlaceholder { get; }
|
|
public string Value { get; }
|
|
public bool IsConcreteValue => !IsPlaceholder;
|
|
}
|
|
}
|