<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Advanced uses of the Dapr pluggable components .NET SDK on Dapr Docs</title><link>https://v1-18.docs.dapr.io/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet/dotnet-advanced/</link><description>Recent content in Advanced uses of the Dapr pluggable components .NET SDK on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://v1-18.docs.dapr.io/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet/dotnet-advanced/index.xml" rel="self" type="application/rss+xml"/><item><title>Application Environment of a .NET Dapr pluggable component</title><link>https://v1-18.docs.dapr.io/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet/dotnet-advanced/dotnet-application-environment/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet/dotnet-advanced/dotnet-application-environment/</guid><description>&lt;p>A .NET Dapr pluggable component application can be configured for dependency injection, logging, and configuration values similarly to ASP.NET applications. The &lt;code>DaprPluggableComponentsApplication&lt;/code> exposes a similar set of configuration properties to that exposed by &lt;code>WebApplicationBuilder&lt;/code>.&lt;/p>
&lt;h2 id="dependency-injection">Dependency injection&lt;/h2>
&lt;p>Components registered with services can participate in dependency injection. Arguments in the components constructor will be injected during creation, assuming those types have been registered with the application. You can register them through the &lt;code>IServiceCollection&lt;/code> exposed by &lt;code>DaprPluggableComponentsApplication&lt;/code>.&lt;/p></description></item><item><title>Lifetimes of .NET Dapr pluggable components</title><link>https://v1-18.docs.dapr.io/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet/dotnet-advanced/dotnet-component-lifetime/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet/dotnet-advanced/dotnet-component-lifetime/</guid><description>&lt;p>There are two ways to register a component:&lt;/p>
&lt;ul>
&lt;li>The component operates as a singleton, with lifetime managed by the SDK&lt;/li>
&lt;li>A component&amp;rsquo;s lifetime is determined by the pluggable component and can be multi-instance or a singleton, as needed&lt;/li>
&lt;/ul>
&lt;h2 id="singleton-components">Singleton components&lt;/h2>
&lt;p>Components registered &lt;em>by type&lt;/em> are singletons: one instance will serve all configured components of that type associated with that socket. This approach is best when only a single component of that type exists and is shared amongst Dapr applications.&lt;/p></description></item><item><title>Multiple services in a .NET Dapr pluggable component</title><link>https://v1-18.docs.dapr.io/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet/dotnet-advanced/dotnet-multiple-services/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/developing-applications/develop-components/pluggable-components/pluggable-components-sdks/pluggable-components-dotnet/dotnet-advanced/dotnet-multiple-services/</guid><description>&lt;p>A pluggable component can host multiple components of varying types. You might do this:&lt;/p>
&lt;ul>
&lt;li>To minimize the number of sidecars running in a cluster&lt;/li>
&lt;li>To group related components that are likely to share libraries and implementation, such as:
&lt;ul>
&lt;li>A database exposed both as a general state store, and&lt;/li>
&lt;li>Output bindings that allow more specific operations.&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ul>
&lt;p>Each Unix Domain Socket can manage calls to one component of each type. To host multiple components of the &lt;em>same&lt;/em> type, you can spread those types across multiple sockets. The SDK binds each socket to a &amp;ldquo;service&amp;rdquo;, with each service composed of one or more component types.&lt;/p></description></item></channel></rss>