Beispiel #1
0
        public static IHubSpotConfigurator UseDealConnector(this IHubSpotConfigurator configurator)
        {
            configurator.AddServiceConfiguration(services =>
            {
                services.AddSingleton <IDealTypeManager, DealTypeManager>();

                services.AddSingleton <IHubSpotDealConnector, HubSpotDealConnector>();
            });

            configurator.RequireTypeStore();

            return(configurator);
        }
Beispiel #2
0
        public static IHubSpotConfigurator RegisterConverter <TConverter>(this IHubSpotConfigurator configurator, TConverter converter, params Type[] types) where TConverter : ITypeConverter
        {
            configurator.AddServiceConfiguration(services =>
            {
                foreach (var type in types)
                {
                    services.AddSingleton(new TypeConverterRegistration
                    {
                        Converter = converter,
                        Type      = type
                    });
                }
            });

            return(configurator);
        }