public void Compose(IBuilder builder) { #if NETFRAMEWORK // Register settings builder.Register <VendrReviewsSettings>(Lifetime.Singleton); // Register API builder.Register <VendrReviewsApi>(Lifetime.Singleton); // Register factories builder.RegisterUnique <IReviewRepositoryFactory, ReviewRepositoryFactory>(); // Register services builder.Register <ReviewService>(Lifetime.Singleton); // Register event handlers builder.AddVendrReviewsEventHandlers(); // Register component builder.Components() .Append <VendrReviewsComponent>(); #else // If Vendr Reviews hasn't been added manually by now, // add it automatically with the default configuration. // If Vendr Reviews has already been added manully, then // the AddVendrReviews() call will just exit early. builder.AddVendrReviews(); #endif }
public void Compose(IBuilder builder) { #if NETFRAMEWORK // Register settings builder.Register <VendrCheckoutSettings>(Lifetime.Singleton); // Register event handlers builder.AddVendrEventHandlers(); // Register pipeline builder.AddVendrInstallPipeline(); // Register services builder.Register <InstallService>(Lifetime.Singleton); // Register helpers builder.Register <PathHelper>(Lifetime.Singleton); // Register component builder.Components() .Append <VendrCheckoutComponent>(); #else // If Vendr Checkout hasn't been added manually by now, // add it automatically with the default configuration. // If Vendr Checkout has already been added manully, then // the AddVendrCheckout() call will just exit early. builder.AddVendrCheckout(); #endif }
public static Composition DisableContentmentTelemetry(this Composition composition) { ContentmentTelemetryComponent.Disabled = true; composition .Components() .Remove <ContentmentTelemetryComponent>() ; return(composition); }
public static Composition EnableContentmentTelemetry(this Composition composition) { ContentmentTelemetryComponent.Disabled = false; composition .Components() .Append <ContentmentTelemetryComponent>() ; return(composition); }
/// <inheritdoc /> public virtual void Compose(Composition composition) { composition.Components().Append <TComponent>(); }