public static IStatelessServiceHostEventSourceReplicaTemplate UseImplementation <TImplementation>(
            this IStatelessServiceHostEventSourceReplicaTemplate @this,
            Func <IServiceProvider, TImplementation> factoryFunc)
            where TImplementation : IServiceEventSource
        {
            @this.ConfigureObject(
                configurator => configurator.UseImplementation(factoryFunc));

            return(@this);
        }
        public static IStatelessServiceHostEventSourceReplicaTemplate UseImplementation <TImplementation>(
            this IStatelessServiceHostEventSourceReplicaTemplate @this)
            where TImplementation : IServiceEventSource
        {
            @this.ConfigureObject(
                configurator => configurator.UseImplementation(
                    provider => ActivatorUtilities.CreateInstance <TImplementation>(provider)));

            return(@this);
        }