Cross-Platform framework for .Net, Starting From NetStandard To NetCore, And Xamarin.
For more information about Net Standard visit: Net Standard.
Download source code or download from nuget.
Package | Comment |
---|---|
NetXP.NetStandard | Main Reference (Contains all interfaces and some implementations) |
NetXP.CompositionRoot | Initialize implementations of Auditory, Cryptogrqaphy, Network.Services, Serialization). |
NetXP.DependencyInjection | Interface to work with dependency injection. |
NetXP.DependencyInjection.Implementations.StructureMap | Implement depency injection interface to work with StructureMap. |
NetXP.Network | Network utils (Email, LJP Protocol, SLP Protocol, TCP, SOAP [Services Client] |
NetXP.Network.Services.Implementations | Implementations of NetXP.Network.Services [SOAP]. |
Download Nuget Packages:
- NetXP.Cryptography.Implementations
- NetXP.DependencyInjection.Implementations.StructureMaps
public IServiceProvider ConfigureServices(IServiceCollection services)
{
var container = new Container(); //Structure Map Container
var customContainer = new SMContainer(container); //NetXP Container
//Registration of classes
customContainer.Configuration.Configure((IRegister r) =>
{
r.RegisterCryptography();//For All Registration r.RegisterAllNetXP(customContainer); //Nuget NetXP.NetStandarad.CompositionRoot
}
container.Populate(services);//<-- !!!Populate must be execute on the final of this block
return container.GetInstance<IServiceProvider>();
}
or manually
public void ConfigureServices(IServiceCollection services)
{
uc.AddTrasient<INameResolverFactory<IAsymetricCrypt>, AsymetricFactory>();
uc.AddTrasient<IHash, HashSHA256>();
uc.AddTrasient<ISymetricCrypt, SymetricAes>();
uc.AddTrasient<IAsymetricCrypt, AsymetricCryptWithMSRSA>();
}
See unit tests projects for examples.
NOTES:
- UnitTest projects are optional.
- Current NetStandard Version Is Set To 2.1
- Not compatible with net framework.