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

33 lines
635 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FLocal.Core {
class Config<T> where T : Config<T> {
private static Config<T> _instance;
public static Config<T> instance {
get {
if(_instance == null) throw new FLocalException("not initialized");
return _instance;
}
private set {
lock(_instance) {
if(_instance != null) throw new FLocalException("already initialized");
_instance = value;
}
}
}
private Config() {
}
public static void doInit(Config<T> config) {
_instance = config;
}
}
}