/// <summary> /// Calls the service builder plug-in to return a fluent interface for configuring a service. /// You can pass a service instance or allow the builder to build one from scratch /// </summary> /// <param name="serviceInstance">Optional instance to configure</param> /// <param name="declaringType">Used to configure the instance from custom attributes</param> /// <returns></returns> public IServiceDefinition BuildUpService(object serviceInstance, Type declaringType, IPackage package) { if (ServiceBuilder == null) { throw new FluentBuilderException("There is no build engine installed that knows how to build services"); } return(ServiceBuilder.BuildUpService(serviceInstance, declaringType, package ?? _packageContext)); }