Beispiel #1
0
        public static void AddPropertyMappingService(
            this IServiceCollection services,
            Action <PropertyMappingOptions> configuration)
        {
            var options = new PropertyMappingOptions();

            configuration?.Invoke(options);
            services.AddSingleton <IPropertyMappingService>(_ => new PropertyMappingService(options));
        }
 public PropertyMappingService(PropertyMappingOptions propertyMappingOptions)
 {
     _propertyMappings = propertyMappingOptions.PropertyMappings ?? new List <IPropertyMapping>();
 }