[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThis page provides reference documentation for the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class within the Memorystore v1beta API.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e is a static class offering extension methods to configure API clients for Memorystore.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes methods to add a singleton \u003ccode\u003eMemorystoreClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e, allowing optional configuration via \u003ccode\u003eMemorystoreClientBuilder\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddMemorystoreClient\u003c/code\u003e method has two overloads, one with and another without an \u003ccode\u003eIServiceProvider\u003c/code\u003e parameter, both allowing for an action to be invoked on the client builder.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this api is 1.0.0-beta02, with the previous version being 1.0.0-beta01.\u003c/p\u003e\n"]]],[],null,["# Memorystore v1beta API - Class ServiceCollectionExtensions (1.0.0-beta02)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta02 (latest)](/dotnet/docs/reference/Google.Cloud.Memorystore.V1Beta/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0-beta01](/dotnet/docs/reference/Google.Cloud.Memorystore.V1Beta/1.0.0-beta01/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Memorystore v1beta API class ServiceCollectionExtensions.\n\nStatic class to provide extension methods to configure API clients. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ServiceCollectionExtensions \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Microsoft.Extensions.DependencyInjection](/dotnet/docs/reference/Google.Cloud.Memorystore.V1Beta/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Memorystore.V1Beta.dll\n\nMethods\n-------\n\n### AddMemorystoreClient(IServiceCollection, Action\\\u003cMemorystoreClientBuilder\\\u003e)\n\n public static IServiceCollection AddMemorystoreClient(this IServiceCollection services, Action\u003cMemorystoreClientBuilder\u003e action = null)\n\nAdds a singleton [MemorystoreClient](/dotnet/docs/reference/Google.Cloud.Memorystore.V1Beta/latest/Google.Cloud.Memorystore.V1Beta.MemorystoreClient) to `services`.\n\n### AddMemorystoreClient(IServiceCollection, Action\\\u003cIServiceProvider, MemorystoreClientBuilder\\\u003e)\n\n public static IServiceCollection AddMemorystoreClient(this IServiceCollection services, Action\u003cIServiceProvider, MemorystoreClientBuilder\u003e action)\n\nAdds a singleton [MemorystoreClient](/dotnet/docs/reference/Google.Cloud.Memorystore.V1Beta/latest/Google.Cloud.Memorystore.V1Beta.MemorystoreClient) to `services`."]]