2016-10-28 01:46:43 +00:00
|
|
|
|
// 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;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.DotNet.Cli.Utils;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.TestFramework
|
|
|
|
|
{
|
|
|
|
|
public class TestAssetInventoryFiles
|
|
|
|
|
{
|
|
|
|
|
private FileInfo _source;
|
|
|
|
|
|
|
|
|
|
private FileInfo _restore;
|
|
|
|
|
|
|
|
|
|
private FileInfo _build;
|
|
|
|
|
|
2017-10-12 00:17:28 +00:00
|
|
|
|
public FileInfo Source
|
|
|
|
|
{
|
2016-10-28 01:46:43 +00:00
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
_source.Refresh();
|
|
|
|
|
|
|
|
|
|
return _source;
|
2017-10-12 00:17:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-10-28 01:46:43 +00:00
|
|
|
|
private set
|
|
|
|
|
{
|
|
|
|
|
_source = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-10-12 00:17:28 +00:00
|
|
|
|
public FileInfo Restore
|
|
|
|
|
{
|
2016-10-28 01:46:43 +00:00
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
_restore.Refresh();
|
|
|
|
|
|
|
|
|
|
return _restore;
|
2017-10-12 00:17:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-10-28 01:46:43 +00:00
|
|
|
|
private set
|
|
|
|
|
{
|
|
|
|
|
_restore = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public FileInfo Build
|
2017-10-12 00:17:28 +00:00
|
|
|
|
{
|
2016-10-28 01:46:43 +00:00
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
_build.Refresh();
|
|
|
|
|
|
|
|
|
|
return _build;
|
2017-10-12 00:17:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-10-28 01:46:43 +00:00
|
|
|
|
private set
|
|
|
|
|
{
|
|
|
|
|
_build = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public TestAssetInventoryFiles(DirectoryInfo inventoryFileDirectory)
|
|
|
|
|
{
|
|
|
|
|
Source = new FileInfo(Path.Combine(inventoryFileDirectory.FullName, "source.txt"));
|
|
|
|
|
|
|
|
|
|
Restore = new FileInfo(Path.Combine(inventoryFileDirectory.FullName, "restore.txt"));
|
|
|
|
|
|
|
|
|
|
Build = new FileInfo(Path.Combine(inventoryFileDirectory.FullName, "build.txt"));
|
|
|
|
|
}
|
2017-01-06 09:40:26 +00:00
|
|
|
|
|
|
|
|
|
public IEnumerable<FileInfo> AllInventoryFiles
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new List<FileInfo>
|
|
|
|
|
{
|
|
|
|
|
Source,
|
|
|
|
|
Restore,
|
|
|
|
|
Build
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
2016-10-28 01:46:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|