add Test using XKeyedServices ...
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
namespace xServices.Configurations
|
namespace xServices.Configurations
|
||||||
{
|
{
|
||||||
public partial class XServicesConfiguration
|
public partial class XServicesConfiguration
|
||||||
{ }
|
{
|
||||||
|
public string Name { get; set; } = "Default";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -266,6 +266,19 @@ namespace xServices.DI
|
|||||||
// Register xMT5BridgeService ...
|
// Register xMT5BridgeService ...
|
||||||
// services.AddXMT5BridgeService();
|
// services.AddXMT5BridgeService();
|
||||||
|
|
||||||
|
//
|
||||||
|
var defServiceConfig = new XServicesConfiguration();
|
||||||
|
var sServiceConfig = new XServicesConfiguration
|
||||||
|
{
|
||||||
|
Name = "SaherElm"
|
||||||
|
};
|
||||||
|
services.AddXKeyedService<XServicesConfiguration>(defServiceConfig.Name);
|
||||||
|
services.AddXKeyedService<XServicesConfiguration>(sServiceConfig.Name);
|
||||||
|
|
||||||
|
//
|
||||||
|
var sS = services.GetXKeyedService<XServicesConfiguration>(sServiceConfig.Name);
|
||||||
|
var defS = services.GetXKeyedService<XServicesConfiguration>(defServiceConfig.Name);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Storage Service ...
|
// Storage Service ...
|
||||||
services.AddXStorageService(configuration);
|
services.AddXStorageService(configuration);
|
||||||
|
|||||||
Reference in New Issue
Block a user