Skip to content

Commit a0e53f5

Browse files
committed
Documentation Update for 4.4.3
1 parent ed1c9ae commit a0e53f5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

autofactory/index.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ <h2 id="default-convention">Default convention</h2>
115115
<pre><code class="language-csharp">&#xD;&#xA;public interface IDummyFactory&#xD;&#xA;{&#xD;&#xA; // This method will return the names of all registered implementations of TService.&#xD;&#xA; IList&lt;string&gt; GetNames&lt;TService&gt;();&#xD;&#xA;&#xD;&#xA; // This method will just create the default IDummyService implementation.&#xD;&#xA; IDummyService CreateDummyService();&#xD;&#xA;&#xD;&#xA; // This method will just create the default IDummyService implementation and pass namePart1 and namePart2 as&#xD;&#xA; // dependencies.&#xD;&#xA; IDummyService CreateDummyService(string namePart1, string namePart2);&#xD;&#xA;&#xD;&#xA; // This method will create IDummyService implementation with serviceName name.&#xD;&#xA; IDummyService GetNamedDummyService(string serviceName, string namePart1, string namePart2);&#xD;&#xA;&#xD;&#xA; // Generic methods are also allowed as factory methods.&#xD;&#xA; TService CreateService&lt;TService&gt;();&#xD;&#xA;&#xD;&#xA; // Something that is common for event-sourcing implementations.&#xD;&#xA; IHandler&lt;TMessage&gt; CreateHandler&lt;TMessage&gt;();&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;</code></pre>
116116
<h2 id="custom-convention">Custom convention</h2>
117117
<p>If the default convention doesn't work for you, you can create and use your custom convention. All you need is to implement <code>IAutoFactoryConventionProvider</code> and use the corresponding <code>CreateFactory</code> overload. <code>IAutoFactoryConventionProvider</code> has a single method to implement:</p>
118-
<pre><code>IAutoFactoryMethodDefinition GetMethodDefinition(MethodInfo methodInfo, IList&lt;object&gt; arguments);
119-
</code></pre>
118+
<pre><code class="language-csharp">&#xD;&#xA;IAutoFactoryMethodDefinition GetMethodDefinition(MethodInfo methodInfo, IList&lt;object&gt; arguments);&#xD;&#xA;&#xD;&#xA;</code></pre>
120119
<p><code>IAutoFactoryMethodDefinition</code> is defined as follows:</p>
121120
<pre><code class="language-csharp">&#xD;&#xA;/// &lt;summary&gt;&#xD;&#xA;/// Describes how AutoFactory should treat the specific method declared in an abstract factory interface.&#xD;&#xA;/// &lt;/summary&gt;&#xD;&#xA;public interface IAutoFactoryMethodDefinition&#xD;&#xA;{&#xD;&#xA; /// &lt;summary&gt;&#xD;&#xA; /// The method type. See &lt;see cref=&quot;AutoFactoryMethodType&quot;/&gt; for possible values.&#xD;&#xA; /// &lt;/summary&gt;&#xD;&#xA; AutoFactoryMethodType MethodType { get; }&#xD;&#xA;&#xD;&#xA; /// &lt;summary&gt;&#xD;&#xA; /// The instance type to create.&#xD;&#xA; /// &lt;/summary&gt;&#xD;&#xA; Type InstanceType { get; }&#xD;&#xA;&#xD;&#xA; /// &lt;summary&gt;&#xD;&#xA; /// The instance name if available.&#xD;&#xA; /// &lt;/summary&gt;&#xD;&#xA; string InstanceName { get; }&#xD;&#xA;&#xD;&#xA; /// &lt;summary&gt;&#xD;&#xA; /// Explicit arguments if available.&#xD;&#xA; /// &lt;/summary&gt;&#xD;&#xA; ExplicitArguments ExplicitArguments { get; }&#xD;&#xA;}&#xD;&#xA;&#xD;&#xA;</code></pre>
122121

0 commit comments

Comments
 (0)