Skip to content

Commit 9f51225

Browse files
authored
Merge pull request #1 from autofac/develop
fetch from original
2 parents 4bbf53f + 3f63eb7 commit 9f51225

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
![Autofac](https://autofac.org/img/carousel-logo.png)
1+
<p align="center">
2+
<img src="https://autofac.org/img/autofac_web-banner_character.svg" width="250">
3+
</p>
4+
<p align="center">
5+
<img src="https://autofac.org/img/autofac_logo-type.svg" height="100">
6+
</p>
27

38
Autofac is an [IoC container](http://martinfowler.com/articles/injection.html) for Microsoft .NET. It manages the dependencies between classes so that **applications stay easy to change as they grow** in size and complexity. This is achieved by treating regular .NET classes as *[components](https://autofac.readthedocs.io/en/latest/glossary.html)*.
49

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 4.9.2.{build}
1+
version: 4.9.3.{build}
22

33
configuration: Release
44

src/Autofac/Autofac.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<Description>Autofac is an IoC container for Microsoft .NET. It manages the dependencies between classes so that applications stay easy to change as they grow in size and complexity.</Description>
5-
<VersionPrefix>4.9.2</VersionPrefix>
5+
<VersionPrefix>4.9.3</VersionPrefix>
66
<TargetFrameworks>netstandard2.0;netstandard1.1;net45</TargetFrameworks>
77
<NoWarn>$(NoWarn);CS1591</NoWarn>
88
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

src/Autofac/Core/IComponentRegistration.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@ public interface IComponentRegistration : IDisposable
7676
IComponentRegistration Target { get; }
7777

7878
/// <summary>
79-
/// Fired when a new instance is required. The instance can be
80-
/// provided in order to skip the regular activator, by setting the Instance property in
81-
/// the provided event arguments.
79+
/// Fired when a new instance is required, prior to activation.
80+
/// Can be used to provide Autofac with additional parameters, used during activation.
8281
/// </summary>
8382
event EventHandler<PreparingEventArgs> Preparing;
8483

src/Autofac/Core/Registration/ComponentRegistration.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,8 @@ public ComponentRegistration(
143143
public IDictionary<string, object> Metadata { get; }
144144

145145
/// <summary>
146-
/// Fired when a new instance is required. The instance can be
147-
/// provided in order to skip the regular activator, by setting the Instance property in
148-
/// the provided event arguments.
146+
/// Fired when a new instance is required, prior to activation.
147+
/// Can be used to provide Autofac with additional parameters, used during activation.
149148
/// </summary>
150149
public event EventHandler<PreparingEventArgs> Preparing;
151150

src/Autofac/Features/Decorators/InstanceDecorator.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ internal static object TryDecorateRegistration(
4040
{
4141
var instanceType = instance.GetType();
4242

43-
// Issue #965: Do not apply the decorator if already applied, or if the registration is for an adapter.
44-
if (registration.IsAdapting() || registration.Activator.LimitType != instanceType) return instance;
43+
// Issue #965: Do not apply the decorator if the registration is for an adapter.
44+
if (registration.IsAdapting()) return instance;
4545

4646
var decoratorRegistrations = context.ComponentRegistry.DecoratorsFor(registration);
4747

test/Autofac.Specification.Test/Features/DecoratorTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ public void DecoratorRegisteredAsLambdaCanBeResolved()
524524
Assert.IsType<ImplementorA>(instance.Decorated);
525525
}
526526

527-
[Fact(Skip = "Issue #999")]
527+
[Fact]
528528
public void DecoratorRegisteredOnLambdaWithCast()
529529
{
530530
// Issue #999: The cast in the lambda to IDecoratedService

0 commit comments

Comments
 (0)