mirror of
https://github.com/mbierlee/mirage-injector.git
synced 2025-02-23 11:32:41 +01:00
Get rid of public access specifiers
They are default in D
This commit is contained in:
parent
c21395e47d
commit
8537804426
3 changed files with 13 additions and 13 deletions
|
@ -32,7 +32,7 @@ class Server {
|
||||||
@Value("server.port")
|
@Value("server.port")
|
||||||
private int port;
|
private int port;
|
||||||
|
|
||||||
public void run() {
|
void run() {
|
||||||
writeln("Running server on " ~ host ~ ":" ~ port.to!string);
|
writeln("Running server on " ~ host ~ ":" ~ port.to!string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Server {
|
||||||
@Value("server.port")
|
@Value("server.port")
|
||||||
private int port;
|
private int port;
|
||||||
|
|
||||||
public void run() {
|
void run() {
|
||||||
writeln("Running server on " ~ host ~ ":" ~ port.to!string);
|
writeln("Running server on " ~ host ~ ":" ~ port.to!string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ class MirageValueInjector(Type) : ValueInjector!Type {
|
||||||
@Autowire
|
@Autowire
|
||||||
private ConfigDictionary config;
|
private ConfigDictionary config;
|
||||||
|
|
||||||
public Type get(string key) {
|
Type get(string key) {
|
||||||
return config.get!Type(key);
|
return config.get!Type(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ alias MirageStringValueInjector = MirageValueInjector!string;
|
||||||
* Params:
|
* Params:
|
||||||
* container = Dependency container to register injectors with.
|
* container = Dependency container to register injectors with.
|
||||||
*/
|
*/
|
||||||
public void registerMirageInjectors(shared(DependencyContainer) container) {
|
void registerMirageInjectors(shared(DependencyContainer) container) {
|
||||||
container.register!(ValueInjector!bool, MirageBoolValueInjector);
|
container.register!(ValueInjector!bool, MirageBoolValueInjector);
|
||||||
container.register!(ValueInjector!byte, MirageByteValueInjector);
|
container.register!(ValueInjector!byte, MirageByteValueInjector);
|
||||||
container.register!(ValueInjector!ubyte, MirageUbyteValueInjector);
|
container.register!(ValueInjector!ubyte, MirageUbyteValueInjector);
|
||||||
|
@ -79,7 +79,7 @@ public void registerMirageInjectors(shared(DependencyContainer) container) {
|
||||||
* configPath = Path to the configuration file.
|
* configPath = Path to the configuration file.
|
||||||
* Throws: ConfigCreationException when the file's extension is unrecognized.
|
* Throws: ConfigCreationException when the file's extension is unrecognized.
|
||||||
*/
|
*/
|
||||||
public void loadConfig(shared(DependencyContainer) container, const string configPath) {
|
void loadConfig(shared(DependencyContainer) container, const string configPath) {
|
||||||
processConfig(container, configPath, &mirageLoadConfig);
|
processConfig(container, configPath, &mirageLoadConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public void loadConfig(shared(DependencyContainer) container, const string confi
|
||||||
* container = Dependency container to register config and injectors with.
|
* container = Dependency container to register config and injectors with.
|
||||||
* configPath = Path to the configuration file.
|
* configPath = Path to the configuration file.
|
||||||
*/
|
*/
|
||||||
public void loadJsonConfig(shared(DependencyContainer) container, const string configPath) {
|
void loadJsonConfig(shared(DependencyContainer) container, const string configPath) {
|
||||||
processConfig(container, configPath, &mirageLoadJsonConfig);
|
processConfig(container, configPath, &mirageLoadJsonConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public void loadJsonConfig(shared(DependencyContainer) container, const string c
|
||||||
* container = Dependency container to register config and injectors with.
|
* container = Dependency container to register config and injectors with.
|
||||||
* configPath = Path to the configuration file.
|
* configPath = Path to the configuration file.
|
||||||
*/
|
*/
|
||||||
public void loadJavaProperties(shared(DependencyContainer) container, const string configPath) {
|
void loadJavaProperties(shared(DependencyContainer) container, const string configPath) {
|
||||||
processConfig(container, configPath, &mirageLoadJavaConfig);
|
processConfig(container, configPath, &mirageLoadJavaConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ alias loadJavaConfig = loadJavaProperties;
|
||||||
* container = Dependency container to register config and injectors with.
|
* container = Dependency container to register config and injectors with.
|
||||||
* configPath = Path to the configuration file.
|
* configPath = Path to the configuration file.
|
||||||
*/
|
*/
|
||||||
public void loadIniConfig(shared(DependencyContainer) container, const string configPath) {
|
void loadIniConfig(shared(DependencyContainer) container, const string configPath) {
|
||||||
processConfig(container, configPath, &mirageLoadIniConfig);
|
processConfig(container, configPath, &mirageLoadIniConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ public void loadIniConfig(shared(DependencyContainer) container, const string co
|
||||||
* container = Dependency container to register config and injectors with.
|
* container = Dependency container to register config and injectors with.
|
||||||
* config = Contents of the config to parse.
|
* config = Contents of the config to parse.
|
||||||
*/
|
*/
|
||||||
public void parseJsonConfig(shared(DependencyContainer) container, const string config) {
|
void parseJsonConfig(shared(DependencyContainer) container, const string config) {
|
||||||
processConfig(container, config, &mirageParseJsonConfig);
|
processConfig(container, config, &mirageParseJsonConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,7 +140,7 @@ public void parseJsonConfig(shared(DependencyContainer) container, const string
|
||||||
* container = Dependency container to register config and injectors with.
|
* container = Dependency container to register config and injectors with.
|
||||||
* config = Contents of the properties to parse.
|
* config = Contents of the properties to parse.
|
||||||
*/
|
*/
|
||||||
public void parseJavaProperties(shared(DependencyContainer) container, const string properties) {
|
void parseJavaProperties(shared(DependencyContainer) container, const string properties) {
|
||||||
processConfig(container, properties, &mirageParseJavaConfig);
|
processConfig(container, properties, &mirageParseJavaConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ alias parseJavaConfig = parseJavaProperties;
|
||||||
* container = Dependency container to register config and injectors with.
|
* container = Dependency container to register config and injectors with.
|
||||||
* config = Contents of the config to parse.
|
* config = Contents of the config to parse.
|
||||||
*/
|
*/
|
||||||
public void parseIniConfig(shared(DependencyContainer) container, const string config) {
|
void parseIniConfig(shared(DependencyContainer) container, const string config) {
|
||||||
processConfig(container, config, &mirageParseIniConfig);
|
processConfig(container, config, &mirageParseIniConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,10 +172,10 @@ version (unittest) {
|
||||||
|
|
||||||
class TestClass {
|
class TestClass {
|
||||||
@Value("horse.name")
|
@Value("horse.name")
|
||||||
public string horseName;
|
string horseName;
|
||||||
|
|
||||||
@Value("horse.children")
|
@Value("horse.children")
|
||||||
public uint horseChildCount;
|
uint horseChildCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@("Register primitive value injectors")
|
@("Register primitive value injectors")
|
||||||
|
|
Loading…
Reference in a new issue