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/Common/Config.cs

39 lines
899 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;
namespace FLocal.Common {
public class Config : FLocal.Core.Config<Config> {
public readonly string InitTime;
public readonly Core.DB.IDBConnection mainConnection;
public readonly string dataDir;
protected Config(NameValueCollection data) : base(data) {
this.InitTime = DateTime.Now.ToLongTimeString();
this.mainConnection = new MySQLConnector.Connection(data["ConnectionString"]);
this.dataDir = data["DataDir"];
}
public static void Init(NameValueCollection data) {
doInit(() => new Config(data));
}
public static void ReInit(NameValueCollection data) {
doReInit(() => new Config(data));
}
public override void Dispose() {
this.mainConnection.Dispose();
base.Dispose();
}
}
}