mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
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.
23 lines
787 B
23 lines
787 B
using Microsoft.Extensions.DependencyInjection;
|
|
using Volo.Abp.DependencyInjection;
|
|
using Volo.Abp.Modularity;
|
|
using Volo.Abp.Reflection;
|
|
|
|
namespace Volo.Abp.Serialization;
|
|
|
|
public class AbpSerializationModule : AbpModule
|
|
{
|
|
public override void PreConfigureServices(ServiceConfigurationContext context)
|
|
{
|
|
context.Services.OnExposing(onServiceExposingContext =>
|
|
{
|
|
//Register types for IObjectSerializer<T> if implements
|
|
onServiceExposingContext.ExposedTypes.AddRange(
|
|
ReflectionHelper.GetImplementedGenericTypes(
|
|
onServiceExposingContext.ImplementationType,
|
|
typeof(IObjectSerializer<>)
|
|
).ConvertAll(t => new ServiceIdentifier(t))
|
|
);
|
|
});
|
|
}
|
|
}
|
|
|