Пример #1
0
        /// <summary>
        /// Builds <see cref="IServiceManager"/> instances.
        /// </summary>
        /// <returns>The instance of the <see cref="IServiceManager"/>.</returns>
        public IServiceManager Build()
        {
            _options.ValidateOptions();

            var productInfo = ProductInfo.GetProductInfo(_assembly);
            var context     = new ServiceManagerContext()
            {
                ProductInfo = productInfo
            };

            context.SetValueFromOptions(_options);
            var restClientBuilder = new RestClientFactory(productInfo);

            return(new ServiceManager(context, restClientBuilder));
        }
Пример #2
0
 public IServiceManager Build()
 {
     _options.ValidateOptions();
     return(new ServiceManager(_options));
 }
 /// <summary>
 /// Builds <see cref="IServiceManager"/> instances.
 /// </summary>
 /// <returns>The instance of the <see cref="IServiceManager"/>.</returns>
 public IServiceManager Build()
 {
     _options.ValidateOptions();
     return(new ServiceManager(_options, ProductInfo.GetProductInfo(_assembly)));
 }