Azure packaging

Executing ClickToBuild.cmd generates the package for Azure including all modules available in Orchard.Web automatically
AzureSDK in requiered for this tasks. If not present, the package won't succeed, but Orchard.Web will still be built
The Orchard.Azure solution contains the required environment for implementing Azure specific providers, and unit testing
The Orchard.Azure.CloudService solution contains the CloudService enrironment to simulate Azure platform locally

--HG--
branch : dev
This commit is contained in:
Sebastien Ros
2010-05-07 12:41:37 -07:00
parent ae801b66b2
commit 7248fb6fd7
21 changed files with 1179 additions and 244 deletions

View File

@@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Orchard.Environment.Configuration;
namespace Orchard.Azure.Environment.Configuration {
public class AzureAppDataFolder : IAppDataFolder {
private readonly AzureFileSystem _fs;
public AzureAppDataFolder(string shellName) {
_fs = new AzureFileSystem("appdata", shellName, true);
}
public void CreateFile(string path, string content) {
if(_fs.FileExists(path)) {
DeleteFile(path);
}
using (var stream = _fs.CreateFile(path).OpenWrite()) {
using(var writer = new StreamWriter(stream)) {
writer.Write(content);
}
}
}
public string ReadFile(string path) {
using ( var stream = _fs.GetFile(path).OpenRead() ) {
using ( var reader = new StreamReader(stream) ) {
return reader.ReadToEnd();
}
}
}
public void DeleteFile(string path) {
_fs.DeleteFile(path);
}
public bool FileExists(string path) {
return _fs.FileExists(path);
}
public IEnumerable<string> ListFiles(string path) {
return _fs.ListFiles(path).Select(sf => sf.GetPath());
}
public IEnumerable<string> ListDirectories(string path) {
return _fs.ListFolders(path).Select(sf => sf.GetName());
}
public string CreateDirectory(string path) {
_fs.CreateFolder(path);
return Path.GetDirectoryName(path);
}
public void SetBasePath(string basePath) {
throw new NotImplementedException();
}
public string MapPath(string path) {
throw new NotImplementedException();
}
}
}