An alternative to UBB.threads
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
FLocal/FLocal.Patcher.Common/PatcherConfiguration.cs

62 lines
1.5 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;
using System.IO;
using Patcher.Data.Patch;
using Web.Core;
using Patcher.Web;
namespace FLocal.Patcher.Common {
public class PatcherConfiguration : Config<PatcherConfiguration>, IPatcherConfiguration {
private readonly string _DbDriverName;
public string DbDriverName {
get {
return this._DbDriverName;
}
}
private readonly string _GuestConnectionString;
public string GuestConnectionString {
get {
return this._GuestConnectionString;
}
}
private readonly string _PatchesTable;
public string PatchesTable {
get {
return this._PatchesTable;
}
}
private readonly string _EnvironmentName;
public string EnvironmentName {
get {
return this._EnvironmentName;
}
}
public IEnumerable<PatchId> getPatchesList() {
return PatchesLoader.getPatchesList();
}
public Stream loadPatch(PatchId patchId) {
return PatchesLoader.loadPatch(patchId);
}
protected PatcherConfiguration(NameValueCollection data) : base() {
this._DbDriverName = data["Patcher.DbDriver"].ToString();
this._EnvironmentName = data["Patcher.EnvironmentName"].ToString();
this._GuestConnectionString = data["ConnectionString"].ToString();
this._PatchesTable = data["Patcher.PatchesTable"].ToString();
}
public static void Init(NameValueCollection data) {
doInit(() => new PatcherConfiguration(data));
}
}
}