• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

loresoft / KickStart / 11217044799

07 Oct 2024 01:52PM CUT coverage: 60.921%. Remained the same
11217044799

push

github

web-flow
Create FUNDING.yml

162 of 364 branches covered (44.51%)

Branch coverage included in aggregate %.

658 of 982 relevant lines covered (67.01%)

20.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/KickStart.AutoMapper/AutoMapperServiceModule.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
using AutoMapper;
7
using KickStart.Services;
8

9
namespace KickStart.AutoMapper
10
{
11

12
    /// <summary>
13
    /// AutoMapper service module registration
14
    /// </summary>
15
    /// <seealso cref="KickStart.Services.IServiceModule" />
16
    public class AutoMapperServiceModule : IServiceModule
17
    {
18
        /// <summary>Register service injections with the specified <paramref name="services" /> container.</summary>
19
        /// <param name="services">The <see cref="T:KickStart.Services.IServiceRegistration"/> container to add the module services to.</param>
20
        /// <param name="data">The data dictionary shared with all starter modules.</param>
21
        public void Register(IServiceRegistration services, IDictionary<string, object> data)
22
        {
23
            data.TryGetValue(AutoMapperStarter.AutoMapperConfiguration, out var configurationValue);
×
24

25
            var configuration = configurationValue as IConfigurationProvider;
×
26
            if (configuration == null)
×
27
                return;
×
28

29
            services.RegisterSingleton(configuration);
×
30
            services.RegisterSingleton<IMapper>(s => new Mapper(s.GetService<IConfigurationProvider>()));
×
31
        }
×
32
    }
33
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc