VOOZH about

URL: https://www.nuget.org/packages/ShopifySharp.Extensions.DependencyInjection

⇱ NuGet Gallery | ShopifySharp.Extensions.DependencyInjection 1.9.0




ShopifySharp.Extensions.DependencyInjection 1.9.0

dotnet add package ShopifySharp.Extensions.DependencyInjection --version 1.9.0
 
 
NuGet\Install-Package ShopifySharp.Extensions.DependencyInjection -Version 1.9.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ShopifySharp.Extensions.DependencyInjection" Version="1.9.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ShopifySharp.Extensions.DependencyInjection" Version="1.9.0" />
 
Directory.Packages.props
<PackageReference Include="ShopifySharp.Extensions.DependencyInjection" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ShopifySharp.Extensions.DependencyInjection --version 1.9.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ShopifySharp.Extensions.DependencyInjection, 1.9.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ShopifySharp.Extensions.DependencyInjection@1.9.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ShopifySharp.Extensions.DependencyInjection&version=1.9.0
 
Install as a Cake Addin
#tool nuget:?package=ShopifySharp.Extensions.DependencyInjection&version=1.9.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

ShopifySharp.Extensions.DependencyInjection

This package adds support for injecting ShopifySharp services into .NET classes using Microsoft's Dependency Injection framework. To do this, it exposes several methods that extend the IServiceCollection interface. Microsoft's DI framework will then make the ShopifySharp services available to the rest of your code when you add the interfaces to your class constructors.

// In your Program.cs or Startup.cs file, or wherever you register your Dependency Injection services
public class DependencyInjectionExample(IServiceCollection services)
{
 // ...
 
 // Add ShopifySharp's service factories and the LeakyBucketExecutionPolicy to your DI container
 services.AddShopifySharp<LeakyBucketExecutionPolicy>(options =>
 {
 options.RequestExecutionPolicy = new LeakyBucketExecutionPolicy(); 
 });
}

// In the class where you want to use a ShopifySharp service
public class MyClass(IOrderServiceFactory orderServiceFactory)
{
 public async Task ListOrdersForUser()
 {
 var user = await DoSomethingToGetUser();
 var credentials = new ShopifyRestApiCredentials(user.ShopDomain, user.AccessToken);
 var orderService = orderServiceFactory.Create(credentials);
 
 // Because the service was created using the injected factory class, 
 // it's automatically using the LeakyBucket request policy. That means it will
 // gracefully handle Shopify's API request limit and will wait if it hits the
 // limit (instead of throwing an exception).
 var orders = await ordrService.ListAsync();
 }
}

<a href="add-service-factories"></a>services.AddShopifySharpServiceFactories()

This extension method adds all of ShopifySharp's to your IServiceCollection. All factories will be added as singletons to the container. No request execution policy will be added via this method, but the factories will pick up any other request execution policy you add to your DI container. See services.AddShopifySharpRequestExecutionPolicy(IRequestExecutionPolicy) to add one explicitly.

services.AddShopifySharpServiceFactories();

<a name="add-request-execution-policy"></a>services.AddShopifySharpRequestExecutionPolicy<T>()

where T: IRequestExecutionPolicy

This extension method adds the given implementation class to your DI container as a singleton. Any ShopifySharp service factories that you add to your DI container, whether manually or via the other DI methods in this package, will use this policy.

services.AddShopifySharpRequestExecutionPolicy<LeakyBucketExecutionPolicy>();

<a href="add-shopifysharp"></a>services.AddShopifySharp<T>()

where T: IRequestExecutionPolicy

This is a convenience method and simply calls the other ShopifySharp DI extension methods sequentially to inject all ShopifySharp services into your DI container.

services.AddShopifySharp<LeakyBucketExecutionPolicy>();
Product Versions Compatible and additional computed target framework versions.
.NET net5.0 net5.0 was computed.  net5.0-windows net5.0-windows was computed.  net6.0 net6.0 was computed.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 was computed.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 was computed.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 was computed.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
.NET Core netcoreapp2.0 netcoreapp2.0 was computed.  netcoreapp2.1 netcoreapp2.1 was computed.  netcoreapp2.2 netcoreapp2.2 was computed.  netcoreapp3.0 netcoreapp3.0 was computed.  netcoreapp3.1 netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 netstandard2.0 is compatible.  netstandard2.1 netstandard2.1 is compatible. 
.NET Framework net461 net461 was computed.  net462 net462 was computed.  net463 net463 was computed.  net47 net47 was computed.  net471 net471 was computed.  net472 net472 was computed.  net48 net48 was computed.  net481 net481 was computed. 
MonoAndroid monoandroid monoandroid was computed. 
MonoMac monomac monomac was computed. 
MonoTouch monotouch monotouch was computed. 
Tizen tizen40 tizen40 was computed.  tizen60 tizen60 was computed. 
Xamarin.iOS xamarinios xamarinios was computed. 
Xamarin.Mac xamarinmac xamarinmac was computed. 
Xamarin.TVOS xamarintvos xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on ShopifySharp.Extensions.DependencyInjection:

Package Downloads
Kentico.Xperience.Shopify

Xperience by Kentico - Shopify integration

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.9.0 59,522 8/31/2025
1.9.0-b302 124 3/3/2026
1.9.0-b301 119 3/3/2026
1.9.0-b300 120 3/2/2026
1.9.0-b295 115 2/26/2026
1.9.0-b293 117 2/26/2026
1.9.0-b291 114 2/24/2026
1.9.0-b288 118 2/17/2026
1.9.0-b287 120 2/13/2026
1.9.0-b286 118 2/12/2026
1.9.0-b284 121 2/10/2026
1.9.0-b283 124 2/9/2026
1.9.0-b262 200 9/26/2025
1.9.0-b261 208 9/12/2025
1.9.0-b260 225 9/10/2025
1.9.0-b259 233 9/4/2025
1.9.0-b258 248 9/4/2025
1.8.0-b257 242 8/30/2025
1.8.0-b256 291 8/26/2025
1.8.0-b254 218 8/20/2025
Loading failed