2016-01-07 15:11:47 -08: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.IO;
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
namespace Microsoft.Extensions.DependencyModel
|
|
|
|
{
|
|
|
|
public class RuntimeAssembly
|
|
|
|
{
|
2016-02-19 16:48:43 -08:00
|
|
|
private readonly string _assemblyName;
|
|
|
|
|
2016-01-07 15:11:47 -08:00
|
|
|
public RuntimeAssembly(string path)
|
2016-02-19 16:48:43 -08:00
|
|
|
: this(System.IO.Path.GetFileNameWithoutExtension(path), path)
|
2016-01-07 15:11:47 -08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-02-19 16:48:43 -08:00
|
|
|
public RuntimeAssembly(string assemblyName, string path)
|
2016-01-07 15:11:47 -08:00
|
|
|
{
|
2016-02-19 16:48:43 -08:00
|
|
|
_assemblyName = assemblyName;
|
2016-01-07 15:11:47 -08:00
|
|
|
Path = path;
|
|
|
|
}
|
|
|
|
|
2016-02-19 16:48:43 -08:00
|
|
|
public AssemblyName Name => new AssemblyName(_assemblyName);
|
2016-01-07 15:11:47 -08:00
|
|
|
|
|
|
|
public string Path { get; }
|
|
|
|
}
|
|
|
|
}
|