Skip to content

Commit

Permalink
Fixup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
z4kn4fein committed Dec 20, 2024
1 parent ecd076a commit e1972b5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [v5.17.0] - 2024-12-20
### Added
- `PreferEnumerableInCurrent` option to `ResolutionBehavior` enum. When this option is used upon enumerable resolution, services from the current container (which initiated the resolution request) are preferred, ignoring services from parent containers.
- `PreferEnumerableInCurrent` option to `ResolutionBehavior` enum. When this option is used upon enumerable resolution the following applies:
- When both `Current` and `Parent` behaviors are enabled, and the current container has the appropriate services, the resolution will prefer those and ignore the parent containers. When the current container doesn't have the requested services, the parent containers will serve the request.
### Changed
- Enumerable resolution requests across child-parent containers resulted in the wrong order. Now, the resulting collection contains the parent services first and the child services at the end of the collection.

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/advanced/child-containers.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Possible values:
- `Parent`: Indicates that parent containers (including all indirect ancestors) can participate in the resolution request's service selection.
- `Current`: Indicates that the current container (which initiated the resolution request) can participate in the service selection.
- `ParentDependency`: Indicates that parent containers (including all indirect ancestors) can only provide dependencies for services that are already selected for resolution.
- `PreferEnumerableInCurrent`: Upon enumerable resolution, services from the current container (which initiated the resolution request) are preferred, ignoring services from parent containers.
- `PreferEnumerableInCurrent`: Upon enumerable resolution, when both `Current` and `Parent` behaviors are enabled, and the current container has the appropriate services, the resolution will prefer those and ignore the parent containers. When the current container doesn't have the requested services, the parent containers will serve the request.

```csharp
interface IService {}
Expand Down
3 changes: 1 addition & 2 deletions src/Resolution/ResolutionBehavior.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;

namespace Stashbox.Resolution;

Expand Down Expand Up @@ -30,7 +29,7 @@ public enum ResolutionBehavior
ParentDependency = 1 << 2,

/// <summary>
/// Upon enumerable resolution, services from the current container (which initiated the resolution request) are preferred, ignoring services from parent containers.
/// Upon enumerable resolution, when both <see cref="Current"/> and <see cref="Parent"/> behaviors are enabled, and the current container has the appropriate services, the resolution will prefer those and ignore the parent containers. When the current container doesn't have the requested services, the parent containers will serve the request.
/// </summary>
PreferEnumerableInCurrent = 1 << 3,
}

0 comments on commit e1972b5

Please sign in to comment.