public void AutoWiredFunq_Perf() { RegisterServices(serviceController, GetAutoWiredFunqTypeFactory()); StoreAndGetCustomers(serviceController); var request = new GetCustomer { CustomerId = 2 }; Console.WriteLine("AutoWiredFunq_Perf(): {0}", Measure(() => serviceController.Execute(request), Times)); }
/// <summary>Anies the given request.</summary> /// /// <param name="request">The request.</param> /// /// <returns>A GetCustomerResponse.</returns> public GetCustomerResponse Any(GetCustomer request) { if (config.UseCache) { var inCache = this.CacheClient.Get<GetCustomerResponse>(CacheKey); if (inCache != null) return inCache; } var response = new GetCustomerResponse { Customer = db.GetById<Customer>(request.CustomerId) }; if (config.UseCache) this.CacheClient.Set(CacheKey, response); return response; }