mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-04-05 21:01:35 +08:00
Medium Trust: Updating to NuGet latest bits.
This commit is contained in:
parent
7730092962
commit
b251c3ef0f
Binary file not shown.
@ -9,7 +9,7 @@ namespace Orchard.Packaging.Services {
|
|||||||
public class FileBasedProjectSystem : IProjectSystem {
|
public class FileBasedProjectSystem : IProjectSystem {
|
||||||
private const string NetFrameworkIdentifier = ".NETFramework";
|
private const string NetFrameworkIdentifier = ".NETFramework";
|
||||||
private const string BinDir = "bin";
|
private const string BinDir = "bin";
|
||||||
private string _root;
|
private readonly string _root;
|
||||||
|
|
||||||
public FileBasedProjectSystem(string root) {
|
public FileBasedProjectSystem(string root) {
|
||||||
if (String.IsNullOrEmpty(root)) {
|
if (String.IsNullOrEmpty(root)) {
|
||||||
@ -81,7 +81,7 @@ namespace Orchard.Packaging.Services {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteDirectory(string path) {
|
public void DeleteDirectory(string path) {
|
||||||
DeleteDirectory(path, recursive: false);
|
DeleteDirectory(path, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DeleteDirectory(string path, bool recursive) {
|
public void DeleteDirectory(string path, bool recursive) {
|
||||||
@ -98,26 +98,14 @@ namespace Orchard.Packaging.Services {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddReference(string referencePath) {
|
public void AddReference(string referencePath, Stream stream) {
|
||||||
// Copy to bin by default
|
// Not used by Orchard
|
||||||
string src = referencePath;
|
throw new NotSupportedException();
|
||||||
string referenceName = Path.GetFileName(referencePath);
|
|
||||||
string dest = GetFullPath(GetReferencePath(referenceName));
|
|
||||||
|
|
||||||
// Ensure the destination path exists
|
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(dest));
|
|
||||||
|
|
||||||
// Copy the reference over
|
|
||||||
File.Copy(src, dest, overwrite: true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveReference(string name) {
|
public void RemoveReference(string name) {
|
||||||
DeleteFile(GetReferencePath(name));
|
// Not used by Orchard
|
||||||
|
throw new NotSupportedException();
|
||||||
// Delete the bin directory if this was the last reference
|
|
||||||
if (!GetFiles(BinDir).Any()) {
|
|
||||||
DeleteDirectory(BinDir);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public dynamic GetPropertyValue(string propertyName) {
|
public dynamic GetPropertyValue(string propertyName) {
|
||||||
|
Loading…
Reference in New Issue
Block a user